sysinfo.pl

Home About Examples Download
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%)
						



Download

sysinfo281.19.pl - Dec 13 2011
- numerous fixes for Linux on Sun T2000, Sun Blade 1000, alpha, sh4, etc. (thanks for the patch Raul!)
- fix distro reporting on Ubuntu LTS

sysinfo281.18.pl - Nov 3 2011
- regex fix for load averages after i noticed it didn't work properly under Solaris 10

sysinfo281.17.pl - Oct 19 2011
- small fix so it works with Linux 2.7 and 3.0

sysinfo281.16.pl - Jun 11 2009
- get rid of GenuineIntel stuff on Xeon machines (thanks Popdog)
- fix CPU formatting under OpenBSD (thanks Popdog)
- fix NetBSD 4.0 cpu detection, and NetBSD xen support (thanks Billy and DaCa)

sysinfo281.15.pl - Mar 13 2009
- fix cpu info on Intel processors under FreeBSD 7 (thanks Popdog)
- add ppc64 and ppc64 smp support to Linux (thanks for the shell terminal)

sysinfo281.14.pl - Mar 6 2009
- fix cpu info on x86 Darwin systems (thanks Denis and others)

sysinfo281.13.pl - Mar 6 2009
- fix uptime on Darwin 8 (OS X Tiger)

sysinfo281.12.pl - Feb 12 2009
- fix colors and formatting for network info, thanks Piotr
- drop support for --console output as it was unmaintained anyways

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

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

sysinfo281.09.pl- Dec 20 2007
- 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 - Dec 20 2007
- add support for Darwin 9 (OS X Leopard)
- add support for NetBSD 4.0 (please test on old NetBSD systems.. hopefully this doesn't break them)

sysinfo281.07.pl - Aug 10 2007
- 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 - Apr 16 2006
- add acpi battery support. Remember to set showBattery = 1 in the script

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

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

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

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

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

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

sysinfo278.10.pl - Jan 15 2005
- 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 - Jan 15 2005
- 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 - Jan 13 2005
- removes extra spaces from cpu info for all platforms now as i ran into yet another system with it

sysinfo278.07.pl - Jan 10 2005
- 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 - Oct 6 2003
- 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