=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- systeminfo.sh By Kirk Waingrow wkrik@yahoo.com 03/16/2006 - V1.3 =-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- What is systeminfo.sh? systeminfo.sh is a system information gathering script for linux systems. It in non-intrusive and simply gathers information from linux commands that are already available. Distribute freely... Modify openly... Send me any updates or ideas. CYA STATEMENT: *** USE AT YOUR OWN RISK *** As is the script does not write over or near any system files, unless someone modifies it to do so. ALWAYS TEST THE SCRIPT ON A NON-PRODUCTION SYSTEM. FUTURE INTENT: Install the systeminfo.sh script in /usr/local/bin on all servers. Run it nightly, and rsync the data to a central server that has a httpd running on it. Farther down the road would be to compare the static config data and check against it daily to see if something changes. If so, send out notification as such. What kinds of information does it gather? Host Software Packages Memory OS Info Process Info Kernel Mods Network Routes Socket Ports ulimites chkconfig Hardware Devices swap disks DNS info top processor sysctl dmesg Cron Jobs Network Interfaces AND MORE.... What is supported? Currently only Red Hat and Fedora Core Linux is supported. Only Disks with sd, hd, cciss, and ida as devices Only ext3 filesystems. (This is all I can test against for the moment) (The script can easily be adapted to support more) firefox for browsing. We don't do MS. HOW DO I INSTALL IT? It is only a shell script that needs to run as root. It can be executed from anywhere. How do I make it work in my environment? Just set the DPATH variable to where you want the data files to go. it is best to set the path to one of these paths: /tmp/systeminfo /var/tmp/systeminfo /usr/local/systeminfo HOW DO I RUN IT: systeminfo.sh [OPTION] Only one option is allowed at a time: -a : Collect info, generate web pages and tar file, then display to stdout. -d : Display to stdout as it collects the info. -h : Display this message. -t : Creates just a tar file of the web pages for centralizing. -w : Creates just the web pages and master info file. When ran with no options the script will output to stdout Data collection can takes about 40-90 seconds depending on the system. What is generated? A master file is generated that contains all the information collected and a series of text files that are displayed from 2 html files. [HOSTNAME].txt Master collection of all information in one place index.html The initial starting web page menu.html Displays the menu of possible collected data general.txt general host information chkconfig.txt contains chkconfig info cron.txt contains all the crontabs set up disks.txt Disk and partition configuratons dmesg.txt the system dmesg network.txt All the network info proc.txt Process tables and top sockets.txt Socket port connections software.txt software rpm packages system.txt system configs systeminfo_[HOSTNAME].tar A tar file of the above files. Why is a tar file generated? A tar file is generated so that a central admin web server can remotely login, get the tar file, and extract it locally so the local web server can see it. (SEE http://www.ugu.com/systeminfo/centralize.html) =-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- CHANGELOG V1.4 - Bug Fixes: html fix. Memory collection uses meminfo not procinfo now. 04/17/06 V1.3 - By request... Default without options produces stdout,tar,webpages. 03/15/06 vmstat info moved to the bottom of system section. Functional rewrite. Collection is done is a single pass now. Status updates are displayed for -t and -w options Additional arguments added: -a : Collect info, generate web pages and tar file, then display to stdout. -d : Display to stdout as it collects the info. -h : Display this message. -t : Creates just a tar file of the web pages for centralizing. -w : Creates just the web pages and master info file. V1.2 - Fix ifconfig and nic's, added vmstat info, iostat to disk and CPU sections. argument to publish to stdout ONLY use: "-d" 03/10/2006 V1.1 - Added sysctl kernel info. 03/03/2006 Added on root can execute Fixed mii-tool issue uname bug fix. Some options aren't available on older versions Added display and output version number V1.0 - Support only RH/FC, a limited filesystems and disk devices 03/02/2006