no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
— | monitors:mpstat [2011/09/01 14:42] (current) – created - external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== mpstat ====== | ||
+ | |||
+ | ^ Author | [[ etmsys@rit.edu | Eric Meddaugh ]] | | ||
+ | ^ Compatibility | Xymon 4.2 | | ||
+ | ^ Requirements | Solaris 10 | | ||
+ | ^ Download | None | | ||
+ | ^ Last Update | 2006-11-26 | | ||
+ | |||
+ | ===== Description ===== | ||
+ | |||
+ | Monitor zones status under Solaris 10. | ||
+ | |||
+ | ===== Installation ===== | ||
+ | |||
+ | ==== Client Configuration ==== | ||
+ | - Add script to client' | ||
+ | - Add the following to client hobbitlaunch.cfg < | ||
+ | [mpstat] | ||
+ | ENVFILE $HOBBITCLIENTHOME/ | ||
+ | CMD $HOBBITCLIENTHOME/ | ||
+ | LOGFILE $HOBBITCLIENTHOME/ | ||
+ | INTERVAL 5m | ||
+ | </ | ||
+ | |||
+ | ==== Server Configuration ==== | ||
+ | |||
+ | * Xymon only supports 1 data reader on the server. | ||
+ | # " | ||
+ | # If you want RRD graphs of your monitoring BB data, then you want to run this. | ||
+ | |||
+ | [rrddata] | ||
+ | ENVFILE / | ||
+ | NEEDS hobbitd | ||
+ | CMD hobbitd_channel --channel=data | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | </ | ||
+ | <note important> | ||
+ | * Add ' | ||
+ | 0.0.0.0 | ||
+ | </ | ||
+ | * Update hobbitgraph.cfg with: | ||
+ | <hidden onHidden=" | ||
+ | < | ||
+ | [mpstatusr] | ||
+ | TITLE CPU usr Utilitization | ||
+ | YAXIS % Used | ||
+ | FNPATTERN mpstat.CPU(.*).rrd | ||
+ | -u 100 | ||
+ | -r | ||
+ | DEF: | ||
+ | DEF: | ||
+ | LINE1: | ||
+ | GPRINT: | ||
+ | GPRINT: | ||
+ | GPRINT: | ||
+ | GPRINT: | ||
+ | |||
+ | [mpstatsys] | ||
+ | TITLE CPU sys Utilitization | ||
+ | YAXIS % Used | ||
+ | FNPATTERN mpstat.CPU(.*).rrd | ||
+ | -u 100 | ||
+ | -r | ||
+ | DEF: | ||
+ | DEF: | ||
+ | LINE1: | ||
+ | GPRINT: | ||
+ | GPRINT: | ||
+ | GPRINT: | ||
+ | GPRINT: | ||
+ | |||
+ | [mpstatwt] | ||
+ | TITLE CPU wt Utilitization | ||
+ | YAXIS % Used | ||
+ | FNPATTERN mpstat.CPU(.*).rrd | ||
+ | -u 100 | ||
+ | -r | ||
+ | DEF: | ||
+ | DEF: | ||
+ | LINE1: | ||
+ | GPRINT: | ||
+ | GPRINT: | ||
+ | GPRINT: | ||
+ | GPRINT: | ||
+ | |||
+ | [mpstatidl] | ||
+ | TITLE CPU idl Utilitization | ||
+ | YAXIS % Used | ||
+ | FNPATTERN mpstat.CPU(.*).rrd | ||
+ | -u 100 | ||
+ | -r | ||
+ | DEF: | ||
+ | DEF: | ||
+ | LINE1: | ||
+ | GPRINT: | ||
+ | GPRINT: | ||
+ | GPRINT: | ||
+ | GPRINT: | ||
+ | </ | ||
+ | </ | ||
+ | * Add ' | ||
+ | |||
+ | ===== Source ===== | ||
+ | |||
+ | ==== mpstat.sh ==== | ||
+ | <hidden onHidden=" | ||
+ | < | ||
+ | #!/bin/sh | ||
+ | |||
+ | ZONE=" | ||
+ | if [ -x "/ | ||
+ | | ||
+ | fi | ||
+ | |||
+ | if [ " | ||
+ | exit 0 | ||
+ | fi | ||
+ | |||
+ | PROCCNT=`/ | ||
+ | CPUS=`/ | ||
+ | |||
+ | nohup sh -c " | ||
+ | sleep 5 | ||
+ | |||
+ | if [ -f " | ||
+ | cat $BBTMP/ | ||
+ | |||
+ | echo "CPUs: ${CPUS}" | ||
+ | while read CPU MINF MJF XCAL INTR INTHR CSW ICSW MIGR SMTX SRW SYSCL USR SYS WT IDL ; do | ||
+ | |||
+ | echo " | ||
+ | echo " | ||
+ | echo " | ||
+ | echo " | ||
+ | done < $BBTMP/ | ||
+ | |||
+ | $BB $BBDISP "data $MACHINE.mpstat | ||
+ | |||
+ | `$CAT $BBTMP/ | ||
+ | " | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | fi | ||
+ | |||
+ | |||
+ | ##$BB $BBDISP " | ||
+ | </ | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | ==== rrd_data.pl ==== | ||
+ | <hidden onHidden=" | ||
+ | <code perl> | ||
+ | # | ||
+ | |||
+ | use strict; | ||
+ | |||
+ | # Input parameters: Hostname, testname (column), and messagefile | ||
+ | my $hostname=$ARGV[0]; | ||
+ | my $testname=$ARGV[1]; | ||
+ | my $fname=$ARGV[2]; | ||
+ | |||
+ | my ( $line, | ||
+ | my ( @loop, | ||
+ | |||
+ | open(IN," | ||
+ | while(chomp($line=< | ||
+ | | ||
+ | | ||
+ | | ||
+ | } | ||
+ | close(IN); | ||
+ | |||
+ | if ( $testname eq " | ||
+ | ## | ||
+ | ## Reads in the mpstat.sh from client | ||
+ | ## | ||
+ | if ( defined($buffer{" | ||
+ | |||
+ | @loop=split(' | ||
+ | print " | ||
+ | |||
+ | print " | ||
+ | print " | ||
+ | print " | ||
+ | print " | ||
+ | |||
+ | foreach $key ( @loop ) { | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | print " | ||
+ | | ||
+ | print " | ||
+ | } | ||
+ | |||
+ | } | ||
+ | } elsif ( $testname eq " | ||
+ | ## | ||
+ | ## Reads in the zonestat.sh from client | ||
+ | ## | ||
+ | if ( defined($buffer{" | ||
+ | @loop=split(' | ||
+ | |||
+ | print " | ||
+ | print " | ||
+ | print " | ||
+ | print " | ||
+ | print " | ||
+ | |||
+ | foreach $key ( @loop ) { | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | $tmp = (split('/', | ||
+ | print " | ||
+ | | ||
+ | print " | ||
+ | } | ||
+ | |||
+ | } | ||
+ | } | ||
+ | |||
+ | exit 0; | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | ===== Known Bugs and Issues ===== | ||
+ | |||
+ | * No known bugs | ||
+ | |||
+ | ===== To Do ===== | ||
+ | |||
+ | ===== Credits ===== | ||
+ | |||
+ | ===== Changelog ===== | ||
+ | |||
+ | * **2006-11-26** | ||
+ | * Initial release | ||