inux disk monitoring and analysis

First, view disk space 

 1、 df -h

Size split Chief capacity 

Used size has been used 

Avail remaining size 

Use% Percentage of use 

Mounted on the path address

 2, view the directory space

du -sh view the current total size of the folder directory

du -sh * View subdirectories under the current space occupied by

du -h --max-depth = 1 / root / * Check the directory has said that under the file size

du -h --max-depth = 1 / root directory lists all a root directory file size;

 

Second, monitor disk IO

1, iostat -xdk 2 3 disk IO monitor

 

 rrqm / s: this device a read request is associated Merge the second number (when the system call requires the read data, VFS requests sent to each FS, FS if found to be different from the same read request to read Block data, FS will request the merge combined);

wrqm / s: the device associated with the write requests per second is the number of the Merge.

rsec / s: the number of sectors read per second;

wsec /: number of sectors written per second.

rKB / s: The number of read requests that were issued to the device per second ( request to read the device emitted per second );

wKB / s: The number of write requests that were issued to the device per second ( write issued to the second device requests );

avgrq-sz average size of a sector request

avgqu-sz is the average length of the request queue. There is no doubt queue length as short as possible.    

await: the average processing time for each IO request (in milliseconds, microseconds). Here it will be appreciated that the response time of IO, IO response time of the system in general should be less than 5ms, 10ms is greater than if relatively large. This time includes the time and queue service time, that is to say, in general, larger than the await the svctm, the smaller the difference between them, then the queue shorter time, whereas the greater the difference, the longer the time the queue, the system described the problem.

svctm represents the average service time per device I / O operations (in milliseconds). If the value svctm await very close, showing almost no I / O wait, disk performance very good, if the value is much higher than the value await svctm of said I / O queue waiting for the application running on the system becomes too long slow.

% Util: in all IO processing time within the time, divided by the total time statistics. For example, if the statistical interval of 1 second, 0.8 seconds, the device has the IO processing busy, idle and 0.2 seconds, then the apparatus% util = 0.8 / 1 = 80%, so the parameter implies that the device

. Generally, if the parameter indicates that the device is close to 100% of full load operation (of course, if multiple disks, even 100% util% concurrency because the disk, it does not necessarily use the disk to the bottleneck).

 

2, a process of disk IO: pidstat -d 2 -p 41024

kB_rd / s: the amount of data read from the disk per process (in units of kB)

kB_wr / s: process the amount of data written to the disk per second (in kB units)

Command: pull up the process corresponding to the command

 

Guess you like

Origin www.cnblogs.com/jalja/p/12060857.html