Script to check the SAN paths.

Hello All,
We have a script which when run on the host gives us the status of the internal and SAN attached disks, its paths and other information. The output of which is as follows:

Nm DEVICE VEND PROD LunID SYM DevID DISKGROUP SIZE N E
----------------------------------------------------------------------------------------
1. cciss/c0d0 HP LOGICAL VOLUME N/A N/A N/A 68.33 1 1
2. sdb EMC SYMMETRIX 27 7300 251 app_DG 50.58 2 2
----------------------------------------------------------------------------------------
N =Number of Paths (NE =Not Enabled)
E =Number of Currently Enabled Paths

================================================== =======

The requirement now is to create another script which will check the SAN path status from the above script. If the no of Paths shows less than 1 for SAN disks, then I should get an alert that SAN path failed or if all the path is ok, then SAN path is ok.

Thanking in anticipation.

Regards

From the sample output you provided , which one gives the information about , whether the path is OK or not?

I'm sorry but not much clear with input and which columns to check.

Hello Panyam,
Sorry if I have not been clear in my previous post. The script gives us a status of all the internal and external disks and also the no of paths visible to the disks. In the eg below, column N=Number of Paths and column E =Number of Currently Enabled Paths.

I would thus like to create a script which would extract the information of the above two parameters i.e. N and E. If the value is 2, it means successful and <2 means that all the paths are not available.This should be only for SAN disks.

Hope this helps.

Thanking in anticipation.

So, what is the output you are expecting from your input(which you posted in your last post)?