From Chaos to Placidity

Chattering random observations, tips, and tutorials on all things related to IT.

Manual Audit Runner

I wrote this script to do the following.  It logs into X number of servers you define in a configuration file, and pulls some general system info.  I find this useful if I’m trying to get a better picture of a host(s) that don’t have robust monitoring already done.

This is crude and needs some tweaking.  I recommend having an admin user account with SSH keys that has normal user + sudo access to the host.  The information that I collect doesn’t need su access so if your keys are distributed you could just execute the tool and walk away.  Here is some of the information it generates for you:

********************************************
mnetmgt1.domain.net system information

********************************************

1 minute load   ==> 0.03
15 minute load  ==> 0.11
5 minute load   ==> 0.08
Cpu Type        ==> Intel(R) Xeon(R) CPU           E5450  @ 3.00GHz
Hostname        ==> mnetmgt1.domain.net
Kernel          ==> 2.6.18-164.el5
MTU             ==> 1500
Memory          ==> 2051072 kB
Memory Free     ==> 589112 kB
System          ==> Linux
Tcp Default R   ==> 108.000 kb
Tcp Default W   ==> 108.000 kb
Tcp Max R       ==> 127.999 kb
Tcp Max W       ==> 127.999 kb
Uptime          ==> 73 days, 16 hours, 44 minutes, 11 seconds

Routing table for mnetmgt1.domain.net
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
10.10.1.0       0.0.0.0         255.255.255.0   U     0      0        0 eth0
169.254.0.0     0.0.0.0         255.255.0.0     U     0      0        0 eth0
0.0.0.0         10.10.1.2       0.0.0.0         UG    0      0        0 eth0

I’ll be posting a zip package soon with the script.  I haven’t done a great job of cleaning it up yet, so take it as is  If anything, it can help give you a starting point at writing your own audit scripts.

SB

Blog comments powered by Disqus
More Information