欢迎来到天天文库
浏览记录
ID:20217056
大小:72.50 KB
页数:42页
时间:2018-10-09
《有用监控系统性能脚本》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、有用的监控系统性能的脚本一些有用的监控系统性能的脚本aiostat.shconfig.shemstat.shfilemon.shiostat.shiptrace.shmonitor.shnetstat.shnfsstat.shperfpmr.shpprof.shps.shquicksnap.shsar.shsvmon.shtcpdump.shtprof.shtrace.shvmstat.sh#######################aiostat.sh########################!/bi
2、n/ksh##COMPONENT_NAME:perfpmr##FUNCTIONS:none##ORIGINS:27##(C)COPYRIGHTInternationalBusinessMachinesCorp.2000#AllRightsReserved##USGovernmentUsersRestrictedRights-Use,duplicationor#disclosurerestrictedbyGSAADPScheduleContractwithIBMCorp.##aiostat.sh##invokei
3、ostatforspecifiedintervalandcreateintervalandsummaryreports#exportLANG=Cif[$#-ne1];thenecho"aiostat.sh:usage:aiostat.shtime"echo"timeistotaltimeinsecondstobemeasured."exit1fi#determineintervalandcountif[-lt601];thenINTERVAL=10letCOUNT=/10elseINTERVAL=60letCO
4、UNT=/60fi#needcount+1intervalsforIOSTATletCOUNT=COUNT+1echo"AIOSTATINTERVALOUTPUT(aiostat$INTERVAL$COUNT)">aiostat.intecho"Hostname:"`hostname-s`>>aiostat.intecho"Timebeforerun:"`date`>>aiostat.inttrap'kill-9$!'12324echo"AIOSTAT:StartingAIO
5、StatisticsCollector[AIOSTAT]...."ifwhenceaiostat>/dev/null;thenaiostatexe=aiostatelseaiostatexe=$PERFPMRDIR/aiostatfi$aiostatexe>/dev/null2>&1if[$?!=0];thenecho"aiostatfailed-AIOmaynotbeenabled">>aiostat.intexit0fi$aiostatexe-t10000$INTERVAL$COUNT>>aiostat.i
6、ntwaitrequiredintervalecho"AIOSTAT:Waitingformeasurementperiodtoend...."wait#savetimeafterrunecho"Timeafterrun:"`date`>>aiostat.intecho"AIOSTAT:Intervalreportisinfileaiostat.int"#######################config.sh########################!/bin/ksh##COMPONE
7、NT_NAME:perfpmr##FUNCTIONS:none##ORIGINS:IBM##(C)COPYRIGHTInternationalBusinessMachinesCorp.2000#AllRightsReserved##USGovernmentUsersRestrictedRights-Use,duplicationor#disclosurerestrictedbyGSAADPScheduleContractwithIBMCorp.##config.sh##invokeconfigurationco
8、mmandsandcreatereport##set-xexportLANG=CCFGOUT=config.sumPERFPMRDIR=`whence`PERFPMRDIR=`/usr/bin/ls-l$PERFPMRDIR
9、/usr/bin/awk'{print$NF}'`PERFPMRDIR=`/usr/bin/dirname$PERFPMRDIR`;exportPERFPMRDI
此文档下载收益归作者所有