Howto get Disk serial number in HPUX

Disk serial number is unique number which is key identification of disk on system. While disks are plugged in and online its hard to trace their serial numbers physically. Normally serial number can be identified on disk which is printed on sticker physically. But if the disk is plugged into system and currently online its hard to observe it physically from all sides and get serial number. In such condition we can get serial number from OS by running commands. Commands reads disk information from disks and extract it for us.

How to get serial number

Here we are going to see how to get serial number of the disk which is attached to server running HPUX. Normally everyone knows diskinfo command to get basic disk information.

In diskinfo output we get basic information of disk like its vendor, size, product ID etc. Note that you need to use raw device in command argument i.e. disk name with rdsk not dsk.

But we are not getting serial number of the disk here. We will use CSTM to get this information. CSTM is Command line Support Tool Manager. Its a part of Online Diagnostic tool which is used for real time hardware monitoring on HP platforms.

Running cstm will take you to cstm prompt where different commands can be run.

At cstm prompt run below command to get serial number info.

CSTM prompt can be exited using quit command.

If you do not wish to enter prompt / do interactive stuff then above tasks can be accomplished in single one liner too.

 

Any thoughts?