Summary of methods for viewing hardware information and running status in Linux systems

Source: Internet
Author: User

1, view the disk

The code is as follows:
Df-h

2, view memory size

The code is as follows:
Free
free [-m|g]

Press MB,GB to display memory

The code is as follows:
Vmstat

3, view CPU

The code is as follows:
Cat/proc/cpuinfo

Look only at the number of CPUs grep "model name"/proc/cpuinfo | Wc-l

4, View system memory

The code is as follows:
Cat/proc/meminfo

5, view the situation of each process

The code is as follows:
Cat/proc/5346/status 5347 is a PID

6, view the load
W
Uptime

7, view system overall status
Top
An explanation of some of the last output information:
Load average:0.09, 0.05, 0.01
The three numbers represent the system average load (one minute, five minutes, and 15 minutes) for different periods of time, and their number is, of course, the smaller the better. "How many cores are the number of loads" rule: in multi-core processing, your system should not mean more than the total number of cores in the processor
The process uses memory that can be used with top, 3 columns Virt RES SHR, indicating the memory used by the process, Virt identifies the total amount of memory the process can use, including the memory that the process is actually using, the mapped files, and the memory shared by other processes. Res identifies the amount of memory that this process is actually consuming. The SHR identifies the memory and library sizes that can be shared with other processes.

8, performance monitoring SAR command
Sar-u output displays CPU information. The-u option is the default option for SAR. This output shows the CPU usage as a percentage
Cpu
CPU number
%user
The time it takes to run a process in user mode
%nice
The time it took to run the normal process
%system
Time spent running processes in kernel mode (System)
%iowait
The time the processor waits for I/O to complete without a process executing on that CPU
%idle
No time for process execution on the CPU
SAR 5 SAR obtains 10 samples in 5 second interval
Sar-u-P All 5 5 minute cup display

The code is as follows:
sar-n {DEV | Edev | NFS | NFSD | Sock | All}

SAR provides six different syntax options for displaying network information. -N option uses 6 different switches: DEV | Edev | NFS | NFSD | Sock | All. DEV Displays network interface information, Edev displays statistics about network errors, NFS client Information for NFS statistics activities, NFSD statistics Server for NFS, sock displays socket information, all displays all 5 switches. They can be used individually or together.
The meanings of sar-n DEV parameters
Iface
LAN interface
rxpck/s
Packets Received per second
txpck/s
Packets Sent per second
rxbyt/s
Number of bytes received per second
txbyt/s
Number of bytes sent per second
rxcmp/s
Compressed packets received per second
txcmp/s
Compressed packets sent per second
rxmcst/s
Multicast packets received per second

9, view command history (including timestamp)
Export histtimeformat= '%F%T '; history| More

10, view folder and file size

The code is as follows:
Du-h--max-depth=0 DM

View DM Directory Size

The code is as follows:
Du-h--max-depth=1 DM

View the DM directory size and the size of the DM file folders

The code is as follows:
Du-h--max-depth=0

View the current folder size

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.