#!/usr/bin/perl ############################################################################## # By BumbleBeeWare.com 2008 # get hardware and software details of a webserver for diagnostics or planning # serverinfo.cgi # ############################################################################## # ############################################################################## print "Content-type: text/html\n\n"; $response = `hostname`; print "
Server Hostname
"; print "
$response
"; print "
-----------------------------------------

"; $response = `uname -a`; print "
Server O/S Details
"; print "
$response
"; print "
-----------------------------------------

"; $response = `uptime`; print "
Server Uptime & Load Average
"; print "
$response
"; print "
-----------------------------------------

"; $response = `free -m`; print "
Available Memory and Swap Space
"; print "
$response
"; print "
-----------------------------------------

"; $response = `cat /proc/cpuinfo`; print "
CPU Information
"; print "
$response
"; print "
-----------------------------------------

"; $response = `df`; print "
Drive Space and Mount Points
"; print "
$response
"; print "
-----------------------------------------

"; $response = `lspci`; print "
PCI Devices Installed
"; print "
$response
"; print "
-----------------------------------------

"; $response = `route`; print "
Routing Tables Eth Cards & IPs
"; print "
$response
"; print "
-----------------------------------------

"; $response = `w`; print "
Users Currently Running Processes
"; print "
$response
"; print "
-----------------------------------------

"; exit;