Operating System - HP-UX
1753894 Members
7393 Online
108809 Solutions
New Discussion юеВ

Re: serial of attached SAN box

 
sepp2909
Occasional Advisor

serial of attached SAN box

Hi All!

After lot of trying and reading of man pages here my question:
I want to create a script running over all our HP servers (11.11, 11.23, 11.31) which gives me back the serial number of the attaches SAN box. The only procedure I found:
http://forums13.itrc.hp.com/service/forums/questionanswer.do?admit=109447627+1266249993277+28353475&threadId=1004148

But this I can't use in a script.
Any ideas
Best regards
JOE
8 REPLIES 8
Torsten.
Acclaimed Contributor

Re: serial of attached SAN box

If the cstm procedure works for you, you can script it.

But I doubt if this really helps.



All depends on this "SAN box".

What is it???

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!   
sepp2909
Occasional Advisor

Re: serial of attached SAN box

We have many different SAN boxes. That is the problem. I want to find out which server is connected to which SAN box.

Thanks
JOE
Viktor Balogh
Honored Contributor

Re: serial of attached SAN box

>We have many different SAN boxes.

does this mean also different vendors?
****
Unix operates with beer.
sepp2909
Occasional Advisor

Re: serial of attached SAN box

Yes, also different vendors... ;-(
Hemmetter
Esteemed Contributor

Re: serial of attached SAN box

Hey Joe,

may be the inq-tool from emc├В┬▓ may answer your question:

# inq.hpux1100 -h | grep -i id
-sid : display Symmetrix Serial Number
-sw_wwn : display StorageWorks WWN and Serial Id
-hds_wwn : display HDS WWN and Serial Id
-s80_wwn : display S80 WWN and Serial Id
-invista_wwn : display Invista WWN and Serial Id
-shark_wwn : display IBM Shark WWN and Serial Id
-compaq_wwn : display Compaq WWN and Serial Id
-netapp_wwn : display Netapp WWN and Serial Id

I think one of your storage vendors is EMC├В┬▓ ;-)

You can get it from EMC-Download page:
ftp://ftp.emc.com/pub/symm3000/inquiry/



rgds
Hans
sepp2909
Occasional Advisor

Re: serial of attached SAN box

Hi!

Didn't want to install inq on all our servers but we found a solution. Perhaps it hels someone in the future:
#!/usr/bin/sh

TMPFILE=/tmp/123
HOSTNAME=`hostname`

echo "HOSTNAME;HWPATH;SERIAL;VENDOR;CAPACITY;PRODID"
echo "selclass qualifier hard;info;wait;infolog" | cstm > $TMPFILE

# for i in `grep "Hardware path" /tmp/cstmdisks | awk '{print $3}'`

INDEX=0
grep "Hardware path" $TMPFILE | awk '{print $3}' | while read i
do
HWPATH[$INDEX]=$i
INDEX=`expr $INDEX + 1`
done

INDEX=0
grep Serial $TMPFILE | awk '{print $3}' | while read i
do
SERIAL[$INDEX]=$i
INDEX=`expr $INDEX + 1`
done

INDEX=0
grep Vendor $TMPFILE | awk '{print $5}' | while read i
do
VENDOR[$INDEX]=$i
INDEX=`expr $INDEX + 1`
done

INDEX=0
grep Capacity $TMPFILE | awk '{print $4}' | while read i
do
CAPACITY[$INDEX]=$i
INDEX=`expr $INDEX + 1`
done

INDEX=0
grep "Product Id" $TMPFILE | awk '{print $3}' | while read i
do
PRODID[$INDEX]=$i
INDEX=`expr $INDEX + 1`
done

INDEX=0
until [ INDEX -gt ${#HWPATH} ]
do
echo "$HOSTNAME;${HWPATH[$INDEX]};${SERIAL[$INDEX]};${VENDOR[$INDEX]};${CAPACITY[$INDEX]};${PRODID[$INDEX]}"
INDEX=`expr $INDEX + 1`
done

Best regards
JOE
Hemmetter
Esteemed Contributor

Re: serial of attached SAN box

Hey Joe,

are you looking for the serial number of the box or the disks?

And more on one of my servers your script reports local and HDS disks but not the EMC2 disks.

Consider using "inq" tool, it can run without installation.

rgds
Hans
sepp2909
Occasional Advisor

Re: serial of attached SAN box

We are not using EMC2 so I can't check. The goal was to get the informations as I get in the script. The main problem was to find out the serial number of the box. From the internal disks I get the disk serial, it is ok but not needed!

Best regards
JOE