Linux Disk Performance monitoring

Source: Internet
Author: User
Tags disk usage

The commands for viewing a process are very large and powerful under Linux. Often used such as: PS Top

However, there is less uniformity in disk performance monitoring.

Some disk monitoring commands are listed below. Here is just a starting point, the specific use of reference please refer to the Man manual.

One DF

The DF command gets the amount of space that the hard disk is taking up. It also shows how much space is left, and how it can be used by all file systems on the I node and disk blocks.

Common usages such as: Df-h are displayed in a way that is easy for humans to read.


Two Du

Du's English literal is "disk usage", meaning to display the use of disk space. The size of the disk space occupied by the Statistics folder (or file). The function of this command is to step into each subfolder of the specified folder and show that the folder occupies the file system data block (1024 bytes). If the specified folder is not given, the current folder is counted.

Common uses are: List the current folder size: Du-sh Suppose you want to list the size of each subfolder in the current folder: Du-sh *


Three Fdisk

The ability to partition the disk, at the same time can also be able to view the entire disk size, especially when the disk has just been bought and no partition format to use, can use:

fdisk/dev/(your disk name) after entering, use the P command to view specific information about the disk.


four iostat capable of providing rich IO status data

$ iostat-d-K 1 10

Parameter-D indicates that the device (disk) usage status is displayed. -K Some columns that use block are forced to use kilobytes as the unit. 1 10 indicates. The data display is refreshed every 1 seconds and is displayed for a total of 10 times.


There are many other statistics that can be obtained with the-x parameter, and some of the parameters are explained as follows:

RRQM/S: How much of this device-dependent read request is merged per second (when the system call needs to read the data, the VFS sends the request to each FS, assuming that FS finds different read requests that read the same block data, FS merges the request into merge). WRQM/S: How much of this device-related write request is being merge per second.


rsec/s: number of sectors read per second. wsec/: Number of sectors written per second. R/s:the number of read requests that were issued to the device per second;w/s:the number of write requests that were issue D to the device per second;


Await: The average time (in microseconds) of processing per IO request.

This can be understood as IO response time, generally the system IO response time should be less than 5ms, assuming greater than 10ms is larger.


%util: All processing IO time within the statistical time. Divided by total statistic time. Like what. Suppose the statistics interval is 1 seconds. The device has a 0.8-second processing Io, while 0.2 seconds is idle, then the device's%util = 0.8/1 = 80%, so the reference indicates how busy the device is. Generally, assuming that the reference is 100% indicates that the device is nearing full load execution (assuming, of course, multiple disks, even if%util is 100% because of the concurrency of the disk, disk usage may not be the bottleneck).


Five Vmstat real-time production see memory usage

Not explained, directly on the result:

$ vmstat 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 2037916 105012 725188< C14/>0    0  206  589  5  2  2  0
Want to see clearly some can add-s behind with K M

$ vmstat-s mprocs-----------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   1903    104    723    0    0  207  613  5  2  2  0


six dstat powerful network disk CPU monitoring commands

Color display CPU, disk, network, IO, memory and other usage.

Dstat----total-cpu-usage-----dsk/total--net/total----Paging-----system--usr sys IDL Wai HiQ siq| Read  writ| recv  send|  In Out   | int   CSW   5   2   2   0   0| 266k   70k|   0     0 |   0     0 | 825  2532   2   2   0   0|3596k   84k| 352B    0 |   0     0 | 894    12k  3   3  0   0|2632k    0 |   0     0 |   0     0 |1025  7427   1   1   0   0|3020k   52k| 128B  142b|   0     0 | 534  4132   2   1   9 0   0|3236k    0 | 160B   78b|   0     0 | 597  6167 ^C

By default, five zones are divided:

1,--total-cpu-usage----CPU utilization
usr: Percentage of user space programs.
SYS: The percentage of system space programs.
Idel: Spare percent.
Wai: The percentage that is consumed by waiting for disk I/O;
HiQ: Number of hard interrupts;
Siq: Number of soft interrupts.
2.-dsk/total-Disk Statistics
READ: Total reads
Writ: Write Total
3,-net/total-Network statistics
RECV: Total Network receipts
Send: Total network packets
4,---paging--Memory paging statistics
In:pagein (Swap in)
Out:page out (swap out)
Note: Paging activity of the system. Paging refers to a memory management technique used to find a system scenario, and a large paging indicates that the system is using a large amount of swap space. Usually when the system has started swapping space, it means that your memory is not enough, or that the memory is very fragmented. Ideally, the value of page in (Swap in) and page out (swap out) is 0 0.
5.--system--System Information
int: Number of interrupts
CSW: Context Switch
Note: interrupts (int) and context switches (CSW). This statistic only makes sense when there is a baseline. The higher statistics in this column usually indicate that a large number of processes are causing congestion and need to focus on the CPU. Your server will perform some programs normally. So this item always shows some values.
By default, Dstat refreshes the data every second. Always refresh and output, press CTRL + C to exit "Dstat"

Seven Iotop viewing the IO performance of a process

The above command only allows you to see the IO performance of the entire hard drive. The IO performance of each process cannot be monitored.

The iotop is used to monitor the IO performance of each process,

Similar to the top command that looks at the status of a process, I need super privilege to execute it here

It is very intuitive to display the read and write speed of each process. It's not the result. Self-validating.

Eight nload command line real-time monitoring speed

Nload <eth0/wlan0>


Attached: See the top 10 folders under a folder in your system that occupy the most space:

<pre name= "code" class= "python" >sudo  du-sh *./| sort-n-r | Head-n 10




Linux Disk Performance monitoring

Related Article

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.