1753575 Members
5691 Online
108796 Solutions
New Discussion юеВ

how to get hardware info

 
SOLVED
Go to solution
Victor Salvador
Occasional Contributor

how to get hardware info

I am a PERL programer. I would like to know how can I get some information from my server's hardware:

HardDisk Serial Number
operation System Serial Number

or an another key feature that supposed to be unique for each equipment.

I pretend other users run my software(PERL Program) in another equipment that I don't let my approval.
7 REPLIES 7
Rick Garland
Honored Contributor

Re: how to get hardware info

Some HW values you are seeking are not present in the OS. Example, the HW serial number is listed on the exterior of the system. If there is a 'door', you will find the serial number on the inside of the door.

Something that was done previously (in another life) is to create a file called /.serial that contained the HW serial numbers.
Stefan Farrelly
Honored Contributor
Solution

Re: how to get hardware info


I dont know any way to obtain the serial number of an HP server online. Its only printed on the external box.

To obtain the serial number of a disk drive you could use cstm to do this via the diagnostic software although it may be difficult to obtain. If theyre EMC disks you can use the inq or syminq (emc commands) to obtain unique serial numbers on their disks.

The normal method for licensing/uniqueness on an HP server is to use either;
uname -i or
/opt/ifor/ls/bin/i4target

Licensed application software usually uses one of these two.
Im from Palmerston North, New Zealand, but somehow ended up in London...
Cheryl Griffin
Honored Contributor

Re: how to get hardware info

Victor,

The HardDisk Serial Number and operation System Serial Number are not recorded within the operating system. The hardware serial number is located on the unit itself. The operating system, if you mean media numbers are located on the cd's itself.

You might find all these unique numbers documented on your Sales Order.

Best Wishes,
Cheryl
"Downtime is a Crime."
Kofi ARTHIABAH
Honored Contributor

Re: how to get hardware info

For the serial number for the os, use:

uname -i

for disks, I suspect you would have to make do with what diskinfo can provide:

for i in `ioscan -fnC disk |grep rdsk | awk '{ print $2 }'`
do
diskinfo -v $i
done
nothing wrong with me that a few lines of code cannot fix!
melvyn burnard
Honored Contributor

Re: how to get hardware info

a disk serialnumber could be obtained by using the STM diagnostic utilities, but whether you could get the info using your scripts I am unsure.
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!
Michael Lampi
Trusted Contributor

Re: how to get hardware info

You can use scsi_info to obtain whatever information the device manufacturer placed in the device. This typically includes the serial number of the device.

scsi_info and its source code can be obtained from ftp://ftp.mdlcorp.com/scsiinfo/hp-ux10/
A journey of 1000 steps ends in a mile.
Anthony Goonetilleke
Esteemed Contributor

Re: how to get hardware info

There are a couple of good little programs you can use to pipe the output into a perl array.
Try the following-

you need to install ignite-UX which is free and there is a file called
/opt/ignite/bin/print_manifest
this has a lot of good stuff.

Also have a look at diskinfo this will give you a bit of information on the disk.
Minimum effort maximum output!