Operating System - Linux
1826614 Members
2761 Online
109695 Solutions
New Discussion

Re: HP-UX model command equivalent for RHAS2.1/3.0?

 
Dan Copeland
Regular Advisor

HP-UX model command equivalent for RHAS2.1/3.0?

is there a Linux equivalent to the HP-UX model command?

Want to determine the hardware of the server from the command line.

fwiw, we're running IBM xSeries...

tia,
Dan
17 REPLIES 17
Ivan Ferreira
Honored Contributor

Re: HP-UX model command equivalent for RHAS2.1/3.0?

The /proc filesystem has most hardware information. There are differents commands that you can use to obtain hardware information, here are some examples:

CPU
cat /proc/cpuinfo

Memory
cat /proc/cpuinfo

Devices
cat /proc/bus/*
lspci -v

Disks
fdisk -l
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Ivan Ferreira
Honored Contributor

Re: HP-UX model command equivalent for RHAS2.1/3.0?

I can't remember exactly what to model command displays, but if you want to know the architecture, processor type, etc, use the uname command with the -p -m -i options.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Rick Garland
Honored Contributor

Re: HP-UX model command equivalent for RHAS2.1/3.0?

Go google for 'lshw'. This is a script that will read the /proc files and provide the information you are looking for.

Also available is a Linux version of the cfg2html program.

The info you are asking for is in the /proc directory.
Dan Copeland
Regular Advisor

Re: HP-UX model command equivalent for RHAS2.1/3.0?

Rick,

thanks for the info. lshw showed what I was looking for:

"product: eserver xSeries 345 -[867031X]-"

Any idea where this info is under /proc?

I did some digging, but couldn't find it.

Thanks,
Dan

Rick Garland
Honored Contributor

Re: HP-UX model command equivalent for RHAS2.1/3.0?

Sorry Dan
I haven't spent the time to look for that info.
Glad it helps get you the info you seek.

Arunvijai_4
Honored Contributor

Re: HP-UX model command equivalent for RHAS2.1/3.0?

Hi Dan,

lshw collects various information from /proc and other places and format it before displaying it. It is C code and we need to do a source code analysis to find out exact location .

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Muthukumar_5
Honored Contributor

Re: HP-UX model command equivalent for RHAS2.1/3.0?

You can get it with /proc/cpuinfo as,

grep 'model name' /proc/cpuinfo

hth.
Easy to suggest when don't know about the problem!
Muthukumar_5
Honored Contributor

Re: HP-UX model command equivalent for RHAS2.1/3.0?

Get from dmesg or /var/log/message as,

# dmesg | grep -i 'CPU.:'
# grep 'CPU.:' /var/log/messages | tail -1

hth.
Easy to suggest when don't know about the problem!
njia_1
Trusted Contributor

Re: HP-UX model command equivalent for RHAS2.1/3.0?

Hi Dan,

I do not think there is such a command you can use to get the server hardware information just the model command for HPUX.

HPUX only runs on a limited number of different platforms only.

RHEL can run on a wide range of servers, workstations, even PCs and they are all different.

You can get some hardware specific information like CPU, amount of memory, NIC model but not something like

[rp2470 /] model
9000/800/A500-5X

thanks
Gopi Sekar
Honored Contributor

Re: HP-UX model command equivalent for RHAS2.1/3.0?


use 'lspci' command as root user to get full hardware information as the kernel sess them.

It should give more than enough information you are looking for. If you want cpu related information then check /proc/cpuinfo file to find out that information.

Regards,
Gopi
Never Never Never Giveup
Dan Copeland
Regular Advisor

Re: HP-UX model command equivalent for RHAS2.1/3.0?

I found another way to get the model info and SN -- dmidecode -- here's a piece of the output:

System Information
Manufacturer: IBM
Product Name: eserver xSeries 345 -[867031X]-
Version: Not Specified
Serial Number: KPNRZ31

Dan
Muthukumar_5
Honored Contributor

Re: HP-UX model command equivalent for RHAS2.1/3.0?

Post your cat /proc/cpuinfo information. It is having everything on cpu information.

hth.
Easy to suggest when don't know about the problem!
Dan Copeland
Regular Advisor

Re: HP-UX model command equivalent for RHAS2.1/3.0?

attached -- no hardware model info or SN...
Muthukumar_5
Honored Contributor

Re: HP-UX model command equivalent for RHAS2.1/3.0?

Your hardware model is as,

model name : Intel(R) Xeon(TM) CPU 2.40GHz

It will changed based on hardware setup not by any command. I have tried to use sysinfo script which gives all platform information. They are also using /proc/cpuinfo for gathering cpu information.

Ref: http://www.magnicomp.com/sysinfo/examples/redhat-7.1-x86/all_tree_msglevel_all.html

hth.
Easy to suggest when don't know about the problem!
Dan Copeland
Regular Advisor

Re: HP-UX model command equivalent for RHAS2.1/3.0?

plenty of different hardware models can have Intel Xeon chips...I need to be able to tell if it's an IBM, Compaq, Dell, etc...
Rick Garland
Honored Contributor

Re: HP-UX model command equivalent for RHAS2.1/3.0?

Some of this info is coming from the BIOS.

The major manufacturers flash the BIOS with their info.

Craig Gilmore
Trusted Contributor

Re: HP-UX model command equivalent for RHAS2.1/3.0?

Dan,

Take a look at /usr/sbin/dmidecode. I know that this program exists on RH3 and RH4, but I'm not sure about 2.1.

/usr/sbin/dmidecode | grep "Product Name"

should give you the model string you want.