Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Linux \ To use iostat display I / O status under Linux     - Docker manage data (Linux)

- Python: Finding meet the conditions specified in the file directory (Programming)

- MySQL my.cnf sql_mode schema modifications (Database)

- Linux supports serial output method (Linux)

- MyEclipse configuration necessary (Linux)

- Rails 4.1.6 start being given Could not find a JavaScript runtime (Linux)

- How to install Linux Kernel 4.4 on Ubuntu (Linux)

- Function Getting the Linux shell (Programming)

- Nonstandard IMP-00010 error processing one case (Database)

- How to install Zephyr Test Management Tools on CentOS 7.x (Server)

- Security basics: simple analytical framework for Linux system firewall (Linux)

- Linux commands with browsing and downloading files (Linux)

- How to configure Apache Solr on Ubuntu 14/15 (Server)

- To compile and install MySQL 5.7.7 RC under CentOS 7.1 (Database)

- Win7 used Eclipse to connect the virtual machine in Ubuntu Hadoop2.4 (Server)

- Steps to build MPICH2 development environment on CentOS 6.4 (Linux)

- Use OpenSSL to generate a certificate (Linux)

- Firewall - Internet Militarization (Linux)

- Install Rubinius testing Ubuntu 14.04 native threads (Linux)

- Oracle 11g RMAN virtual private directory (Database)

 
         
  To use iostat display I / O status under Linux
     
  Add Date : 2018-11-21      
         
         
         
  Under Linux we can use the sar (1), iostat (1), vmstat (1), vmstat (8) to monitor I / O status
First, install
yum install sysstat
Second, the parameters explained
FILES
/ Proc / stat contains system statistics.
/ Proc / uptime contains system uptime.
/ Proc / partitions contains disk statistics (for pre 2.5 kernels that have been patched).
/ Proc / diskstats contains disks statistics (for post 2.5 kernels).
/ Sys contains statistics for block devices (post 2.5 kernels).
/ Proc / self / mountstats contains statistics for network filesystems.
/ Dev / disk contains persistent device names.
CPU Utilization Report
% User Show the percentage of CPU utilization that occurred while executing at the user level (applica-tion).
% Nice Show the percentage of CPU utilization that occurred while executing at the user level with nicepriority.
% System Show the percentage of CPU utilization that occurred while executing at the system level (kernel).
% Iowait Show the percentage of time that the CPU or CPUs were idle during which the system had an outstand-ing disk I / O request.
% Steal Show the percentage of time spent in involuntary wait by the virtual CPU or CPUs while the hypervi-sor was servicing another virtual processor.
% Idle Show the percentage of time that the CPU or CPUs were idle and the system did not have an outstand-ing disk I / O request.
Device Utilization Report
tps Indicate the number of transfers per second that were issued to the device. A transfer is an I / O request to the device. Multiple logical requests can be combined into a single I / O request to the device. A transfer is of indeterminate size .
Blk_read / s Indicate the amount of data read from the device expressed in a number of blocks per second. Blocks are equivalent to sectors with kernels 2.4 and later and therefore have a size of 512 bytes. With older kernels, a block is of indeterminate size .
Blk_wrtn / s Indicate the amount of data written to the device expressed in a number of blocks per second.
Blk_read The total number of blocks read.
Blk_wrtn The total number of blocks written.
kB_read / s Indicate the amount of data read from the device expressed in kilobytes per second.
kB_wrtn / s Indicate the amount of data written to the device expressed in kilobytes per second.
kB_read The total number of kilobytes read.
kB_wrtn The total number of kilobytes written.
MB_read / s Indicate the amount of data read from the device expressed in megabytes per second.
MB_wrtn / s Indicate the amount of data written to the device expressed in megabytes per second.
MB_read The total number of megabytes read.
MB_wrtn The total number of megabytes written.
rrqm / s The number of read requests merged per second that were queued to the device.
wrqm / s The number of write requests merged per second that were queued to the device.
r / s The number of read requests that were issued to the device per second.
w / s The number of write requests that were issued to the device per second.
rsec / s The number of sectors read from the device per second.
wsec / s The number of sectors written to the device per second.
rkB / s The number of kilobytes read from the device per second.
wkB / s The number of kilobytes written to the device per second.
rMB / s The number of megabytes read from the device per second.
wMB / s The number of megabytes written to the device per second.
avgrq-sz The average size (in sectors) of the requests that were issued to the device.
avgqu-sz The average queue length of the requests that were issued to the device.
await The average time (in milliseconds) for I / O requests issued to the device to be served. This includes the time spent by the requests in queue and the time spent servicing them.
svctm The average service time (in milliseconds) for I / O requests that were issued to the device. Warning! Do not trust this field any more. This field will be removed in a future sysstat version.
% Util Percentage of CPU time during which I / O requests were issued to the device (bandwidth utilization for the device). Device saturation occurs when this value is close to 100%.
Network Filesystem report
rBlk_nor / s Indicate the number of blocks read by applications via the read (2) system call interface. A block has a size of 512 bytes.
wBlk_nor / s Indicate the number of blocks written by applications via the write (2) system call interface.
rBlk_dir / s Indicate the number of blocks read from files opened with the O_DIRECT flag.
wBlk_dir / s Indicate the number of blocks written to files opened with the O_DIRECT flag.
rBlk_svr / s Indicate the number of blocks read from the server by the NFS client via an NFS READ request.
wBlk_svr / s Indicate the number of blocks written to the server by the NFS client via an NFS WRITE request.
rkB_nor / s Indicate the number of kilobytes read by applications via the read (2) system call interface.
wkB_nor / s Indicate the number of kilobytes written by applications via the write (2) system call interface.
rkB_dir / s Indicate the number of kilobytes read from files opened with the O_DIRECT flag.
wkB_dir / s Indicate the number of kilobytes written to files opened with the O_DIRECT flag.
rkB_svr / s Indicate the number of kilobytes read from the server by the NFS client via an NFS READ request.
wkB_svr / s Indicate the number of kilobytes written to the server by the NFS client via an NFS WRITE request.
rMB_nor / s Indicate the number of megabytes read by applications via the read (2) system call interface.
wMB_nor / s Indicate the number of megabytes written by applications via the write (2) system call interface.
rMB_dir / s Indicate the number of megabytes read from files opened with the O_DIRECT flag.
wMB_dir / s Indicate the number of megabytes written to files opened with the O_DIRECT flag.
rMB_svr / s Indicate the number of megabytes read from the server by the NFS client via an NFS READ request.
wMB_svr / s Indicate the number of megabytes written to the server by the NFS client via an NFS WRITE request.
ops / s Indicate the number of operations that were issued to the filesystem per second.
rops / s Indicate the number of 'read' operations that were issued to the filesystem per second.
wops / s Indicate the number of 'write' operations that were issued to the filesystem per second.
Command Parameters
-C Display CPU usage
-d Displays disk usage
-k in KB display
-m display unit to M
-N Display array (LVM) information
-n Display NFS usage
-p [disk] display cases of disks and partitions
-t display terminal and CPU information
-x Show Details
-V Display version information
Third, use
Device Utilization Report
[Root @ localhost ~] # iostat -d -k 2 4
Linux 2.6.32-431.11.2.el6.x86_64 (localhost) 01/08/2016 _x86_64_ (4 CPU)
Device: tps kB_read / s kB_wrtn / s kB_read kB_wrtn
xvda 114.22 13.80 713.21 372234513 19241775188
xvdb 19.26 21.24 144.25 573067009 3891812336
Device: tps kB_read / s kB_wrtn / s kB_read kB_wrtn
xvda 0.00 0.00 0.00 0 0
xvdb 4.50 0.00 18.00 0 36
Device: tps kB_read / s kB_wrtn / s kB_read kB_wrtn
xvda 0.00 0.00 0.00 0 0
xvdb 10.50 0.00 42.00 0 84
Device: tps kB_read / s kB_wrtn / s kB_read kB_wrtn
xvda 0.00 0.00 0.00 0 0
xvdb 20.50 0.00 86.00 0 172
Parameter Description
tps: the number of transfers per second device, a plurality of logical requests can be combined into a single device I / O requests. Transfer is of indeterminate size.
kB_read / s: the amount of data read from the device per second
kB_wrtn / s: the amount of data written to the device per second
kB_read: The total amount of data read
kB_wrtn: The total number of data writes
[Root @ localhost ~] # iostat -d -x -k 1 10
Linux 2.6.32-431.11.2.el6.x86_64 (localhost) 01/08/2016 _x86_64_ (4 CPU)
Device: rrqm / s wrqm / s r / s w / s rkB / s wkB / s avgrq-sz avgqu-sz await svctm% util
xvda 0.02 0.69 0.56 113.65 13.80 713.21 12.73 0.00 0.03 0.48 5.53
xvdb 0.02 17.88 1.07 18.19 21.24 144.27 17.19 0.13 6.71 1.69 3.25
Device: rrqm / s wrqm / s r / s w / s rkB / s wkB / s avgrq-sz avgqu-sz await svctm% util
xvda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
xvdb 0.00 0.00 0.00 5.00 0.00 20.00 8.00 0.11 22.00 4.40 2.20
Device: rrqm / s wrqm / s r / s w / s rkB / s wkB / s avgrq-sz avgqu-sz await svctm% util
xvda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
xvdb 0.00 0.00 0.00 16.00 0.00 64.00 8.00 0.80 50.19 6.81 10.90
Total IO (io) / s = r / s (read) + w / s (write)
Average waiting time = a single I / O service time * (1 + 2 + ... + total number of requests -1) / total number of requests
Parameter Description
rrqm / s:. perform merge operations per second number that is read delta (rmerge) / s
wrqm / s: the number of write operations per second that is merge the delta (wmerge) / s.
r / s:. complete per second read I / O device that is the number of delta (rio) / s
w / s:. complete per second write I / O device that is the number of delta (wio) / s
rsec / s: second reading sectors namely delta (rsect) / s.
wsec / s: write the number of sectors per second, ie delta (wsect) / s.
rkB / s:. K bytes per second read is rsect / s half, as each sector size is 512 bytes (required to calculate).
wkB / s:. Write K bytes per second half wsect / s (requires computing).
avgrq-sz: average each device I / O data size operations (sector) .delta (rsect + wsect) / delta (rio + wio)
avgqu-sz: average I / O queue length that is delta (aveq) / s / 1000 (because aveq of milliseconds).
await:. The average waiting time each device I / O operations (in milliseconds) that is delta (ruse + wuse) / delta (rio + wio)
svctm:. Average per-service time (in milliseconds) device I / O operations that is delta (use) / delta (rio + wio)
% Util: one second what percentage of the time for I / O operations, or how much time is one second I / O queue is not empty, that delta (use) / s / 1000 (because the use of the units. ms)
If% util close to 100%, indicating that generates an I / O request is too much, I / O system has been at full capacity, the disk may be a bottleneck.
If the idle is less than 70% IO pressure on the larger, more general reading speed wait
avgqu-sz is the need to pay attention, this is the size of the data directly to each operation, if more often, but the data is small, in fact, IO will be small. If the data is large, it will be high IO data through avgqu- sz x (r / s or w / s) = rsec / s or wsec / s
CPU Utilization Report
[Root @ localhost ~] # iostat -c 1 10
Linux 2.6.32-431.11.2.el6.x86_64 (localhost) 01/08/2016 _x86_64_ (4 CPU)
avg-cpu:% user% nice% system% iowait% steal% idle 5.09 0.00 2.08 4.28 0.00 88.55
avg-cpu:% user% nice% system% iowait% steal% idle 1.75 0.00 0.50 0.00 0.00 97.75
avg-cpu:% user% nice% system% iowait% steal% idle 1.50 0.00 0.50 0.00 0.00 98.00
avg-cpu:% user% nice% system% iowait% steal% idle 0.25 0.00 0.25 0.00 0.00 99.50
Parameter Description
% User: CPU percentage of time in user mode
% Nice: CPU time in user mode with NICE values ​​lower percentage
% System: CPU in system mode, the percentage of time
% Iowait: CPU waiting for input and output completion percentage of time
% Steal: maintenance management program to another virtual processor, a virtual CPU waits for the percentage of time unconscious
% Idle: CPU idle time percentage
If the value of% iowait too high, indicating the presence of the hard disk I / O bottlenecks,% idle value is high, said more CPU idle
If% idle value is high but the system response slow, it may be waiting for allocation of CPU memory, you should increase the memory capacity,% idle Sustained value if less than 10, then the CPU processing capacity of the system is relatively low, indicating that the system is the most CPU resources are needed to solve
Common usage
iostat -d -k 1 10 # View TPS and throughput information
iostat -d -x -k 1 10 # View equipment utilization (% util), response time (await)
iostat -c 1 10 # View cpu status
     
         
         
         
  More:      
 
- Standard and IO redirection (Linux)
- Linux server Php injection prevention (Linux)
- To install Scribus 1.4.4 under ubuntu (Linux)
- Linux system ARP attack solution (Linux)
- Python in yield (Programming)
- Build Python3.4 + PyQt5.5.1 + Eric6.1.1 development platform under Mac OS X 10.11.1 (Server)
- UNIX file permissions in the "set user ID bit" (Linux)
- VirtualBox - Linux system virtual machine shared folders (Linux)
- Availability Hadoop platform - Oozie Workflow (Server)
- Deploy Apache Spark cluster environment in Ubuntu (Server)
- CentOS 6.4 (64bit) install Python 2.7.5 (Linux)
- Ten SCP transfer command example (Linux)
- Eclipse Android development environment installation (Linux)
- Fedora 21 setting boot script (Linux)
- On the Web application attack techniques Common (Linux)
- Ceph distributed storage system is installed on a CentOS 7.1 (Server)
- Debian 8.2.0 (Jessie) fast clean installation tutorial (Linux)
- Download Google Android source code under Ubuntu 4.4 (Linux)
- HBase table data processing tab (Database)
- RedHat / CentOS ext4 partition can not be formatted large supplementary ext4 formatting (Linux)
     
           
     
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.