Difference between revisions of "Ministat"

From James Dooley's Wiki
Jump to: navigation, search
(Created page with "==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 p...")
 
(Script)
Line 11: Line 11:
 
top -c -b -n 1 | head -12 | tail -5
 
top -c -b -n 1 | head -12 | tail -5
 
printf "%$(tput cols)s\n"|tr ' ' '='
 
printf "%$(tput cols)s\n"|tr ' ' '='
mysqladmin proc stat | grep "Query" | cut -d "|" -f7,9 | sed "s/ //g" | sort -n | head  
+
mysqladmin proc stat | grep "|" | grep -v "Id" | grep -v "show processlist" | cut -d "|" -f7,9 | sed "s/ //g" | sort -n | head  
 
printf "%$(tput cols)s\n"|tr ' ' '='
 
printf "%$(tput cols)s\n"|tr ' ' '='
 
free
 
free

Revision as of 16:37, 17 May 2011

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.

Script

[bash,n] cat /proc/loadavg printf "%$(tput cols)s\n"|tr ' ' '=' top -c -b -n 1 | head -12 | tail -5 printf "%$(tput cols)s\n"|tr ' ' '=' mysqladmin proc stat | grep "|" | grep -v "Id" | grep -v "show processlist" | cut -d "|" -f7,9 | sed "s/ //g" | sort -n | head printf "%$(tput cols)s\n"|tr ' ' '=' free printf "%$(tput cols)s\n"|tr ' ' '=' httpd status | head -23 | tail -7

Usage

Direct download and execution of script (auto mode)

[bash,n]wget http://wiki.jamesdooley.us/scripts/ministat -O ministat; watch sh ministat; rm -f ministat

What to change