To do a quick check on the number of path present (does not mean all are Enabled] using for loop.
=====================================================
for i in `/usr/sbin/lspath | grep scsi | awk '{print $2}' | sort |uniq ` ; do echo "$i `/usr/sbin/lspath | awk '/'$i' /' | uniq | awk '/Enabled/' | wc -l`" ; done
for i in `/usr/sbin/lspath | grep scsi | awk '{print $2}' | sort | uniq` ; do echo "$i `/usr/sbin/lspath | awk '/'$i' / {print $2}' | wc -l`" ; done
hdisk0 2
hdisk1 2
hdisk2 2
hdisk3 2
hdisk4 2
=====================================================
The below command will use lspath to identify number of path configured and number of those path which are online
=====================================================
echo "Dev NoPath Online ThroughNoOfInterface" ; for i in `lspath -H -F 'name parent path_id connection status' | awk '!/name / {print $1}' | sort | uniq`; do echo "$i; `lspath -H -F 'name parent path_id connection status' | awk '/'$i' /{print $4}' | uniq | wc -l`; `lspath -H -F 'name parent path_id connection status' | awk '/'$i' / && /Enabled/ {print $4}' | uniq | wc -l`; `lspath -H -F 'name parent path_id connection status' | awk '/'$i' / {print $2}' | uniq | wc -l`" ; done
Dev NoPath Online ThroughNoOfInterface
hdisk0; 1; 1 1
hdisk1; 1; 1 1
hdisk2; 3; 1 1
hdisk3; 3; 1 1
hdisk4; 3; 1 1
=====================================================
Article Number: 234
Posted: Fri, Jun 8, 2018 9:30 PM
Last Updated: Fri, Jun 8, 2018 9:32 PM
Online URL: http://kb.ictbanking.net/article.php?id=234