1830060 Members
2743 Online
109998 Solutions
New Discussion

model command on Linux

 
Jean-Yves Picard
Trusted Contributor

model command on Linux

Hello,

Is there a way to get model of a host from linux ?

on HP-UX I have
hpux> uname -m
9000/800
hpux> model
9000/800/rp3440
hpux>

unfortunatly, model didn't exist for Linux:

[linux]$ model
-bash: model: command not found
[linux]$ uname -m
i686
[linux]$

is there a way (a file in /proc, a command, perl crypt- I mean perl EASY command ) to have same information ?

(If answer is no, can a Linux Guru explain why ?)

Jean-Yves Picard
3 REPLIES 3
Alpha977
Valued Contributor

Re: model command on Linux

Hello!

Have you try with "uname -a"?

Bye
Peter Godron
Honored Contributor

Re: model command on Linux

Hi,
checking :
http://www.unixguide.net/unixguide.shtml
and
http://bhami.com/rosetta.html
confirms uname -m as the closest match.

What do you want to see as an output ?

Something like:
DELL Computer WINXP Optiplex GX270/SFF 2.4 GHz

Probably not available without serious scripting etc.
Sorry
Jean-Yves Picard
Trusted Contributor

Re: model command on Linux

Hello,

I use ouput from hpdiag (work only on HP :-\ )

[linux]# /opt/hp/hpdiags/hpdiags -t > me.xml
HP Insight Diagnostics Version 7.6.0.1977A
Copyright (c) 2002, 2005 Hewlett-Packard Development Company, L.P.
System configuration capture completed (100%)


then process which sxltproc

[linux]$ xsltproc s4.xsl me.xml | awk 'NF > 1'
ProLiant DL380 G4
ProLiant DL380 G4
ProLiant DL380 G4
ProLiant DL380 G4
where s4.xsl is








the reason for awk 'NF>1' is huge amount on newline and white in result.

hope this help (you have to have hpdiag first, which I believe are in Proliant support pack and should be lurking somewhere on hp.com )

Jean-Yves Picard