Mpstat.sh

From PeformIQ Upgrade
Revision as of 10:52, 17 April 2013 by PeterHarding (talk | contribs) (Created page with "=Automated mpstat Collector= <pre> #!/bin/sh # #-------------------------------------------------------------------------- PERIOD=720 # Minutes DELAY=60 # Seconds #----...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Automated mpstat Collector

#!/bin/sh
#
#--------------------------------------------------------------------------

PERIOD=720  # Minutes
DELAY=60    # Seconds

#--------------------------------------------------------------------------

SECONDS=`expr $PERIOD '*' 60`
CNT=`expr $SECONDS '/' $DELAY`

TS=`date '+%Y%m%d_%H%M'`
LOG="mpstat_$TS.log"

#--------------------------------------------------------------------------

echo "==> Count: $CNT   Delay: $DELAY"   >  $LOG

date                                     >> $LOG
mpstat $DELAY $CNT                       >> $LOG &

#--------------------------------------------------------------------------