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.
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
More specific information about hardware may be given by a dmidecode
command.
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.
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.
I'm the author of this project, feel free to ask any questions in comments.
Add these aliases to your bash for fast and detailed info
alias serverinfo="sudo lshw | head -n 23"
alias cpuinfo="sudo lscpu"
alias meminfo="sudo lshw | egrep -v 'resources|UNCLAIMED' | grep -A 25 memory"
alias diskinfo="sudo lshw | grep -A 100 '*-scsi'"
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.