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
LVM: Display basic information about Physical Volumes, Volume Groups and Logical Volumes
Viewed 2818 times since Sun, Jun 3, 2018
Top 4 Reasons for Node Reboot or Node Eviction in Real Application Cluster (RAC) Environment
Viewed 86259 times since Thu, Jun 21, 2018
Mirroring the rootvg Volume Group for AIX 4.1/4.2
Viewed 2964 times since Mon, May 21, 2018
“Yes/No” in Bash Script – Prompt for Confirmation
Viewed 30816 times since Mon, Feb 18, 2019
AIX, Security, System Admin↑ Clearing password history
Viewed 2243 times since Fri, Apr 19, 2019
AIX - How to get Memory infomation
Viewed 9642 times since Fri, Jun 8, 2018
Transform XML to CSV Format | Unix String Pattern Manipulation The Ugly Way
Viewed 4987 times since Sun, Jan 9, 2022
A Change to the SMT Mode Default in POWER9
Viewed 5169 times since Fri, Jan 18, 2019
IBM AIX MPIO: Best practices and considerations
Viewed 11115 times since Wed, May 30, 2018
30 Examples for Awk Command in Text Processing
Viewed 14441 times since Sat, Nov 24, 2018