1849305 Members
6541 Online
104042 Solutions
New Discussion

Re: serial number

 
Arunkumar_3
Advisor

serial number

Can any one tell me how to get the HPUX 9000/800 system serial no? I need a command which will retrive the serial no.

thanks in advance
-Arun
15 REPLIES 15
Robert-Jan Goossens_1
Honored Contributor

Re: serial number

Hi Arun,

Have you got ignite installed ?

# print_manifest | grep "Serial number:"

if not you can try,

# getconf CS_MACHINE_SERIAL

Hope it helps,

Robert-Jan.

S.K. Chan
Honored Contributor

Re: serial number

For the newer server you can use either STM or the print_manifest command.
# echo "sel path system;info;wait;infolog
>view
>done
>"|cstm > info
# cat info

OR

# /opt/ignite/bin/print_manifest
Wilfred Chau_1
Respected Contributor

Re: serial number

mstm -> highlight "system" -> information -> information log
Arunkumar_3
Advisor

Re: serial number

I have a factory pre-installed hp ux box. I haven't installed anything on that.
I tried the commands suggested, but it's not returning the serial no. My swlist not showing any bundle etc., related to ignite-ux
Robert-Jan Goossens_1
Honored Contributor

Re: serial number

Hi Arun,

If above answers do not give any results, go for the old fashioned way, look at the backside of the server. You will find a S/N number.

Robert-Jan.
Michael Tully
Honored Contributor

Re: serial number

ignite and some of the other tools are part of software called diagnostics. You should load these as part of your OS install. Obviously you don't have these loaded as yet. Until you do, depending on the model of the system, the serial number should be located on the back of the unit, or behind the front panel.

Here is a good posting on installing you OS and other software. It is a very good guide.

http://forums.itrc.hp.com/cm/QuestionAnswer/1,11866,0x4499e7e60861d511abcd0090277a778c,00.htm
Anyone for a Mutiny ?
Arunkumar_3
Advisor

Re: serial number

Hi Robert-Jan,

I want to retrive the serial and use it in one of my programs, I can't hardcode it.
Is there any otherways to install ignite on this box?

-Arun
Sridhar Bhaskarla
Honored Contributor

Re: serial number

Hi Arun,

What is the hardware you have. On the latest hardware like L, N etc., you can get it from cstm.

On the other servers, you will have to physically look at the system to get the serial number.

If you didn't overwrite the factory built OS, then print_manifest can retrieve the Serial number from the seed file already populated by HP.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Robert-Jan Goossens_1
Honored Contributor

Re: serial number

Hi Arun,

Ignite is a free hp software product you can download it on next page.

http://www.software.hp.com/products/IUX/download.html

Hope it helps,

Robert-Jan.
Arunkumar_3
Advisor

Re: serial number

S.K.Chan,
your command is working on 11i but on 11.0 it is returning cstm not found.

-Arun
Michael Tully
Honored Contributor

Re: serial number

On your 11.0 system the full diagnostics don't seem to be loaded. 'cstm' is part of the diagnostics set. Re-load all of the diagnostics and 'cstm' will be available to you.

Anyone for a Mutiny ?
Frank Slootweg
Honored Contributor

Re: serial number

"the serial number" does not really exist, because there are several serial numbers.

If you just need *a* 'serial number' and, as you mentioned, the proposed solutions do not work for you, then you may just use the serial number returned by "uname -i". For details, see the uname(1) ("man uname") and uname(2) ("man 2 uname") manual pages.

If you need more help, then please let us know *which* 'serial number' you want/need and why.
doug hosking
Esteemed Contributor

Re: serial number

The previously mentioned getconf is
one way to read it. If you want to read it from C you can do something like the following. This only works on newer systems. (In this case, an rx2600). I'm still trying to find out exactly which models support this method. So far it appears to be a pretty small percentage of the total installed base of PA systems.

As Frank(?) mentioned, there are really several serial numbers. The one returned by uname is in a different format.

$ cat ser.c
#include

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


$ cc ser.c

$ ./a.out
machine serial number = US25060964

$

Re: serial number

Doug,
I know it doesn't work on L-Class. I got a JAG called in for it. Getconf and conftstr both don't work. But I know the serial number is there because HP has a sysinfo product that has a binary supplied with it that does work on the L-Class.

I also ended up finding another way to get the serial number:

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

Michael
Arunkumar_3
Advisor

Re: serial number

thanks