This seems to have tremendous potential. Having all this information in
one standard form allows you to take snapshots of your system, and then
if things break you can compare snapshots before and after to possibly
get a hint of where to focus. This will be especially true when you add
the ability to list packages and software installed.

It could also be useful when trying to help solve a problem, especially
remotely.

Why not set this up as a sourceforge project?

M


On Tue, 29 Nov 2005, darren kirby wrote:

quoth the Harry Putnam:

I'm sure many such scripts have been written in the past 35yrs.  I
hoped a few would have become famous and available by name that I
could simply edit.

Perhaps so, but I decided to write one anyway. Just 'stroking the beard' I
guess. It is in python, as I cannot stand Perl.

I have only spent a few hours on this, so it is still rough around the edges
(ie: there is virtually no error checking so far), but good enough to post
now I think. I will spend the next few days polishing it up.

Problems with it:
1. For now, it only works properly on single cpu systems. If you have 2+ cpu's
it will just print "Couldn't get cpu info"
2. Hardware is just a dump of 'lspci'; user and group is just a dump
of /etc/passwd and /etc/group. I will fix this so that it actually displays a
useful report in the next few days...
3. May not work on systems with hardware I don't have ;) That is, I have not
tested with devices such as tape drives, raid arrays etc...so the script
might break with this sort of input (or perhaps just ignore it)
4. No package/software listing yet. I want to do this in a distro neutral way.

What it does so far:
1. print meta info: hostname, distro, architecture (ie i686)
2. cpu details: model, speed, cache, bogomips
3. memory and memory usage details (including swap)
4. kernel information: version, uptime, cmdline, loaded modules, supported
filesystems etc...
5. hardware (lspci for now...)
6. network info: interfaces, ip address, broadcast, netmask, MAC, default GW,
nameservers
7. mounted devices: net mounts, pseudo mounts, disk usage
8. Users, groups

I would like to do this thing right, so if you (anybody!) has ideas, advice,
requests etc  please try it out and let's talk. Am I missing anything that
should be printed?

As mentioned, I have tomorrow free, so I will plug away at it more then...

You can download at:
http://badcomputer.org/unix/code/sysinfo.py.gz

or just view and cut/paste the code from:
http://badcomputer.org/unix/code/sysinfo.bot

-d
--
darren kirby :: Part of the problem since 1976 :: http://badcomputer.org
"...the number of UNIX installations has grown to 10, with more expected..."
- Dennis Ritchie and Ken Thompson, June 1972

--
gentoo-user@gentoo.org mailing list

Reply via email to