1 |
quoth the Harry Putnam: |
2 |
|
3 |
> I'm sure many such scripts have been written in the past 35yrs. I |
4 |
> hoped a few would have become famous and available by name that I |
5 |
> could simply edit. |
6 |
|
7 |
Perhaps so, but I decided to write one anyway. Just 'stroking the beard' I |
8 |
guess. It is in python, as I cannot stand Perl. |
9 |
|
10 |
I have only spent a few hours on this, so it is still rough around the edges |
11 |
(ie: there is virtually no error checking so far), but good enough to post |
12 |
now I think. I will spend the next few days polishing it up. |
13 |
|
14 |
Problems with it: |
15 |
1. For now, it only works properly on single cpu systems. If you have 2+ cpu's |
16 |
it will just print "Couldn't get cpu info" |
17 |
2. Hardware is just a dump of 'lspci'; user and group is just a dump |
18 |
of /etc/passwd and /etc/group. I will fix this so that it actually displays a |
19 |
useful report in the next few days... |
20 |
3. May not work on systems with hardware I don't have ;) That is, I have not |
21 |
tested with devices such as tape drives, raid arrays etc...so the script |
22 |
might break with this sort of input (or perhaps just ignore it) |
23 |
4. No package/software listing yet. I want to do this in a distro neutral way. |
24 |
|
25 |
What it does so far: |
26 |
1. print meta info: hostname, distro, architecture (ie i686) |
27 |
2. cpu details: model, speed, cache, bogomips |
28 |
3. memory and memory usage details (including swap) |
29 |
4. kernel information: version, uptime, cmdline, loaded modules, supported |
30 |
filesystems etc... |
31 |
5. hardware (lspci for now...) |
32 |
6. network info: interfaces, ip address, broadcast, netmask, MAC, default GW, |
33 |
nameservers |
34 |
7. mounted devices: net mounts, pseudo mounts, disk usage |
35 |
8. Users, groups |
36 |
|
37 |
I would like to do this thing right, so if you (anybody!) has ideas, advice, |
38 |
requests etc please try it out and let's talk. Am I missing anything that |
39 |
should be printed? |
40 |
|
41 |
As mentioned, I have tomorrow free, so I will plug away at it more then... |
42 |
|
43 |
You can download at: |
44 |
http://badcomputer.org/unix/code/sysinfo.py.gz |
45 |
|
46 |
or just view and cut/paste the code from: |
47 |
http://badcomputer.org/unix/code/sysinfo.bot |
48 |
|
49 |
-d |
50 |
-- |
51 |
darren kirby :: Part of the problem since 1976 :: http://badcomputer.org |
52 |
"...the number of UNIX installations has grown to 10, with more expected..." |
53 |
- Dennis Ritchie and Ken Thompson, June 1972 |