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
AIX Encrypted File System
Viewed 5807 times since Tue, Jul 17, 2018
AIX: How to determine which application created the OS core file
Viewed 2434 times since Mon, Jun 11, 2018
AIX oslevel version OS
Viewed 4864 times since Wed, Apr 17, 2019
Many Choices for AIX File Integrity
Viewed 2659 times since Wed, May 30, 2018
AIX, Networking Etherchannel failover testing
Viewed 2571 times since Fri, Apr 19, 2019
AIX 6.1: Extend VG 0516-1714 extendvg 0516-1254 extendvg
Viewed 4470 times since Fri, Jul 6, 2018
AIX, Security, System Admin↑ Clearing password history
Viewed 2360 times since Fri, Apr 19, 2019
AIX Different Commands For Paging Space Administration swap file create
Viewed 7370 times since Thu, Aug 1, 2019
Topics: AIX, Networking, System Admin
Viewed 11488 times since Fri, Apr 19, 2019
IBM AIX commands you should not leave home without
Viewed 7096 times since Mon, Jun 11, 2018