The Linux view hardware commonly used commands

Recommended for you: Get network issues from WhatsUp Gold. Not end users.

      Recently the frequently used commands in the usual work, mainly divided into two parts, one is to view hardware information command, the other one is operation monitoring hardware command. This article relates only to view hardware information command, the relevant monitoring hardware operation command, I will share in the next blog. These commands provide basis for fault diagnosis, mastery of these commands are necessary.

1 see the CPU Information

(1)Model CPU

(2)Core number

12 nuclear physics, hyper threading 24 nucleus

2 see memory information

cat /proc/meminfo


free -m

Memory size: 193793M

The size of swap: 7844M

3 see operating system information

(1)View the kernel information

(2)Check the operating system version information

(3)Check the operating system to run number

4,View card information

(1)To view the whole card information.

The machine consists of a total of two pieces of card eth0 and eth1, Lo represents the local address; note that eth0 and eth1 bind to the same physical address HWaddr, this essence is through Bonding will be more than one card gather into one, can provide load balancing (load-balancing), fault tolerance (fault-tolerance) and other functions.


(2)The binding mode.

(3)See a piece of card information

5 see disk information


6 see the RAID card information

     Through the DF command, we can understand the disk partition capacity and usage, but specific to each partition is composed of which disks, we do not know, in general, to improve the availability of the disk, we will do RAID on the disk, check the RAID card information need to use the MegaCli command, the command is on /opt/MegaRAID/MegaCli

(1)View disk information.

sudo MegaCli64 -PDList -aALL | egrep '(Raw Size|Device Id|DiskGroup|DiskGroup|PD Type|Speed)'

Explanation: the machine with two blocks of SAS interfaces, 8 SATA interfaces of SSD hard disk.


(2)To view the RAID level.:

sudo MegaCli64 -LDInfo -Lall -aALL | egrep '(RAID|Size)'

Explanation: the machine consists of two kinds of RAID strategy, respectively is RAID-1 and RAID-5.

RAID-1 capacity: 558G, log disk [full redundancy, ensuring high availability]

RAID-5 capacity: 3T, data disk 


Calculation of RAID-1 disk capacity: the capacity of the disk/2

Calculation of RAID-5 disk capacity: a single hard disk capacity.(N-1), N>=3

Combined with the disk information in front of the show, it is easy to get 2 pieces of the SAS disk SSD disk RAID-1,8 block RAID-5.


(3)Disk cache policy view.

sudo /opt/MegaRAID/MegaCli/MegaCli64 -LDGetProp -DskCache -LALL -aALL


In order to ensure the consistency of the data, the log disk close the disk write cache,

In order to improve the efficiency of data written to disk, open the disk write cache.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download

Posted by Sid at November 08, 2013 - 6:10 PM