Comments (5)
  • Add a Comment
  • Edit
  • More Actions v
  • Quarantine this Entry

1 zvad commented Permalink

Great script, but imho the awk, grep and sed unnecessary. My simplified version: <div>&nbsp;</div> lsdev -p $1 | awk '{print $1}' lsdev -p $1 -F name <div>&nbsp;</div> lsdev | grep "^$dev " | sed "s/^[^ ]* *//" lsdev -l $dev -F "status description" <div>&nbsp;</div> Z

2 zvad commented Permalink

Sorry for bad formatting, so ... <div>&nbsp;</div> lsdev -p $1 | awk '{print $1}' -----------&gt; lsdev -p $1 -F name <div>&nbsp;</div> lsdev | grep "^$dev " | sed "s/^[^ ]* *//" -----------&gt; lsdev -l $dev -F "status location description" <div>&nbsp;</div> Z

3 brian_s commented Permalink

Zvad, thanks for the comments and suggestions. Your first suggestion is a good idea and I updated the posting with that. Your second suggestion breaks having everything in the lsdev output line up in columns like it does with the original script.

4 frenger commented Permalink

Another great script from my favorite AIX-scripting-Admin. I was searching for something similar for years. I must admit that in our still growing full virtualized AIX environment this Information is getting more and more somehow obsolete but still useful on older or fullsystem partitions. Nice work Brian! <br /> Cheers Sebastian

5 zentac commented Permalink

Useful but not 100% accurate as it wont report multipathed disks <div>&nbsp;</div> for example hdisk0 is on 2 paths <br /> # lspath -l hdisk0 <br /> Enabled hdisk0 fscsi0 <br /> Enabled hdisk0 fscsi1 <br /> but your script will only report its partent on fscsi0 <div>&nbsp;</div> | | |---fcs0 Available C6-T1 Virtual Fibre Channel Client Adapter <br /> | | | |---fscsi0 Available C6-T1-01 FC SCSI I/O Controller Protocol Device <br /> | | | | |---hdisk0 Available C6-T1-01 Hitachi MPIO Disk VSP (Fibre) <br /> | | |---fcs1 Available C7-T1 Virtual Fibre Channel Client Adapter <br /> | | | |---fscsi1 Available C7-T1-01 FC SCSI I/O Controller Protocol Device