IMB主机磁盘内存空间检查脚本.doc_第1页
IMB主机磁盘内存空间检查脚本.doc_第2页
IMB主机磁盘内存空间检查脚本.doc_第3页
IMB主机磁盘内存空间检查脚本.doc_第4页
全文预览已结束

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

#!/usr/bin/kshsyserrdate=date +%m/%derrcount=0STATUS=HOSTS=hostnameSCRIPT=basename $0REPORT=/tmp/report.txt#FS percentFILESYSTEM_CHECK() FS=df -k|sed 1d|awk sub(%,$4) if ($4 80) print $7|xargsfor i in $FSdoecho The $i filesystem percent more than %80 ndone#Active VGVG_CHECK() echo *ACTIVE VG*nACVG=lsvg -o|xargsecho Active VG is: $ACVGn#LV_CHECK echo *PROBLEM LV*nBLV=lsvg -l rootvg|grep -E jfs|jfs2|raw|grep -v N/A|awk if ($6/closed/ | $6/stale/) print $1|xargsfor i in $BLVdoecho The $i filesystem has a problem!ndone#Problem diskDISK_CHECK() echo *Problem disk*ndisk=lsvg -o|lsvg -ip|awk $1/hdisk/ & $2!/active/ print $1|xargsif $disk != thenfor i in $diskdoecho The $disk in $i has a problem!ndonefi#error reportERROR_CHECK() echo *error report*nerrdate=errpt |grep -v IDENTIFIER |awk print $2 |cut -c 1-4 |xargsfor syserrFor1 in $errdatedoif $syserrFor1 = $syserrdate thennewerrcount=expr $errcount + 1errcount=$newerrcountfidoneif $errcount -eq 0 thenecho Today error is add $errcount yesterdaynelseecho Today errors is add $errcount than yesterdaynfi#error detailerrors=errpt -dH -TPERMif -z $errors thenecho The Hardware is $STATUS:-NORMAL.nelseecho The permanent error of Hardware as fllow:nerrpt -dH -TPERMfi#Check DatabaseDB_CHECK() su - oracle -c lsnrctl status|grep -i no listenerif $? = 1 thenecho The listener status is $STATUS:-NORMALnelseecho The listener has a problem!nfi#echo The listener status is :su - oracle -c lsnrctl statusn#echo Database status is:#su - oracle -c sqlplus -s /nologEOF|sed /$/d#conn /as sysdba#select log_mode,name,open_mode from v$database;#quit#EOFsu - oracle -c sqlplus -s /nolog/dev/null|grep -i ORACLE not availableconn /as sysdbaselect log_mode,name,open_mode from v$database;quitEOFif $? = 0 thenecho The database not available!nelseecho The database is NORMALnfi#HBA card linkHARDWARE_CHECK() fget_config -Av|grep -i dacnone/dev/nullif $? -eq 0 thenecho The storage link has problem!elseecho The storage link NORMAL!fi#HACMP CHECKHA_CHECK() echo The HACMP status is: lssrc -g cluster|sed 1d#CHECK SNASNA_CHECK() echo The SNA LINK STATUS is:sna -d lecho The SNA SESSION has problem as fllows:nsna -d sl|tail +4|awk BEGIN OFS=t; print name,tactsess,actconwif ($7 = 0 & $8 = 0) print $1, $7,$8#CHECK CICSCICS_CHECK() echo The not active CICS is as fllows:nlssrc -a|grep cics|awk $3!/active/ print $1echo $SCRIPT $REPORTecho $HOSTS $REPORTecho IP ADDRESS:ifconfig -a|grep -w inet|grep -v 127.0.0.1|awk print $2 $REPORTnetstat -v|grep -E STAT|Link $REPORToslevel $REPORTFILESYSTEM_CHECK $REPORT 2&1VG_CHECK $REPORT 2&1DISK_CHECK $REPORT 2&1ERROR_CHECK $REPORT 2&1DB_CHECK $REPORT 2&1HARDWARE_CHECK $REPORT 2&1lslpp -L|grep cluster /dev/nullif $? -eq 0 thenHA_CHECK $REPORT 2&1elseecho This machine not install HACMP $REPORTfilslpp -L|grep sna.rte /dev/nullif $? -eq 0 thenSNA_CHECK $REPORT 2&1elseecho This

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论