From owner-freebsd-questions@FreeBSD.ORG Thu Aug 3 20:57:31 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B917516A4DD for ; Thu, 3 Aug 2006 20:57:31 +0000 (UTC) (envelope-from backyard1454-bsd@yahoo.com) Received: from web81602.mail.mud.yahoo.com (web81602.mail.mud.yahoo.com [68.142.199.154]) by mx1.FreeBSD.org (Postfix) with SMTP id 69CDE43D45 for ; Thu, 3 Aug 2006 20:57:31 +0000 (GMT) (envelope-from backyard1454-bsd@yahoo.com) Received: (qmail 26064 invoked by uid 60001); 3 Aug 2006 20:57:30 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=4bvtHHwh2NG9AW4PVjkZ5UeS0WA8LV7iX/okGtRSesKBW1oLN44nBN6mdv4u3vMGywJXK8UXFYc04VwvUVncvp2Heiu0fzxZsW8+8m00Tx+Yg3aHGmckv3RBjfAhZ5TWq9wLZAw3MduqQH5I82onmJnFGzHJsgI0TeKdkBI3d9E= ; Message-ID: <20060803205730.26062.qmail@web81602.mail.mud.yahoo.com> Received: from [63.240.228.37] by web81602.mail.mud.yahoo.com via HTTP; Thu, 03 Aug 2006 13:57:30 PDT Date: Thu, 3 Aug 2006 13:57:30 -0700 (PDT) From: To: User Freebsd , backyard1454-bsd@yahoo.com In-Reply-To: <20060803171635.E6529@ganymede.hub.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Cc: Antony Mawer , Xiao-Yong Jin , freebsd-questions@freebsd.org Subject: Re: Gotta start somewhere ... how many of us are really out there? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: backyard1454-bsd@yahoo.com List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Aug 2006 20:57:31 -0000 --- User Freebsd wrote: > On Thu, 3 Aug 2006, backyard1454-bsd@yahoo.com > wrote: > > > maybe it's just because I've been reading up on it > but what about > > outputting the information in XML??? Then you > could tag the Vendor, > > Name, basic info, number of users, etc. in a > tagged form that could be > > then stored in a Dbase of some kind by vendor, > working in FreeBSD X.Y, > > broken, etc. The XML should be easily outputted on > the fly to XHTML so > > it can be reviewed by devolopers and what not. > Just my too cents... > > 'k, right now, we are trying to get the data from > the remote clients to a > central server ... if you are thinking of using XML > for this (not against > it, I just know nothing about it), can you provide > an example of what you > are thinking, and how we'd script this to use HTTP > to connect to the > remote server? > > The hard part of all of this is that it cannot > require *anything* except > for the base system, so no php, no perl ... just > pure shell commands ... > it cannot require an administrator to install > anything above the script > itself ... > > ---- > Marc G. Fournier Hub.Org Networking > Services (http://www.hub.org) > Email . scrappy@hub.org > MSN . scrappy@hub.org > Yahoo . yscrappy Skype: hub.org > ICQ . 7615664 > ok well I'm not much of a C programmer right now so I'll give you waht I think in psuedo-psuedo-psuedo-code write a small program that shell calls pciconf -lv and outputs this to a temporary file or buffers to memory. Then use maybe a tr (translate I think its tr, never really used the command) to change things like Vendor: foobar in the pciconf -lv output to Vendor: foorbar Hardware: RAID controller or whatever XML tags you want to use using the acutal output data from pciconf -lv as a starting point take this tagged file and insert it into a properly defined XML file with the header defined and a proper root tag like [standard XML header info, may be system specific based on encoding and what not] making tr work line by line with exception handling for all the tags it might encounter is something I would have to look into more myself. Then you could write up a CSS or XSLT stylesheet so it will display this information to a webbrowser however your want. Once you have figured out what tags you want to use this shouldn't be too hard. I guess a script file would be the easiest way to accompish all this in hindsight,as all the commands I've used are standard shell commands. Putting it all together is going to take more thought then what I can give it at work right now. The stylesheet could be stored on a central server of your choosing and added to the header for the XML that the script file generates. If this is still not very understandable I will see if I can generate a shell program to get things started. myunderstanding is once the shell is installed it should be runable by anyone with access to pciconf, tr, cat, and maybe a few other commands like date and whatnot for documentation sake; which means any user should be able to run and install the script in their home/bin directory. As far as uploading this file to a database that is beyond the scope of my feable mind, but I don't think it would be too hard to accomplish if someone was more familiar with db or whatever other database you want to store this by. hope this gives you more of an idea as to what I was getting at, hopefully there will be more to come if I figure this thing out; I need to learn how to process XML for a little project I'm working on for a friend anyway. The good thing about this is once in XML I know there are stardard ways of serving the XML file with a webserver for display. What I don't know is how to make it searchable or concatenate all the hardware and what not so you can see a per device status as to its functionality in a particular snapshot of FreeBSD. -brian