Script HW/SW AIX



####


pwd;
clear;
SERVER=`hostname`
sleep 2;
>/tmp/${SERVER};
echo "##########################" >> /tmp/${SERVER};
echo "DATE: " >> /tmp/${SERVER};
echo "---------------------------------------------------------------------" >> /tmp/${SERVER};
date >> /tmp/${SERVER};
/nas/install/scripts/disk_size.sh >> /tmp/${SERVER};
echo "---------------------------------------------------------------------" >> /tmp/${SERVER};
echo "HOSTNAME: " >> /tmp/${SERVER};
echo "---------------------------------------------------------------------" >> /tmp/${SERVER};
hostname >> /tmp/${SERVER};
echo "---------------------------------------------------------------------" >> /tmp/${SERVER};
echo "NETWORK: " >> /tmp/${SERVER};
echo "---------------------------------------------------------------------" >> /tmp/${SERVER};
ifconfig -a >> /tmp/${SERVER};
echo "---------------------------------------------------------------------" >> /tmp/${SERVER};
for i in `lsdev -Cc adapter | grep "^ent" |awk '{ print $1 }'` ; do echo ${i} ; done >> /tmp/${SERVER};
echo "---------------------------------------------------------------------" >> /tmp/${SERVER};
echo "LAN ATTR: " >> /tmp/${SERVER};
echo "---------------------------------------------------------------------" >> /tmp/${SERVER};
for i in `lsdev -Cc adapter | grep "^ent" | awk '{ print $1 }' | tr -d 't'` ; do echo "####" ; lsattr -EHl ${i} ; echo "####" ; done >> /tmp/${SERVER};
for i in `lsdev -Cc adapter | grep "^ent" | awk '{ print $1 }'` ; do echo "####" ; lsattr -EHl ${i} ; echo "####" ;done >> /tmp/${SERVER};
echo "---------------------------------------------------------------------" >> /tmp/${SERVER};
echo "VLANs: " >> /tmp/${SERVER};
echo "---------------------------------------------------------------------" >> /tmp/${SERVER};
for i in `lsdev -Cc adapter | grep "^ent" | awk '{ print $1 }'` ; do entstat -d ${i} | grep 'Port VLAN ID'; done >> /tmp/${SERVER};
echo "---------------------------------------------------------------------" >> /tmp/${SERVER};
echo "ROUTING: " >> /tmp/${SERVER};
echo "---------------------------------------------------------------------" >> /tmp/${SERVER};
netstat -nr >> /tmp/${SERVER};
netstat -in >> /tmp/${SERVER};
echo "---------------------------------------------------------------------" >> /tmp/${SERVER};
echo "VPD Network " >> /tmp/${SERVER};
echo "---------------------------------------------------------------------" >> /tmp/${SERVER};
for i in `lsdev -Cc adapter | grep "^ent" | awk '{ print $1 }'` ; do echo "####" ; lscfg -vpl ${i}; echo "####" ; done >> /tmp/${SERVER};
echo "---------------------------------------------------------------------" >> /tmp/${SERVER};
echo "ARP: " >> /tmp/${SERVER};
echo "---------------------------------------------------------------------" >> /tmp/${SERVER};
arp -a | grep "at" >> /tmp/${SERVER};
echo "---------------------------------------------------------------------" >> /tmp/${SERVER};
echo "FC: " >> /tmp/${SERVER};
echo "---------------------------------------------------------------------" >> /tmp/${SERVER};
for i in `lsdev -Cc adapter | grep "^fcs" |awk '{ print $1 }'` ; do echo ${i} ; done >> /tmp/${SERVER};
for i in `lsdev -Cc adapter | grep "^fcs" |awk '{ print $1 }'` ; do fcstat ${i} ; done >> /tmp/${SERVER};
echo "---------------------------------------------------------------------" >> /tmp/${SERVER};
echo "FC ATTR: " >> /tmp/${SERVER};
echo "---------------------------------------------------------------------" >> /tmp/${SERVER};
for i in `lsdev -Cc adapter | grep "^fcs" | awk '{ print $1 }'` ; do echo "####" ; lsattr -EHl ${i} ; echo "####" ; done >> /tmp/${SERVER};
for i in `lsdev -Cc adapter | grep "^fcs" | awk '{ print $1 }' | tr -d 'fcs'` ; do echo "####" ; lsattr -EHl fscsi${i} ; echo "####" ; done >> /tmp/${SERVER};
echo "---------------------------------------------------------------------" >> /tmp/${SERVER};
echo "VPD FC: " >> /tmp/${SERVER};
echo "---------------------------------------------------------------------" >> /tmp/${SERVER};
for i in `lsdev -Cc adapter | grep "^fcs" | awk '{ print $1 }'` ; do echo "####" ; lscfg -vpl ${i} | grep "Network Address"; echo "####" ; done >> /tmp/${SERVER};
for i in `lsdev -Cc adapter | grep "^fcs" | awk '{ print $1 }'` ; do echo "####" ; lscfg -vpl ${i} ; echo "####" ; done >> /tmp/${SERVER};
for i in `lsdev -Cc adapter | grep "^fcs" | awk '{ print $1 }'` ; do echo "####" ; fcstat ${i} ; echo "####" ; ; done >> /tmp/${SERVER};
echo "---------------------------------------------------------------------" >> /tmp/${SERVER};
echo "LSPATH FC: " >> /tmp/${SERVER};
echo "---------------------------------------------------------------------" >> /tmp/${SERVER};
lspath -F "name:connection:parent:path_status:status:path_id" >> /tmp/${SERVER};
echo "---------------------------------------------------------------------" >> /tmp/${SERVER};
echo "LSMPIO: " >> /tmp/${SERVER};
echo "---------------------------------------------------------------------" >> /tmp/${SERVER};
lsmpio >> /tmp/${SERVER};
echo "---------------------------------------------------------------------" >> /tmp/${SERVER};
echo "##########################" >> /tmp/${SERVER};
pwd;
cat /tmp/${SERVER};

####



Article Number: 218
Posted: Mon, Jun 4, 2018 2:02 PM
Last Updated: Mon, Jun 4, 2018 2:02 PM

Online URL: http://kb.ictbanking.net/article.php?id=218