Gotta start somewhere ... how many of us are really out there?
backyard1454-bsd at yahoo.com
backyard1454-bsd at yahoo.com
Thu Aug 3 20:57:31 UTC 2006
--- User Freebsd <freebsd at hub.org> wrote:
> On Thu, 3 Aug 2006, backyard1454-bsd at yahoo.com
> > 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 at hub.org
> MSN . scrappy at 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
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
<hardware> Hardware: RAID controller </hardware>
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]
<server_information_(insert the output of uname -a
here for completeness)
output of the tr stuff could prolly be catted into
this after the header is defined.
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
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
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.
More information about the freebsd-questions