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 FC Performance improvements for IBM AIX FC and FCoE device driver stacks
Viewed 5715 times since Fri, Jan 31, 2020
AIX: How to manage network tuning parameters
Viewed 3763 times since Mon, Jun 11, 2018
HMC: HMC and LPAR management commands
Viewed 7119 times since Sun, Jun 3, 2018
Working with Virtual media library on VIO servers
Viewed 15135 times since Thu, Feb 21, 2019
AIX - How to monitor CPU usage
Viewed 27024 times since Fri, Jun 8, 2018
AIX routing - How Do I Compare ODM with the Current Routing Table?
Viewed 2593 times since Mon, Jul 29, 2019
Restoring mksysb
Viewed 3471 times since Wed, May 30, 2018
Create a mksysb + SPOT using NIM (CLI)
Viewed 5534 times since Tue, Jul 17, 2018
Remove disk from volumegroup in AIX
Viewed 6756 times since Tue, Apr 16, 2019
How to deal with performance monitoring in AIX ?
Viewed 7777 times since Fri, May 25, 2018