sysinfo.pl

Home About Examples Download Changelog
About

sysinfo.pl is a perl script that shows some interesting info about the system it's running on.
The script was written by a friend of mine, David Rudie aka dj.

As time went on bugs were discovered and feature requests received and I've attempted to address these with my version.

The last version dj released is 281 which combined our changes up to that point.


Examples

xterm
Hostname: igloo - OS: Linux 2.6.7-hardened-r8/i686 - CPU: AMD Athlon(tm) XP 2500+ (1830.354 MHz) - Processes: 207 - Uptime: 80d 5h 24m
- Users: 9 - Load Average: 0.25 - Memory Usage: 444.50MB/1011.77MB (43.93%) - Disk Usage: 67.69GB/111.20GB (60.87%)

Hostname: twombly - OS: Darwin 7.7.0/Power Macintosh - CPU: 2 x Motorola PowerPC G4 (1250.00 MHz) - Processes: 53 - Uptime: 2d 21h 4m 
- Users: 1 - Load Average: 0.00 - Memory Usage: 108.84MBB/2048.00MB (5.31%) - Disk Usage: 270.31GB/301.32GB (89.71%)

Hostname: raptor - OS: FreeBSD 4.1.1-STABLE/i386 - CPU: Pentium 4 (2423.88-MHz 686-class CPU) - Processes: 60 - Uptime: 239d 1h 
- Users: 4 - Load Average: 0.13 - Memory Usage: 254.96MB/1020.33MB (24.99%) - Disk Usage: 33.42GB/66.48GB (50.27%)

Hostname: trixy - OS: NetBSD 2.0/i386 - CPU: AMD Athlon Model 2 (686-class), 800.52 MHz, id 0x622 - Processes: 29 - Uptime: 8d 1h 49m
- Users: 1 - Load Average: 0.10 - Memory Usage: 408.51MB/1023.55MB (39.91%) - Disk Usage: 0.64GB/17.52GB (3.67%)

Hostname: jupiter - OS: IRIX64 6.5/IP30 - CPU: 2 x MIPS R10000 (250 MHz) - Processes: 73 - Uptime: 333d 8h 45m
- Users: 1 - Load Average: 0.00 - Memory Usage: 205.00MB/256.00MB (80.08%) - Disk Usage: 6.90GB/8.35GB (82.69%)

Hostname: pliosaur - OS: FreeBSD 5.3-RELEASE-p4/i386 - CPU: Intel(R) Pentium(R) III CPU family 1133MHz (1138.45-MHz 686-class CPU)
- Processes: 85 - Uptime: 3d - Users: 1 - Load Average: 0.08 - Memory Usage: 35.88MB/1531.39MB (2.34%) - Disk Usage: 1.43GB/51.26GB (2.79%)

Hostname: www - OS: Linux 2.2.16C32_III/i586 - CPU: AMD-K6(tm) 3D processor (298.807 MHz) - Processes: 40 - Uptime: 618d 14h 15m
- Users: 2 - Load Average: 0.07 - Memory Usage: 51.95MB/504.99MB (10.29%) - Disk Usage: 0.91GB/8.87GB (10.21%)

Hostname: cartman - OS: SunOS 5.10/i86pc - CPU: 4 x Dual-Core AMD Opteron 8218 (2600 MHz) - Processes: 97 - Uptime: 41d 20h 45m
- Users: 2 - Load Average: 0.03 - Memory Usage: 10116.52MB/65024.00MB (15.56%) - Disk Usage: 4.48GB/287.84GB (1.56%)
						



Changelog

sysinfo281.11.pl
- the script can now tell the difference between Red Hat and CentOS

sysinfo281.10.pl
- fix incorrrect memory reporting on OSX when > 2 gigs installed (thanks termy!)

sysinfo281.09.pl
- add support for OpenFiler linux distro (thanks thinko!)
- add support for Solaris and OpenSolaris (thanks thinko and <3 irix for making it actually work!)

sysinfo281.08.pl
- add support for Darwin 9
- add support for NetBSD 4.0 (please test on old NetBSD systems.. hopefully this doesn't break them)

sysinfo281.07.pl
- add support for Ubuntu distro using /etc/lsb-release.. send me other /etc/lsb-release and /etc/debian_version info for Knoppix or whatever other Debian based distros you may be running!

sysinfo281.06.pl
- add acpi battery support. Remember to set showBattery = 1 in the script

sysinfo281.05.pl
- fix reporting of multiple cpus on single cpu FreeBSD machines

sysinfo281.04.pl
- fix reporting of multiple cpus on single cpu NetBSD machines

sysinfo281.03.pl
- fix division by zero for diskless booting systems (0 GB/0 GB is bad in perl)

sysinfo281.02.pl
- add back the two lines that remove extra spaces from $cpu at line 384

sysinfo281.01.pl
- short line color support
- distro support
- defaults to ShowDistro=1 and ShortHostname=1

sysinfo278.11.pl
- added support for DragonFly BSD
- added SuSE Distro detection

sysinfo278.10.pl
- check if os is linux before attempting to check length of $distro
- initialize $distro and $distrov for linux machines that can't be detected

sysinfo278.09.pl
- added Linux distro detection (email me your changes here if it doesn't detect your distro!)
- always use short hostname for consistency
- fix loadaverage under Darwin (was showing all three values)

sysinfo278.08.pl
- removes extra spaces from cpu info for all platforms now as i ran into yet another system with it

sysinfo278.07.pl
- removed extra spaces in cpu info under FreeBSD - noticed with a PIII 1133Mhz

sysinfo278.06.pl
- fix for dual IRIX systems to show both CPUS (thanks Nicoya)

sysinfo278.05.pl
- adjust previous change, only use df -kP if OS is Linux

sysinfo278.04.pl
- change 'df -k' to 'df -kP' so that lines are not split with long device names (example LVM)

sysinfo278.03.pl
- Remove all instances of double spaces in CPU detection for some Linux 2.2 systems with P4's

sysinfo278.02.pl
- Remove 'Warning:' message from FreeBSD 4.10 CPU info

sysinfo278.01.pl
- Added ability to show number of users on the system ($showUsers)
- Changed CPU grep to look for 'CPU:' instead of just ':' to fix problem on newer linux kernels
- Remove all spaces after CPU: for some systems that put a lot of whitespace there
- Add color highlighting with $col1 and $col2 variables
- Turn off network info by default
- Make diskspace detection use df -k instead of df -lk because FreeBSD 4.1 doesn't know -l



Download

sysinfo281.11.pl
sysinfo281.10.pl
sysinfo281.09.pl
sysinfo281.08.pl
sysinfo281.07.pl
sysinfo281.06.pl
sysinfo281.05.pl
sysinfo281.04.pl
sysinfo281.03.pl
sysinfo281.02.pl
sysinfo281.01.pl
sysinfo278.11.pl
sysinfo278.10.pl
sysinfo278.09.pl
sysinfo278.08.pl
sysinfo278.07.pl
sysinfo278.06.pl
sysinfo278.05.pl
sysinfo278.04.pl
sysinfo278.03.pl
sysinfo278.02.pl
sysinfo278.01.pl