AIX: Script to create a file with commands to remove missing & failed paths

To create a file with commands to remove the missing paths

1
2
3
4
5
6
7
8
9
#!/bin/sh
# rmpaths
>xrmpaths
echo "#!/bin/sh" >>xrmpaths
disks=$(lspv | awk '{print $1}')
for loop in $disks
do
lspath -l $loop -H -F "name:parent:connection:status" |grep Missing| awk -F: '{print "rmpath -dl",$1,"-p", $2, "-w", $3}'>>xrmpaths
done

 

To create a file with commands to remove the failed paths

1
2
3
4
5
6
7
8
9
#!/bin/sh
# rmpaths
>xrmpaths
echo "#!/bin/sh" >>xrmpaths
disks=$(lspv | awk '{print $1}')
for loop in $disks
do
lspath -l $loop -H -F "name:parent:connection:status" |grep Failed| awk -F: '{print "rmpath -dl",$1,"-p", $2, "-w", $3}'>>xrmpaths
done
5 (1)
Article Rating (1 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
Part 3, Monitoring your network packets and tuning the network
Viewed 6970 times since Mon, Jun 4, 2018
AIX Migrating from SDDPCM to AIXPCM (the easy way)
Viewed 21275 times since Mon, Dec 31, 2018
AIX, Storage, System Admin↑ Identifying a Disk Bottleneck Using filemon
Viewed 10896 times since Fri, Apr 19, 2019
How to Maintain a Virtual I/O Server With FBO Part II
Viewed 11425 times since Wed, Jun 5, 2019
AIX - How to get network speed and statistic of ethernet adapter in AIX
Viewed 16742 times since Fri, Jun 8, 2018
Calculate hdisk READ / WRITE throughput (sequential IO) from AIX systems
Viewed 3455 times since Thu, Feb 21, 2019
Do you Know These 5 Use of V$session View ?
Viewed 160050 times since Thu, Jun 21, 2018
AIX: How to determine which application created the OS core file
Viewed 3258 times since Mon, Jun 11, 2018
IBM V7000f Performance Test with Vdbench Tool on IBM AIX
Viewed 17298 times since Thu, Jan 23, 2020
AIX: How to manage network tuning parameters
Viewed 7233 times since Mon, Jun 11, 2018