Vmstat & mpstat & W

Source: Internet
Author: User

Vmstat

 
# Vmstat 3 2
Procs ----------- memory ---------- --- swap -- ----- Io ---- System -- ----- CPU ----- r B SWPD free buff cache Si so Bi Bo in CS us Sy ID wa st 0 0 0 4586104 53544 0 0 1 5 1 1 1 0 99 0 0 0 0 4586096 53544 1600700 0 0 0 16 586 0 0 293 0 0 0

Indicates that the server status is collected once every 3 seconds, and 2 indicates that the server status is collected only twice.

Mpstat

# Mpstat-P all 5 2 Linux 2.6.9-67. elsmp (oraclerac1) 12/20/2008 10:42:38 CPU % USER % nice % System % iowait % IRQ % Soft % idle intr/S10: 42: 43 pm all 6.89 0.00 44.76 0.10 0.10 0.10 48.05: 42: 43 PM 0 9.20 0.00 49.00 0.00 0.00 0.20 41.60: 42: 43 pm 1 4.60 0.00 40.60 0.00 0.20 0.20 54.60 10:42:43 pm cpu % USER % nice % System % iowait % IRQ % Soft % idle intr/S10: 42: 48 pm all 708.40 45. 30 0.30 0.00 0.10 46.70 1195.0110: 42: 48 PM 0 4.19 0.00 2.20 0.40 0.00 0.00: 42: 48 pm 1 93.21 1034.5310 10.78 0.00 88.22 0.40 0.00 average: CPU % USER % nice % System % iowait % IRQ % Soft % idle intr/saverage: All 7.25 0.00 45.03 0.20 0.05 0.10 47.38 1158.34 average: 0 6.69 0.00 25.57 0.20 0.00 0.10 67.43 724.08 average: 1 7.69 0.00 64.44 0.20 0.10 0.10 27.37 5 2 indicates that the command runs once every 5 seconds and runs twice in total. The above output first shows the total metrics of all CPUs, and then displays the respective metrics of each CPU. Finally, the average value of all CPUs is displayed at the end. % USER indicates the percentage of CPU used to process user processes. User processes are non-kernel processes used in applications (such as Oracle databases. In this example, the CPU usage is very low. % Nice indicates the CPU usage percentage when the process is downgraded using the nice command. The nice command has been introduced in the previous section. Simply put, the nice command changes the priority of a process. % System indicates the percentage of CPU used by the kernel process % iowait indicates the percentage of CPU time used for waiting for I/o % IRQ indicates the percentage of CPU used to handle system interruptions % soft indicates the percentage used for software interruptions CPU percentage % idle Display CPU idle time % intr/s display the total number of CPU interruptions received per second

Mpstat displays statistics for each processor. vmstat displays statistics for all processors. When you see the lower % idle number, you will know that the CPU is insufficient. When you see a higher % iowait number, you will know that some problems have occurred in the I/O subsystem under the current load.

 

W
# W 00:44:00 up 13 days, 6:02, 6 users, load average: 0.20, 0.32, 0.27 user tty from [email protected] idle jcpu pcpu whatuser1 pts/0 192.168.0.2 0.02 s 0.02 s-bashuser2 pts/31 192.168.0.3 05jul13 2: 10 m 0.81 s 0.06 s login -- user2 user3 pts/39 192.168.0.5 07jul13 2: 11 m 1.62 s 1.58 s SSH 10.1.1.2user4 pts/23 192.168.0.7 0.01 s 0.01 s-bashroot pts/27 192.168.0.10 28 0.00 s 0.24 S 0 . 17 S-bashuser: the abbreviation of user TTY: terminal type, which refers to the terminal name. For example, root uses pts/27 from: Where to connect to the machine. For example, if root receives [email protected] From 192.168.0.10, it will start to receive this host. For example, if the root user starts to connect to the idle at 00:28 a.m., the idle time (which indicates how long the user has not typed the command on the machine ). Root is in use. Jcpu: The total CPU usage time (accumulative) of all processes on the terminal ). From the connection to this time, the CPU pcpu is shared for 24 seconds: the current process (the process in what column) of the terminal uses the CPU time. The current process (BASH) uses 17 seconds cpuwhat: commands and options used by the current process. Now the process uses bash

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.