Gathering CPU info from Linux and FreeBSD and placing it into a MySQL db

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hey all,

First time poster to this mailing list, but I've been lurking for a week
now, and it seems like there are a lot of helpful people on this list.
I hope to help others out with problems I can answer for them in the
future.

Now, I have an important task at hand.  My company has assigned me to
write a script that will log into both our BSD and Linux boxes (we have
about 400 boxes), gather up all the information about each system
(Operating System, External IP Address, LAN Controller, Video Card, USB
devices, Serial Port, Amount of Memory, # of Hard Drives, HD Brand, and
HD Type (ide ata scsi raid)).

We've gone over a few ideas, although we're not set in stone which route
we want to take, or if there is an easier solution to this task at hand.
Heck, even if there is something that has already been coded and can act
as a foundation for this project would be grand.

Okay, so here's what we've come up with so far:

1) Using parts of PHPSysInfo

- Hack apart this script I found called phpsysinfo.  I've already hacked
it apart and it only displays what we're looking for.  You can see what
I'm talking about if you visit
http://morano.hopto.org/phpsysinfo/index.php

- Use the XML portion of the script to export all gathered data into an 
XML file.

- Take the XML file and import it into the MySQL db


2) Finding a script that already does all this already (Ideal Solution)

- I'm open to ideas on this one.  After snooping around Linux and BSD,
I've gathered that using a combination of sysctl, uname, and dmesg would
get me the results I need, but this seems like the hard way, unless
someone has already implemented a solution using these tools and PHP.
Finding a script that already does everything I want IS the ideal
solution, the trouble is finding it.

I know it can be done, but I've been bashing my head against the wall
for the past day and a half now.  My head hurts and has a couple knots
due to the wall being so thick, so now I turn to you folks in search for
some guidance.

If there is anything else I can answer to help clarify my task at hand,
please let me know.  I'm stepping out for lunch, but I'm pretty much
stuck at work until a solution has been found, so I'll be checking the
mailing list frequently (about every 5 mins!).

The URL I provided to contains everything that is needed to be gathered.

Also, if there are other resources such as forums, web site tutorials,
script archives, etc. that I might be able to find answers from, I'd
love to check them out.

Thanks in advance.


Patrick

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux