Some hardware information query commands that are not commonly used but are very useful

Source: Internet
Author: User
Sometimes you may have to deal with such problems, such as server hardware failure and need to be replaced. in this case, you may need to obtain some key information about the hardware, such as the serial number, vendor, model, slot, capacity, and so on. it is silly to go to the data center to shut down and disassemble the machine. this method is not allowed in some scenarios with strict requirements, another example is the need to update the asset list. if there are any tools or commands that can help us simply complete this task, this is my purpose to write this blog. Physical

Sometimes you may have to deal with such problems, such as server hardware failure and need to be replaced. in this case, you may need to obtain some key information about the hardware, such as the serial number, vendor, model, slot, capacity, and so on. it is silly to go to the data center to shut down and disassemble the machine. this method is not allowed in some scenarios with strict requirements, another example is the need to update the asset list. if there are any tools or commands that can help us simply complete this task, this is my purpose to write this blog.

 

Physical memory:

 

Dmidecode-q-t 17 2 | grep "Size" | grep-v "No Module Installed" | awk '{print $2}' | uniq-c

 

View physical memory capacity (quantity of single-stick capacity)

 

Dmidecode-q-t 17 2

 

View the detailed information of the physical memory. In short, it is very detailed. you can filter out the desired information as needed.

 

Dmidecode-t 1

 

Check the motherboard information, server model, serial number or something, so you don't have to go to the data center to view it.

----------------------------------------------------------------------------

 

Physical hard disk:

 

First install the MegaRAID management tool provided by the server provider. you can download it from the official website:

 

/Opt/MegaRAID/MegaCli/MegaCli64-LDInfo-Lall-aALL

 

View raid level and detailed raid information

 

/Opt/MegaRAID/MegaCli/MegaCli64-PDList-aALL

 

Check the hard disk information. The key is to check whether a bad track exists.

 

/Opt/MegaRAID/MegaCli/MegaCli64-AdpAllInfo-aALL

 

View RAID card information

 

-----------------------------------------------------------------------------

 

Physical CPU:

 

Cat/proc/cpuinfo | grep "model name" | head-1 | awk-F: '{print $2 }'

 

View CPU model

 

Cat/proc/cpuinfo | grep "core id" | grep "0" | uniq-c | awk '{print $1 }'

 

Check the number of physical CPUs

 

Cat/proc/cpuinfo | grep "processor" | wc-l

 

View the total number of CPU cores

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.