Linux vmstat process information and memory information

Source: Internet
Author: User

Linux vmstat has been widely used but is constantly updated. Here we will introduce the installation and use of Linux vmstat to help you install and update the Linux vmstat system. This tool is really important and can be used in most Linux and Unix systems, such as I am using AIX, Solaris and CentOS.

Linux vmstat is short for Virtual Memory Statistics, but it can be used for system processes, Memory usage, switching pages, IO blocks, collect statistics on interruptions and CPU usage and report relevant information. First, enter Linux vmstat 5 5 on the Solaris 10 iSCSI terminal to obtain the following information:

Linux vmstat5 5 meets the vmstat T [n] N [5] format, meaning that N samples are performed within T seconds, note that the first "Data row" indicates the average usage of the computer since the last restart. Each line of information is periodically displayed according to the delay. Both process information and memory information are generated instantly.

Sometimes we need to pay attention to the process and CPU usage. We generally pay attention to the r, B, w, id parameter (marked in ):

(1) r (running): The number of processes in the running queue, that is, the number of processes that are running or waiting for CPU time. If this parameter value exceeds the number of CPUs on the server, there may be a cpu bottleneck and some tasks need to be executed. When the business is busy, the number of CPUs should not exceed 2 times, which can still be considered reasonable.

(2) B (blocked): blocked process due to I/O, page feed, etc ). Normally, it is better to set 0.

(3) w (swapped): indicates the number of processes that need to be released and swapped out. It is better to set the value to 0 under normal conditions.

(4) id (idle): Percentage of idle cpu.

This machine is a new machine with no application running on it. From the perspective of r, B, w, and id, this is also true.

It is in an SuSE Linux (Linux version 2.6.5-7.276-smp) where the CPU is a dual-core Linux vmstat:

In Linux, vmstat is somewhat different from the vmstat of solaris. For example, if the w (swapped) column is not available, but from r (running), B (blocked), id (idle)

We can also see that this machine is a heavy-load machine, and processes in the running queue are maintained at an average of 2 ~ There are three, And the idle time is less than 50%. Actually, this machine is running on five virtual machines.

  1. Linux PHP compilation and generation extension and Configuration Modification
  2. Ubuntu Linux is more powerful, faster, and better
  3. Update list of Linux yum installation package
  4. High-performance servers and monitoring required for Linux System Administrators
  5. Linux memory usage view unit display

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.