Get server hardware details for ubuntu server
Solution 1
quick and dirty way:
cat /proc/meminfo
cat /proc/cpuinfo
Solution 2
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
Solution 3
Solution 4
More specific information about hardware may be given by a dmidecode
command.
Solution 5
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.
Related videos on Youtube
Shishant
Updated on September 17, 2022Comments
-
Shishant over 1 year
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.
-
Richard Holloway about 14 yearsAlways good to find out about commands that I'd never heard of +1 for teaching me something new.