Operating System - HP-UX
1846629 Members
1523 Online
110256 Solutions
New Discussion

ioscan script help needed

 
George_Dodds
Honored Contributor

ioscan script help needed

Hi

I need a simple script to automate checking to see if disks are attached to hba's on a server.

This is how i would do it manually

ioscan -funC fc

Take note of the hardware paths

ioscan -funC disk

Check hardware paths against the ioscan -funC fc output to see that both cards are being used.

Thanks in advance

George
4 REPLIES 4
OFC_EDM
Respected Contributor

Re: ioscan script help needed

I don't have access to an HP system today.
Can you post output of each command?

Then I can take a stab at a script.

Cheers
The Devil is in the detail.
Ralph Grothe
Honored Contributor

Re: ioscan script help needed

I would suggest using ioscan's -F option
which renders more easily parseble output.
e.g. to catch disks' HW pathes like

$ /usr/sbin/ioscan -kFdsdisk|awk -F: '{print$11}'

Madness, thy name is system administration
Ralph Grothe
Honored Contributor

Re: ioscan script help needed

Oops, sorry it was FCP paths that you wanted?

try this instead

$ /usr/sbin/ioscan -kFdfcp|awk -F: '$16~/CLAIMED/{print$11}'
Madness, thy name is system administration
Torsten.
Acclaimed Contributor

Re: ioscan script help needed

The "-u" switch will hide any not CLAIMED disk or device in ioscan - remember this.

IMHO for your purpose it may be better to use an array or driver specific tool to check, like "evainfo" or "autopath display" or whatever.
I'm not really sure what result you want to get.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!