Linux System Management Preliminary (a) W, Vmstat, Top, SAR, nload command

Source: Internet
Author: User
Tags cpu usage disk usage yum repolist

In the actual work, the most commonly used command after the system deployment is the Management Class command, just like the doctor through the examination to understand the physical condition, the System Management command can let us know the system running state, on this basis to solve the system operation and maintenance of the various problems found.

One, W command

W-show who was logged on and what they was doing. The W command is the most commonly used command for system administrators. Commands can show the parameters of the system, who is online and so on.
Specific
We walk through the meanings of the rows under the W command

The first row in the red box is the current time, the second item "Up 9 min" is the server boot time, the figure is 9 minutes, the third is the number of users logged in, the fourth "load average" shows the system load, is our measurement of the server is an important indicator of the normal, a value of 1 minutes of the system average load value, General As long as this value does not exceed the CPU core number does not have the relationship, for example 1 E3 1230 is 4 cores, 1 E5 2400 is six core, multiple CPUs are calculated by the number of cores accumulated. The 2nd value represents the system average load value within 5 minutes, and the 3rd value represents the average of the system within 15 minutes.

View CPU Core Information usage

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


View CPU Specific information usage

Cat/proc/cpuinfo

Second, Vmstat command

Vmstat can view the load of each part of the system in detail, and determine which aspects of CPU, memory, hard disk and network are abnormal.

There are 6 important indicators
R, b options under procs (process)
The R option indicates the number of processes running and waiting for the CPU time slice, which is larger than the number of CPUs to indicate that the CPU is insufficient.
The B option represents the number of processes waiting for the resource, which should be followed if it exceeds 1.
Si, so option under swap (swap memory)
The SI option represents the amount of data written to memory by the swap area
The so option represents the amount of data written to the swap by memory
Bi, bo options under IO (disk usage)
BI represents the amount of disk read data
Bo represents the amount of data written to disk

Third, top command

The top command is used to dynamically monitor the resources that the process occupies, changing every 3 seconds.

The top command prints a lot of information, including system load (Loadaverage), Number of processes (tasks), CPU usage, memory, and swap partition usage.
Focus on%CPU%MEM command three
He has the same meaning as in Windows systems, CPU represents CPU consumption, mem represents memory consumption, and command indicates process name.

Press Shift+m to sort by memory size, the number "1" can list the usage status of each CPU.

Iv. SAR Command

The SAR command can monitor many system parameters, he is not the system default program, need to install Yum before use

Yum Install Sysstat

(a) Monitor network card traffic

Sar-n DEV 1 5


RXPCK/S indicates the packets received per second
TXPCK/S indicates packets sent out per second
RXKB/S indicates the amount of data collected per second
TXKB/S indicates the amount of data going out per second

Note: If the rxpck/s value is greater than 4000,rxkb/s greater than 5000000 means the server may be attacked. Normally, only when you're remotely copying data can the amount of data be so large

(ii) View historical load

Command:

Sar-q

V. nload command

The Nload tool needs to be installed through the Epel source, before the installation needs to import the Epel source and take the previous notes:

Yum Install Epel

Verify the situation of the source after installation

Yum Repolist

Then yum install Nload tool

Yum Install nload

Nload and Windows look at the network traffic resource manager almost, can compare the user-friendly display network speed.

Linux System Management Preliminary (a) W, Vmstat, Top, SAR, nload command

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.