Difference between revisions of "Ministat"
(→Script) |
(→Overview) |
||
| Line 3: | Line 3: | ||
Useful for monitoring a server that is having problems. | Useful for monitoring a server that is having problems. | ||
| + | |||
| + | The main concept is to minify the output of several sections in to a small terminal window, useful for monitoring a server when it is having problems or could at some point. | ||
==Script== | ==Script== | ||
Revision as of 17:21, 17 May 2011
Contents
Overview
Down and dirty mini status viewer. Makes it easy to monitor several different sections of a server at the same time.
Useful for monitoring a server that is having problems.
The main concept is to minify the output of several sections in to a small terminal window, useful for monitoring a server when it is having problems or could at some point.
Script
[bash,n]
cat /proc/loadavg
printf "%$(tput cols)s\n"|tr ' ' '='
top -c -b -n 1 | head -12 | tail -3
printf "%$(tput cols)s\n"|tr ' ' '='
mysqladmin proc stat | grep "|" | grep -v "Id" | grep -v "processlist" | cut -d "|" -f7,9 | sed "s/ //g" | sort -n | head -3
printf "%$(tput cols)s\n"|tr ' ' '='
free | grep -v "cache:"
printf "%$(tput cols)s\n"|tr ' ' '='
httpd status | grep "requests/sec" -A6
Usage
Direct download and execution of script (auto mode)
[bash,n]wget http://wiki.jamesdooley.us/scripts/ministat -O ministat; watch -n 10 sh ministat; rm -f ministat