Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Linux \ To use iostat display I / O status under Linux     - Installation and configuration of Hadoop under Linux (Server)

- Static member variable modified (Programming)

- Nginx server security configuration (Server)

- After Ubuntu Password Forgot your way back (Linux)

- Spring loaded container finishes executing a method (Programming)

- How do you temporarily emptied Bash environment variable before running the command on Linux (Linux)

- 12 kinds of detection of CPU information on a Linux system tools (Linux)

- Java data structures - the single linked list LinkedList linear table (Programming)

- Scala REPL Shell call (Programming)

- Analysis of memory mapping process in Linux x86-32 mode (Linux)

- AngularJS notes --- Scope and controller (Programming)

- About AWR More Description (Database)

- Java gets the current system time System.currentTimeMillis () (Programming)

- CentOS6.0 successful installation and configuration OpenCV (Linux)

- Diagnose and resolve the SSH connection slow (Linux)

- OpenSSL to generate public and private key (Linux)

- About Samba certification process and permissions (Linux)

- How to use Monit to deploy a server to monitor the system (Server)

- Linux installation Jetty deployment under RedHat5 8 (Linux)

- Ubuntu 14.10 used ifconfig commands to manage your network configuration (Linux)

 
         
  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:      
 
- 64 Ubuntu 15.04 Linux kernel upgrade to Linux 4.1.0 (Linux)
- To add the Oracle JDBC driver in Maven repository (Linux)
- Linux file compression and file system packaged with instructions (Linux)
- Linux Network Programming --epoll model Detailed principles and examples (Programming)
- Python script file directory traversal examples (Programming)
- LMMS 1.03 install on Ubuntu 14.04 (Linux)
- Eclipse distributed management using GitHub project development (Linux)
- How to import JNI resulting .so libraries in Android Studio (Programming)
- Oracle table compression Technology Introduction (Database)
- Ubuntu will be written in a command file, executable file, source command (Linux)
- How to install the latest version of the Eclipse in Ubuntu 14.04 (Linux)
- Node.js installed on Ubuntu Upstream version (Linux)
- Linux kernel source tree to establish load module hello (Linux)
- HttpClient Tutorial (Programming)
- I use the desktop environment in GNU / Linux combination tool (Linux)
- The basic principle of pointers in C ++ (Programming)
- Install the Solaris 10 operating system environment over the network to sparc (Linux)
- Ubuntu buffalo wzr-hp-300nh brush DD-WRT router system (Linux)
- When Linux virtual machine to another copy of the operating system, a static IP NAT mode Invalid (Linux)
- How to avoid two Chrome icon appears in ELementary OS Freya (Linux)
     
           
     
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.