自己把其中的脚本都导了出来:aiostat.sh
config.sh
emstat.sh
filemon.sh
iostat.sh
iptrace.sh
monitor.sh
netstat.sh
nfsstat.sh
perfpmr.sh
pprof.sh
ps.sh
quicksnap.sh
sar.sh
svmon.sh
tcpdump.sh
tprof.sh
trace.sh
vmstat.sh
#######################
aiostat.sh
#######################
#!/bin/ksh
#
# COMPONENT_NAME: perfpmr
#
# FUNCTIONS: none
#
# ORIGINS: 27
#
# (C) COPYRIGHT International Business Machines Corp. 2000
# All Rights Reserved
#
# US Government Users Restricted Rights - Use, duplication or
# disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
#
# aiostat.sh
#
# invoke iostat for specified interval and create interval and summary reports
#
export LANG=C
if [ $# -ne 1 ]; then
echo "aiostat.sh: usage: aiostat.sh time"
echo " time is total time in seconds to be measured."
exit 1
fi
# determine interval and count
if [ -lt 601 ]; then
INTERVAL=10
let COUNT=/10
else
INTERVAL=60
let COUNT=/60
fi
# need count+1 intervals for IOSTAT
let COUNT=COUNT+1
echo "nnn A I O S T A T I N T E R V A L O U T P U T (aiostat $INTERVAL $COUNT)n" > aiostat.int
echo "nnHostname: " `hostname -s` >> aiostat.int
echo "nnTime before run: " `date` >> aiostat.int
trap 'kill -9 $!' 1 2 3 24
echo "n AIOSTAT: Starting AIO Statistics Collector [AIOSTAT]...."
if whence aiostat >/dev/null; then
aiostatexe=aiostat
else
aiostatexe=$PERFPMRDIR/aiostat
fi
$aiostatexe >/dev/null 2>&1
if [ $? != 0 ]; then
echo "aiostat failed - AIO may not be enabled" >> aiostat.int
exit 0
fi
$aiostatexe -t 10000 $INTERVAL $COUNT >> aiostat.int &
# wait required interval
echo " AIOSTAT: Waiting for measurement period to end...."
wait
# save time after run
echo "nnTime after run : " `date` >> aiostat.int
echo " AIOSTAT: Interval report is in file aiostat.int"
#######################
config.sh
#######################
#!/bin/ksh
#
# COMPONENT_NAME: perfpmr
#
# FUNCTIONS: none
#
# ORIGINS: IBM
#
# (C) COPYRIGHT International Business Machines Corp. 2000
# All Rights Reserved
#
# US Government Users Restricted Rights - Use, duplication or
# disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
#
# config.sh
#
# invoke configuration commands and create report
#
#set -x
export LANG=C
CFGOUT=config.sum
PERFPMRDIR=`whence `
PERFPMRDIR=`/usr/bin/ls -l $PERFPMRDIR |/usr/bin/awk '{print $NF}'`
PERFPMRDIR=`/usr/bin/dirname $PERFPMRDIR` ; export PERFPMRDIR
BIN=/usr/bin
if [ "$GETGENNAMES" = 0 ]; then
nogennames=1
fi
unset EXTSHM
show_usage()
{
echo "Usage: config.sh [-aglps]"
echo "t-a do not run lsattr on every device"
echo "t-g do not run gennames command"
echo "t-l do not run detailed LVM commands on each LV"
echo "t-p do not run lspv on each disk"
echo "t-s do not run SSA cfg commands"
echo "toutput is generated in $CFGOUT"
exit 1
}
收起