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
Is your site working? Monitor Your Web Site 24/7. Get SMS alerts on server downtime! Free 30-day trial including 20 SMS!
Related Other Helpful Shell Scripts:
- Shell Script To Notify Admin User if UNIX / Linux System Load Crossed Certain Limit
- Script to logoff KDE/Gnome desktop user session; you can use it from command line or from desktop via Lanucher
- Shell script to find all world-writable files and directories on Linux / UNIX system
- Shell Script To Display The Running Process Running On The System Every 30 Seconds For 3 Times Only
- Change password shell script
Discussion on This Shell Script:
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


hi can someone tell me how to use this script.
I have done chmod + secript
and bash script.sh
its still doesnt work can someone enlighten me?