Operating System - HP-UX
1834771 Members
3052 Online
110070 Solutions
New Discussion

script to display model information on different hardware/OS levels

 
SOLVED
Go to solution
Adam Noble
Super Advisor

script to display model information on different hardware/OS levels

Hi,

Just wondered if anyone has a quick script to show model information on various server types/OS. For example the model string brings back different output on an Itanium platform to a
PA-RISC. I want to simply produce some output and one of the columns is model type. I run an ssh script to collate all of this. I only want the specific hardware string such as L2000 or rx2600

Cheers
6 REPLIES 6
Torsten.
Acclaimed Contributor
Solution

Re: script to display model information on different hardware/OS levels

Hi,

model will return one string, example:

9000/809/K100

9000/800/L2000-44

9000/785/J6000

9000/800/SD32000

ia64 hp superdome server SD16B

ia64 hp server rx2620

ia64 hp server rx4640

All the "9000" are PA-RISC systems, all "ia64" are Integrity.


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!   
Torsten.
Acclaimed Contributor

Re: script to display model information on different hardware/OS levels

Be aware of this (man model):

"Applications intended to be portable across platforms should not have dependencies on the internal structure or contents of the model string. Each new product may use a different format for the model string. The following may change in the model output: the types of information included in the model string, the order of the information fields, or the separators between the information fields."

Not a good basis for any scripting.

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!   
john korterman
Honored Contributor

Re: script to display model information on different hardware/OS levels

Hi Adam,

is this what you want?

$ echo "$(model)" | awk -F"[/ ]" '{print $NF}'

regards,
John K.
it would be nice if you always got a second chance
Adam Noble
Super Advisor

Re: script to display model information on different hardware/OS levels

guess its not a problem then thanks. I can manipulate the string based on PA-RISC or Itanium.

thanks
Torsten.
Acclaimed Contributor

Re: script to display model information on different hardware/OS levels

Also be aware of different results like this:

ia64 hp server Integrity Virtual Machine

(returned by a virtual machine)

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!   
Arturo Galbiati
Esteemed Contributor

Re: script to display model information on different hardware/OS levels

Hi,

model

# The current naming convention is:
# aadddd
# ||||`+- 00 - 99 relative capacity & newness (upgrades, etc.)
# |||`--- unique number for each architecture to ensure different
# ||| systems do not have the same numbering across
# ||| architectures
# ||`---- 1 - 9 identifies family and/or relative positioning
# ||
# |`----- c = ia32 (cisc)
# | p = pa-risc
# | x = ia-64 (Itanium & Itanium 2)
# | h = housing
# `------ t = tower
# r = rack optimized
# s = super scalable
# b = blade
# sa = appliance

HTH,
Art