Operating System - HP-UX
1834389 Members
1930 Online
110066 Solutions
New Discussion

Re: Serial # checking question

 
SOLVED
Go to solution
Joe Chow_1
Occasional Advisor

Serial # checking question

Hi,

Is it possible to check the serial # on a HP-UX system in command line, say from root account.

I'm doing an system inventory on various HP-UX machines, some of them have no serial # posted on either front or back of the machines.

thanks in advance.
Joe
7 REPLIES 7
Rick Garland
Honored Contributor

Re: Serial # checking question

The print_manifest output has serial numbers
Kent Ostby
Honored Contributor
Solution

Re: Serial # checking question

you can get this via cstm.

Here are a couple of one liners that will probably do it:

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

and


# echo "sel dev 1;info; wait;il"|cstm |grep -i "system serial"
"Well, actually, she is a rocket scientist" -- Steve Martin in "Roxanne"
Rick Garland
Honored Contributor

Re: Serial # checking question

Here is another 1 liner

getconf _CS_MACHINE_SERIAL
Jeff Schussele
Honored Contributor

Re: Serial # checking question

Hi Joe,

The earlier responses will work on all newer systems, but not on older ones like Ks and such.

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Joe Chow_1
Occasional Advisor

Re: Serial # checking question

Thanks for everyone suggestions, all commands are working except the getconf_CS_MACHINE.

apreciated for the help!
Joe
Geoff Wild
Honored Contributor

Re: Serial # checking question

On top of just the serial number, you might want to document more, I use cfg2html:

http://come.to/cfg2html

as well as sysinfo 3.01 (see attached).

I run sysinfo from cron like so:

# Run the sysinfo script
0 6 1 * * /usr/local/sysinfo/sysinfo -a -b -o /usr/tmp/`hostname`.sysinfo >/tmp/sysinfo.cron 2>&1

and cfg2html:

#Run the cfg2html scripts
35 6 1 * * cd /opt/cfg2html ; /opt/cfg2html/cfg2html_hpux.sh >/dev/null 2>&1


Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Rick Garland
Honored Contributor

Re: Serial # checking question

The getconf _CS_SERIAL_MACHINE works for me.

In your post I see you have no space between the getconf and the _CS_SERIAL_MACHINE

getconf_CS_SERIAL_MACHINE