Sometimes you may have to face such problems, such as server hardware failure, need to be replaced, at this time you may need to obtain some of the hardware key information, such as serial numbers, manufacturers, models, slots, capacity, etc., compared to the practice of the machine room to shut down the demolition view, this method of efficiency under, In some demanding scenarios are not allowed, such as the need to update the list of assets, this time if there are any tools or commands to help us to complete this task is perfect, this is what I write this blog purpose.
Physical Memory:
Dmidecode-q-T 2 |grep "Size" |grep-v "No Module Installed" |awk ' {print $} ' |uniq-c
View physical memory capacity (number of individual capacity)
Dmidecode-q-T 17 2
View the details of physical memory, in short, very detailed, can filter out the desired information as needed
Dmidecode-t 1
Check the motherboard information, server model, serial number and so on, do not go to the computer room to view
----------------------------------------------------------------------------
Physical hard disk:
First install the MegaRAID management tool provided by the server manufacturer, can go to the official website to download:
/opt/megaraid/megacli/megacli64-ldinfo-lall-aall
View RAID level, detailed raid information
/opt/megaraid/megacli/megacli64-pdlist-aall
View hard disk information, how many hard drives, respectively, in what slot, the key is to see if there are bad channels
/opt/megaraid/megacli/megacli64-adpallinfo-aall
View RAID Card information
-----------------------------------------------------------------------------
Physical CPU:
Cat/proc/cpuinfo|grep "model name" |head-1|awk-f: ' {print $} '
View CPU Models
Cat/proc/cpuinfo|grep "Core id" |grep "0" |uniq-c|awk ' {print '} '
View a few physical CPUs
Cat/proc/cpuinfo|grep "Processor" |wc-l
To view the total number of CPU cores
----------------------------------------------------------------------------
This article is from the "Qing Feng to the Wind" blog, please be sure to keep this source http://crazy123.blog.51cto.com/1029610/1709200
Some infrequently used but very useful hardware information query commands