Shell script to General FreeBSD and Linux System information
Posted in Monitoring
Shell script to display general FreeBSD and Linux System information such as, Hostname, OS version, Kernel version, Processor/CPU, Total RAM, System load, network interface, total logged in users, Hard disks, Runlevel etc in neat format.
#!/bin/bash # Shell script to General FreeBSD and Linux System information such as: # Hostname, OS version, Kernel version, Processor/CPU, Total RAM, # System load, network interface, total logged in users, Hard disks, # Runlevel etc. I will write separate scripts for detailed system # information :D # Copyright (c) 2005 nixCraft project # This script is licensed under GNU GPL version 2.0 or above # For more info, please visit: # http://cyberciti.biz/shell_scripting/bmsinstall.php # ------------------------------------------------------------------------- # This script is part of nixCraft shell script collection (NSSC) # Visit http://bash.cyberciti.biz/ for more information. # ------------------------------------------------------------------------- SPATH="/usr/local/etc/bashmonscripts" INITBMS="$SPATH/defaults.conf" [ ! -f $INITBMS ] && exit 1 || . $INITBMS echo "Hostname:" $(getHostName) echo "OS Name:" $($UNAME) echo "OS Version:" $($UNAME -mr) echo "Processor:" $(getCpuInfo) echo "Total Physical Memory (RAM):" $(getRealRamInfo) echo "System Load:" $(getSystemLoad) echo "Date & Time:" $($DATE) echo "Network interface:" $(getNumberOfInterfaces) echo "Total logged in users:" $(getNumberOfLoggedInUsers) echo "Total running process:" $(getNumberOfRunningProcess) echo "Total SCSI/IDE disks:" $(getDiskDrives) echo "Mounted partitions:" $(getNumberOfParittions) echo "Loaded dynamic kernel modules/drivers:" $(getNumberOfKernelModules) echo "OS Rulevel:" $(getOsRunLevel)
Download - Email this to a friend - Printable version
Leave a Reply
We encourage your comments, and suggestions. But please stay on topic, be polite, and avoid spam. Thank you very much for stopping by our site!
Tags: bash shell script, detailed system, echo hostname, echo system, exit 1, freebsd, gnu gpl version, hard disks, kernel modules, kernel version, memory ram, network interface, os name, os version, physical memory, ram system, script collection, shell scripting, system information ~ Last updated on: April 10, 2008

