Operating System - HP-UX
1832283 Members
2384 Online
110041 Solutions
New Discussion

how to find serial no on hp-ux?

 
Rajesh Karelia
Frequent Advisor

how to find serial no on hp-ux?

Hi,

Is there any command in HP-UX which gives the serial number of the machine?

This is reqd since we have messed up with a few machines.

Thanks
Rajesh
8 REPLIES 8
Ludovic Derlyn
Esteemed Contributor

Re: how to find serial no on hp-ux?

hi,

the more sure is :

echo "sel path system\ninfolog\nexit"|cstm|grep "System Serial Number"


Becauseif you have restored a server by ignite on an other server , serial number is
not the good

Regards

L-DERLYN
freddy_21
Respected Contributor

Re: how to find serial no on hp-ux?

cstm
seldev 1
info
infolog

or you can check from physical server.

twang
Honored Contributor

Re: how to find serial no on hp-ux?

if ignite-ux installed, change dir to /opt/ignite/bin and exec print_manifest
# print_manifest |more


System Information
..
..
...
Serial number: 39--------


you will find serial number from the output
Hemmetter
Esteemed Contributor

Re: how to find serial no on hp-ux?

Hi Rajesh

on HP-UX 11.23:
# machinfo | grep "machine serial number"

on HP-UX 11/11i:
echo "selclass qualifier system;info;wait;il" | cstm | grep "System Serial Number"



rgds
HGH
Enrico P.
Honored Contributor

Re: how to find serial no on hp-ux?

Hi,
you can try with the command:

getconf MACHINE_SERIAL


Enrico
doug hosking
Esteemed Contributor

Re: how to find serial no on hp-ux?

One more way, if you want to do it from C:

#include

main()
{
char buf[81];
if (confstr(_CS_MACHINE_SERIAL, buf, sizeof(buf)) <= 0) {
printf("UNKNOWN\n");
exit(1);
}
printf("%s\n", buf);
exit(0);
}

Some of the older machines do not support this, but all the newer ones I have tried do.
Torsten.
Acclaimed Contributor

Re: how to find serial no on hp-ux?

Hi Rajesh,

some older models are not aware of the SN.
Newer models should responde to the given commands. What server models you have?

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!   
Bill Hassell
Honored Contributor

Re: how to find serial no on hp-ux?

The majority of HP 9000 computers do not have the serial number stored electronically. Only the more recent machines such as the rp series and earlier models like N and L class have this number. Note that you must have the online diagnostics installed to run the cstm command. Otherwise, someone will have to read the number from the label on the computer.


Bill Hassell, sysadmin