⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 iostat.1

📁 linux下查看系统工具原码,如IOSTAT等
💻 1
字号:
.TH IOSTAT 1 "NOVEMBER 2005" Linux "Linux User's Manual" -*- nroff -*-.SH NAMEiostat \- Report Central Processing Unit (CPU) statistics and input/outputstatistics for devices and partitions..SH SYNOPSIS.B iostat [ -c | -d ] [ -k | -m ] [ -t ] [ -V ] [ -x ] [.I device.B [ ... ] | ALL ] [ -p [.I device.B | ALL ] ] [.I interval.B [.I count.B ] ].SH DESCRIPTIONThe.B iostatcommand is used for monitoring system input/output deviceloading by observing the time the devices are active in relationto their average transfer rates. The.B iostatcommand generates reportsthat can be used to change system configuration to better balancethe input/output load between physical disks.The first report generated by the.B iostatcommand provides statisticsconcerning the time since the system was booted. Each subsequent reportcovers the time since the previous report. All statistics are reportedeach time the iostat command is run. The report consists of aCPU header row followed by a row ofCPU statistics. Onmultiprocessor systems, CPU statistics are calculated system-wideas averages among all processors. A device header row is displayedfollowed by a line of statistics for each device that is configured.The.I intervalparameter specifies the amount of time in seconds betweeneach report. The first report contains statistics for the time sincesystem startup (boot). Each subsequent report contains statisticscollected during the interval since the previous report. The.I countparameter can be specified in conjunction with the.I intervalparameter. If the.I countparameter is specified, the value of.I countdetermines the number of reports generated at.I intervalseconds apart. If the.I intervalparameter is specified without the.I countparameter, the.B iostatcommand generates reports continuously..SH REPORTSThe.B iostatcommand generates two types of reports, the CPUUtilization report and the Device Utilization report..IP "CPU Utilization Report"The first report generated by the.B iostatcommand is the CPUUtilization Report. For multiprocessor systems, the CPU values areglobal averages among all processors.The report has the following format:.B %user.RS.RSShow the percentage of CPU utilization that occurred whileexecuting at the user level (application)..RE.B %nice.RSShow the percentage of CPU utilization that occurred whileexecuting at the user level with nice priority..RE.B %system.RSShow the percentage of CPU utilization that occurred whileexecuting at the system level (kernel)..RE.B %iowait.RSShow the percentage of time that the CPU or CPUs were idle during whichthe system had an outstanding disk I/O request..RE.B %steal.RSShow the percentage of time spent in involuntary wait by the virtual CPUor CPUs while the hypervisor was servicing another virtual processor..RE.B %idle.RSShow the percentage of time that the CPU or CPUs were idle and the systemdid not have an outstanding disk I/O request..RE.RE.IP "Device Utilization Report"The second report generated by the.B iostatcommand is the Device UtilizationReport. The device report provides statistics on a per physical deviceor partition basis. Block devices for which statistics are to be displayedmay be entered on the command line. Partitions may also be entered on thecommand line providing that option -x is not used.If no device nor partitionis entered, then statistics are displayedfor every device used by the system, andproviding that the kernel maintains statistics for it.If the.B ALLkeyword is given on the command line, then statistics aredisplayed for every device defined by the system, including thosethat have never been used.The report may show the following fields,depending on the flags used:.B Device:.RS.RSThis column gives the device (or partition) name, which is displayed as.IR hdisk nwith 2.2 kernels, for the nth device. It is displayed as.IR dev m-nwith 2.4 kernels, where.B mis the major number of the device, and.B na distinctive number.With newer kernels, the device name as listed in the /dev directoryis displayed..RE.B tps.RSIndicate the number of transfers per second that were issuedto the device. A transfer is an I/O request to thedevice. Multiple logical requests can be combined into a single I/Orequest to the device. A transfer is of indeterminate size..RE.B Blk_read/s.RSIndicate the amount of data read from the device expressed in a number ofblocks per second. Blocks are equivalent to sectors with 2.4 kernels and newerand therefore have a size of 512 bytes. With older kernels, a block is ofindeterminate size..RE.B Blk_wrtn/s.RSIndicate the amount of data written to the device expressed in a number ofblocks per second..RE.B Blk_read.RSThe total number of blocks read..RE.B Blk_wrtn.RSThe total number of blocks written..RE.B kB_read/s.RSIndicate the amount of data read from the device expressed in kilobytesper second..RE.B kB_wrtn/s.RSIndicate the amount of data written to the device expressed in kilobytesper second..RE.B kB_read.RSThe total number of kilobytes read..RE.B kB_wrtn.RSThe total number of kilobytes written..RE.B MB_read/s.RSIndicate the amount of data read from the device expressed in megabytesper second..RE.B MB_wrtn/s.RSIndicate the amount of data written to the device expressed in megabytesper second..RE.B MB_read.RSThe total number of megabytes read..RE.B MB_wrtn.RSThe total number of megabytes written..RE.B rrqm/s.RSThe number of read requests merged per second that were queued to the device..RE.B wrqm/s.RSThe number of write requests merged per second that were queued to the device..RE.B r/s.RSThe number of read requests that were issued to the device per second..RE.B w/s.RSThe number of write requests that were issued to the device per second..RE.B rsec/s.RSThe number of sectors read from the device per second..RE.B wsec/s.RSThe number of sectors written to the device per second..RE.B rkB/s.RSThe number of kilobytes read from the device per second..RE.B wkB/s.RSThe number of kilobytes written to the device per second..RE.B rMB/s.RSThe number of megabytes read from the device per second..RE.B wMB/s.RSThe number of megabytes written to the device per second..RE.B avgrq-sz.RSThe average size (in sectors) of the requests that were issued to the device..RE.B avgqu-sz.RSThe average queue length of the requests that were issued to the device..RE.B await.RSThe average time (in milliseconds) for I/O requests issued to the deviceto be served. This includes the time spent by the requests in queue andthe time spent servicing them..RE.B svctm.RSThe average service time (in milliseconds) for I/O requests that were issuedto the device..RE.B %util.RSPercentage of CPU time during which I/O requests were issued to the device(bandwidth utilization for the device). Device saturation occurs when thisvalue is close to 100%..RE.RE.SH OPTIONS.IP -cThe -c option is exclusive of the -d option and displays only theCPU usage report..IP -dThe -d option is exclusive of the -c option and displays only thedevice utilization report..IP -kDisplay statistics in kilobytes per second instead of blocks per second.Data displayed are valid only with kernels 2.4 and newer..IP -mDisplay statistics in megabytes per second instead of blocks orkilobytes per second.Data displayed are valid only with kernels 2.4 and newer..IP "-p [ { device | ALL } ]"The -p option is exclusive of the -x option and displays statistics forblock devices and all their partitions that are used by the system.If a device name is entered on the command line, then statistics for itand all its partitions are displayed. Last, the.B ALLkeyword indicates that statistics have to be displayed for all the blockdevices and partitions defined by the system, including those that havenever been used.Note that this option works only with post 2.5 kernels..IP -tPrint the time for each report displayed..IP -VPrint version number then exit..IP -xDisplay extended statistics.This option is exclusive of the -p one, and works withpost 2.5 kernels since it needs /proc/diskstats file or a mounted sysfs toget the statistics. This option may also work with older kernels (e.g. 2.4)only if extended statistics are available in /proc/partitions (the kernelneeds to be patched for that)..SH ENVIRONMENTThe.B iostatcommand takes into account the following environment variable:.IP S_TIME_FORMATIf this variable exists and its value is.BR ISOthen the current locale will be ignored when printing the date in the reportheader. The.B iostatcommand will use the ISO 8601 format (YYYY-MM-DD) instead..SH EXAMPLES.B iostat.RSDisplay a single history since boot report for all CPU and Devices..RE.B iostat -d 2.RSDisplay a continuous device report at two second intervals..RE.B iostat -d 2 6.RSDisplay six reports at two second intervals for all devices..RE.B iostat -x hda hdb 2 6.RSDisplay six reports of extended statistics at two second intervals for deviceshda and hdb..RE.B iostat -p sda 2 6.RSDisplay six reports at two second intervals for device sda and all itspartitions (sda1, etc.).SH BUGS.I /procfilesystem must be mounted for.B iostatto work.Extended statistics are available only withpost 2.5 kernels..SH FILES.I /proc/statcontains system statistics..I /proc/partitionscontains disk statistics (for pre 2.5 kernels that have been patched)..I /proc/diskstatscontains disks statistics (for post 2.5 kernels)..I /syscontains statistics for block devices (post 2.5 kernels)..SH AUTHORSebastien Godard (sysstat <at> wanadoo.fr).SH SEE ALSO.BR sar (1),.BR mpstat (1),.BR vmstat (8).I http://perso.wanadoo.fr/sebastien.godard/

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -