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};

####

0 (0)
Article Rating (No Votes)
Rate this article
Attachments
There are no attachments for this article.
Comments
There are no comments for this article. Be the first to post a comment.
Full Name
Email Address
Security Code Security Code
Related Articles RSS Feed
“Yes/No” in Bash Script – Prompt for Confirmation
Viewed 30005 times since Mon, Feb 18, 2019
Mirroring session (TTY) on AIX using portmir
Viewed 9094 times since Thu, Feb 21, 2019
Creating Normal,Big,Scalable VG on AIX
Viewed 14278 times since Fri, Feb 1, 2019
Script to reset NIM state and deallocate resources
Viewed 2194 times since Thu, Feb 21, 2019
Working with Virtual media library on VIO servers
Viewed 14028 times since Thu, Feb 21, 2019
AIX Replacing a failed disk (rootvg)
Viewed 8247 times since Tue, Jul 17, 2018
AIX Migrating from SDDPCM to AIXPCM (the easy way)
Viewed 19617 times since Mon, Dec 31, 2018
Mirroring the rootvg Volume Group for AIX
Viewed 3722 times since Mon, May 21, 2018
Many Choices for AIX File Integrity
Viewed 2517 times since Wed, May 30, 2018
How do I analyze and debug core files on AIX
Viewed 5899 times since Thu, Feb 21, 2019