OS AIX SYSTEM CHECK SCRIPT
2020.04.10 18:56
#!/bin/ksh
############################################################
# AIX SYSTEM CHECK SCRIPT #
############################################################
export LANG=C
DATE=`date +%m%d%y`
HOSTNAME=`hostname`
REPORT=./checklist.$HOSTNAME.$DATE.txt
HACMPSNAP=/usr/es/sbin/cluster/snapshots/snap.$HOSTNAME.$DATE.*
exec > $REPORT 2>&1
cd /tmp
echo "==================================================================================="
echo "HOSTNAME `hostname` "
echo "==================================================================================="
echo "Basic Info"
echo "Number of CPU `lsdev -C|grep proc|grep Ava|wc -l`"
echo "Memory Size `bootinfo -r` byte "
echo "AIX Level `oslevel -r`"
echo "Kernel Info `bootinfo -K` bit"
echo "Boot Disk `bootinfo -b`"
echo "Model Name `lsattr -El sys0|grep modelname |awk '{print $2 }'`"
echo "Serial No `lsattr -El sys0|grep systemid |awk '{print $2 }'`"
echo "fwversion `lsattr -El sys0|grep fwversion |awk '{print $2 }'`"
echo "AIX Level `oslevel -r`"
echo "AIX Level `instfix -i |grep ML`"
echo "==================================================================================="
lsattr -El sys0
echo "==================================================================================="
echo " VolumeGroup Info "
echo "==================================================================================="
lsvg
echo "--Varyonvg--------------------------------------------------------------------------------"
lsvg -o
echo "==================================================================================="
lsvg -o >/tmp/lsvg.out
lspv |awk '{print $1 }' >/tmp/lspv.out
for i in `cat /tmp/lsvg.out`
do
echo "----`echo $i` Logical Info----"
lsvg $i
echo "------------------------------------------------------------------------------------------"
lsvg -l $i
echo "------------------------------------------------------------------------------------------"
done
echo "==================================================================================="
echo " PV Info"
echo "==================================================================================="
lspv
echo "------------------------------------------------------------------------------------------"
for i in `cat /tmp/lspv.out`
do
echo "----`echo $i` Info----"
lspv $i
echo "------------------------------------------------------------------------------------------"
lspv -l $i
echo "------------------------------------------------------------------------------------------"
done
echo " "
echo "==============================================================================="
echo " Filesystem Info"
echo "==============================================================================="
echo " "
lsfs
echo "------------------------------------------------------------------------------------------"
df -g
echo " "
echo "==============================================================================="
echo " Network Info"
echo "==============================================================================="
lsdev -Cc adapter|grep ent
lsdev -Cc adapter|grep ent |awk '{print $1 }' | while read ENT
do
echo "------------------------------------------------------------------------------------------"
echo $ENT
lsattr -El $ENT
done
echo "------------------------------------------------------------------------------------------"
ifconfig -a
echo "------------------------------------------------------------------------------------------"
lsattr -El inet0
echo "------------------------------------------------------------------------------------------"
netstat -rn
echo "--DNS INFO & netsvc.conf------------------------------------------------------------------"
cat /etc/resolv.conf
grep hosts /etc/netsvc.conf
echo "--Hardware info------------------------------------------------------------------"
prtconf
echo "--N/W parameter---------------------------------------------------------------------------"
echo " Thewall : `no -a |grep thewall |awk '{print $3}'` "
echo " sb_max : `no -a |grep sb_max |awk '{print $3}'` "
echo " rfc1323 : `no -a |grep rfc1323 |awk '{print $3}'` "
echo " ipforwarding : `no -a |grep ipforwarding |awk '{print $3}'` "
echo " tcp_pmtu_discover : `no -a |grep tcp_pmtu_discover |awk '{print $3}'` "
echo " udp_pmtu_discover : `no -a |grep udp_pmtu_discover |awk '{print $3}'` "
echo " sendspace :"
no -a |grep sendspace |awk '{print $1, $3}'
echo " recvspac : "
no -a |grep recvspace |awk '{print $1, $3}'
echo "--/etc/rc.net parameter-------------------------------------------------------------------"
grep "no -o" /etc/rc.net
echo " "
echo " "
echo "==============================================================================="
echo " Adapter Info"
echo "==============================================================================="
echo " "
lsslot -c pci
echo " "
lsdev -Cc adapter
echo " "
lsdev -Cc tape
echo " "
echo "=============================================================================="
echo " Page Space Info"
echo "=============================================================================="
echo " "
lsps -a
echo " "
echo "=============================================================================="
echo " Processor Info"
echo "=============================================================================="
echo " "
ps aux
echo " "
echo "=============================================================================="
echo " INSTALLED RESOURCE LIST "
echo "=============================================================================="
echo " "
echo "--lscfg ----------------------------------------------------------------------------------"
lscfg
echo "--lscfg -v -------------------------------------------------------------------------------"
lscfg -v
echo "------------------------------------------------------------------------------------------"
echo " "
echo "============================================================================="
echo " Subsystem "
echo "============================================================================="
echo " "
lssrc -a
echo " "
echo "============================================================================="
echo " HACMP "
echo "============================================================================="
echo " "
echo " Cluster info "
/usr/es/sbin/cluster/utilities/cllsclstr
echo " "
echo " Cluster Node info "
/usr/es/sbin/cluster/utilities/cllsnode
echo " "
echo " Cluster Node interface info "
/usr/es/sbin/cluster/utilities/cllsif
echo " "
echo " Cluster resources group "
/usr/es/sbin/cluster/utilities/cllsgrp
echo " "
echo " Cluster resource group information "
/usr/es/sbin/cluster/utilities/cllsgrp | while read REG
do
/usr/es/sbin/cluster/utilities/clshowres -g $REG
done
echo " "
echo "============================================================================"
echo " rc.net & rc.tcpip & inittab & crontab list"
echo "============================================================================"
echo "--rc.net---------------------------------------------------------------------------------"
cat /etc/rc.net
echo "--rc.tcpip ------------------------------------------------------------------------------"
cat /etc/rc.tcpip
echo "--inittab -------------------------------------------------------------------------------"
cat /etc/inittab
echo "--crontab -l -------------------------------------------------------------------------------"
lsuser ALL |awk '{print $1}'|while read USER
do
echo "-- $USER -------------------------------------------------------------------------------"
su - $USER -c crontab -l
done
echo " "
echo "============================================================================="
echo " lpp list & check & errpt list"
echo "============================================================================="
echo " "
echo "--lppchk -v ------------------------------------------------------------------------------"
lppchk -v
echo "--lppchk -f ------------------------------------------------------------------------------"
lppchk -f
echo "--errpt ----------------------------------------------------------------------------------"
lslpp -l
echo "--errpt ----------------------------------------------------------------------------------"
errpt -s 0101000006
echo "============================================================================"
댓글 0
번호 | 제목 | 날짜 | 조회 수 |
---|---|---|---|
155 | Linux system service bug gives you root on every major distro | 2022.02.05 | 205 |
154 | Red Hat Enterprise Linux technology capabilities and limits | 2021.05.13 | 117 |
153 | weblogic wlst 기반 암호화파일 복호화 (AES) | 2021.04.06 | 225 |
152 | weblogic admin 패스워드 변경 방법 | 2021.04.06 | 137 |
151 | vi, vim ^M 제거 | 2021.04.02 | 94 |
150 | wmic useraccount list brief | 2021.04.01 | 155 |
149 | Jeus7 Getting Start Guide | 2021.03.09 | 107 |
148 | hp-ux glance Memory Sort | 2021.02.26 | 217 |
147 | 외부로 통신이 되지 않을 때 가지고 있는 CD-ROM으로 yum 사용하는 방법 | 2020.08.26 | 792 |
146 | AIX 내부적인 Memory 관리 방법 | 2020.04.15 | 546 |
» | AIX SYSTEM CHECK SCRIPT | 2020.04.10 | 2510 |
144 | 아파치 톰캣 AJP 프로토콜에 '고스트캣(GhostCat)' 취약점 | 2020.04.06 | 1071 |
143 | top을 통해 살펴보는 프로세스 정보들 | 2020.03.05 | 396 |
142 | netstat | 2020.02.05 | 316 |
141 | Linux Cache Memory Clear | 2020.01.20 | 387 |