7

I want to know what is command which will show me servers hardware [through ssh access], like how much Gb RAM is installed, cpu speed, and so on.

Thank You.

9

quick and dirty way:

cat /proc/meminfo

cat /proc/cpuinfo

11
lshw

I have found lshw to be an invaluable resource in gathering hardware information that is otherwise difficult to gather without cracking the servers case (BIOS version, Motherboard model number, which slots of RAM are populated, etc)

A good writeup/overview of lshw can be found here

  • Always good to find out about commands that I'd never heard of +1 for teaching me something new. – Richard Holloway Mar 8 '10 at 14:44
3
1

More specific information about hardware may be given by a dmidecode command.

1

Can do that Ansible if you have Python2 and SSH access on a remote machine.

ansible -m setup ${hostname}

This will output a nice JSON which includes CPU/RAM/HDD/Network and software configuration. Read the documentation for more information.

1

To get Hardware Info,

dmidecode -t system

0

Try the following commands:

free -m
cat /proc/cpuinfo  | grep -E "(model name|cpu MHz)"
lspci
less /var/log/dmesg (or just exec dmesg)

This will first show you the amount of RAM (in MB) installed in your system. Then the CPU Name and speed - it will output it for each (virtual)core. lspci lists all PCI devices and the dmesg log shows you all kernel messages which include initialization of hardware.

That should cover about everything they build into your system.

0

Try hw-probe tool. It collects meminfo, cpuinfo, hwinfo, lspci, lsusb, smartctl and many other logs in one place and provides free hosting for your probes on the https://linux-hardware.org/ web site.

Probe example for Dell PowerEdge R710: https://linux-hardware.org/?probe=186f3c15dd

You can find similar hardware models and configurations in the database to compare and properly setup your system.

enter image description here

I'm the author of this project, feel free to ask any questions in comments.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.