Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Iostat of aix basic command

2025-02-22 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Reports statistics for the central processing unit (CPU), asynchronous input / output (AIO) and input / output statistics for the entire system, adapters, tty devices, disks, and CD-ROM. [@ more@]

Grammar

Iostat [- a] [- l] [- s] [- t] [- T] [- z] [{- A [- P] [- Q |-Q]} | {- d |-D [- R]} [- m] [Drives.] [Interval] [Count]

Description

The iostat command is used to monitor the system input / output device load by observing the active time of the physical disks associated with their average transfer rate. The reports generated by the iostat command can be used to change the system configuration to better balance the input / output load between the physical disk and the adapter.

Every time you run the iostat command, all statistics are reported. The report consists of the tty and CPU header line and the following tty or asynchronous Imax O and CPU statistics lines. On multiprocessor systems, CPU statistics are calculated system-wide and are the average of all processors.

The brow line with the number of CPU currently active in the system and the number of disks active is displayed at the beginning of the output. If you specify the-s flag, the system eyebrow row is displayed, and the next line is the statistics for the entire system. The system hostname is displayed in the system eyebrow line.

If you specify the-a flag, an adapter header line is displayed, followed by a row of adapter statistics. This will be followed by a disk header line and statistics for all disks / CD-ROM connected to the adapter. Generate this report for all disk adapters connected to the system.

Displays a disk header line, followed by statistics for one line of configured disks. If you specify the PhysicalVolume parameter, only those specified names are displayed.

If you specify the PhysicalVolume parameter, you can specify one or more alphanumeric physical volumes. If you specify the PhysicalVolume parameter, the tty and CPU reports are displayed and the disk report contains statistics for the specified drive. If the specified logical drive name is not found, the report lists the specified name and displays a message that the drive was not found. If no logical drive name is specified, the report contains statistics for all configured disks and CD-ROM. If there is no drive configured on the system, no disk report is generated. The first character in the PhysicalVolume parameter cannot be numeric.

The Interval parameter specifies the amount of time in seconds between each report. If the Interval parameter is not specified, the iostat command generates a report containing statistics that are generated during system startup (boot) time. The Count parameter can be specified to connect the Interval parameter. If the Count parameter is specified, its count value determines the number of reports generated in Interval seconds. If the Interval parameter is specified but the Count parameter is not specified, the iostat command continues to generate reports.

The iostat command is used to determine whether a physical volume is creating a performance bottleneck and whether it is possible to improve the situation. The% usage field of the physical volume indicates how evenly file activity is distributed in the drive. The high% utilization of physical volumes is a good sign that there may be contention for this resource. Because the statistics on CPU usage also apply to iostat reports, the percentage of time CPU spent in the I _ Pot O waiting queue can be determined at the same time. If the Icano wait time is a significant number and disk usage is not evenly distributed across the volume, consider distributing data on the drive.

Starting with AIX 5.3, the iostat command reports the number of physical processors consumed (physc) and the percentage of licenses consumed (% entc) in a micro-partitioned environment. These metrics are displayed only in micro-partitioned environments.

Note:

Part of the system resources are consumed in maintaining disk Ibank O history for the iostat command. Use the sysconfig subroutine or the system Management Interface tool (SMIT) to stop the history account. When the iostat command is running iteratively for Count, and if there are changes in the system configuration that affect the output of the iostat command, it displays a warning message about the configuration change. After the updated system configuration information and title are displayed, it then continues to output.

Report

The iostat command generates four types of reports, tty and CPU usage reports, disk usage reports, system throughput reports, and adapter throughput reports.

Tty and CPU usage report

The first report generated by the iostat command is the tty and CPU usage report. For multiprocessor systems, the CPU value is the total average of all processors. At the same time, the Imap O wait state is defined at the system level, not per processor. The report has the following format:

Column description

Tin shows the total number of characters read by the system for all tty.

Tout shows the total number of characters written by the system for all tty.

% user shows the percentage of CPU usage generated at the user level (application) execution.

% sys shows the percentage of CPU usage generated during system-level (kernel) execution.

% idle shows the percentage of time when CPU is idle and the system does not have outstanding disk IDUBO requests.

% iowait shows the percentage of time when the system has outstanding disk Icano requests during the CPU idle.

The number of physical processors consumed by physc is displayed only when partitions are running with shared processors.

The percentage of header capacity consumed by% entc is displayed only when the partition is running with the shared processor.

At regular intervals, the kernel updates this message (usually 60 times per second). The tty report provides the total number of characters per second received from all terminals in the system, and the total number of characters output per second to all terminals in the system.

The method used to calculate the waiting time of CPU disk

Operating system V4.3.3 and later versions contain an enhanced method to estimate the percentage of time CPU spends waiting on disk I wio O (disk time). The method used on AIX 4.3.2 and earlier versions of the operating system can give an enlarged view of wio time on SMP under certain conditions. The wio time is reported based on the commands sar (% wio), vmstat (wa), and iostat (% iowait).

The method used in AIX 4.3.2 and earlier versions is as follows: on each clock interrupt per processor (one hundred times per second), it is determined which of the four categories (usr/sys/wio/idle) is placed in the last 10ms. If CPU is busy in usr mode at the time of clock outage, usr gets this time point and assigns it to this class. If the CPU is busy in kernel mode at the time of the clock interrupt, the sys category gets the timing point. If CPU is not busy, it will check to see if any disk Icano is in progress. If you are doing any disk Ihop O, the wio category will be increased. If the disk is in an Iramo operation and the CPU is not busy, the idle category will get the timing point. An enlarged view of wio time is caused by the fact that all idle CPU are classified as wio, regardless of the number of threads waiting on Iwio O. For example, a system with only one thread performing wio O can report more than 90% of its wio time, regardless of its number of CPU.

The method used in AIX 4.3.3 and subsequent releases is as follows: if you start an unfinished IAIX O on that CPU, the change in operating system V4.3.3 marks only one free CPU as wio. This method can report less wio time when only a small number of threads are executing Igamo or the system will be idle. For example, a system with four CPU and only one thread executing wio O will report a maximum of 25% wio time. A system with 12 CPU and only one thread executing the wio O will report a maximum wio time of 8%. The NFS client reads / writes through VMM, and the time spent in the vmm wait to complete an Imax O will now be reported as the Imax O wait time.

Disk usage report

The second report generated by the iostat command is the disk usage report. Disk reports provide statistics on a per-physical disk basis. The default report has a format similar to the following:

% tm_act represents the percentage of time that the physical disk is active (bandwidth usage of the drive).

Kbps represents the amount of data transferred (read or write) to the drive in KB per second.

Tps represents the number of transfers per second output to the physical disk. A transfer is an Icano request to a physical disk. A plurality of logical requests can be combined as a single Ipicuro request to the disk. The transmission has an uncertain size.

Total number of KB read by Kb_read.

Total number of KB written by Kb_wrtn.

If the-D flag is specified, the following metrics are reported:

Metrics related to disk transfer (xfer):

% tm_act represents the percentage of time that the physical disk is active (bandwidth usage of the drive).

Bps represents the amount of data transferred (read or write) to the drive per second. Different suffixes are used to represent the transmission unit. The default unit is bytes per second.

Tps represents the number of transfers per second output to the physical disk. A transfer is an Icano request to a physical disk. A plurality of logical requests can be combined as a single Ipicuro request to the disk. The transmission has an uncertain size.

Bread represents the amount of data read from the drive per second. Different suffixes are used to represent the transmission unit. The default unit is bytes per second.

Bwrtn represents the amount of data written to the drive per second. Different suffixes are used to represent the transmission unit. The default unit is bytes per second.

Disk read service metric (read):

Rps represents the number of read transmissions per second.

Avgserv represents the average service time per read transfer. Different suffixes are used to represent units of time. The default is milliseconds.

Minserv represents the minimum read service time. Different suffixes are used to represent units of time. The default is milliseconds.

Maxserv represents the maximum read service time. Different suffixes are used to represent units of time. The default is milliseconds.

Timeouts represents the number of read timeouts per second.

Fails represents the number of failed read requests per second.

Disk write service metric (write):

Wps represents the number of write transfers per second.

Avgserv represents the average service time per write transfer. Different suffixes are used to represent units of time. The default is milliseconds.

Minserv represents the minimum write service time. Different suffixes are used to represent units of time. The default is milliseconds.

Maxserv represents the maximum write service time. Different suffixes are used to represent units of time. The default is milliseconds.

Timeouts represents the number of write timeouts per second.

Fails represents the number of failed write requests per second.

Disk waiting queue service metric (queue):

Avgtime represents the average time that a transport request spends waiting in the queue. Different suffixes are used to represent units of time. The default is milliseconds.

Mintime represents the minimum time that a transport request spends waiting in the queue. Different suffixes are used to represent units of time. The default is milliseconds.

Maxtime represents the maximum time that a transport request spends waiting in the queue. Different suffixes are used to represent units of time. The default is milliseconds.

Avgwqsz represents the average size of the waiting queue.

Avgsqsz represents the average size of the service queue.

Sqfull represents the number of times the service queue becomes full per second (that is, the disk no longer accepts any service requests).

Suffix annotations that represent different illustration units

Suffix description

K 1000 byte

M 1 000 000 bytes (if displayed in xfer metrics). Minutes (if displayed as a read / write / wait service metric).

G 1 000 000 000 bytes.

T 1 000 000 000 bytes.

S seconds.

H hours.

Note:

For drives that do not support service time metrics, read, write, and wait queue service metrics are not displayed.

Statistics for CD-ROM devices are also reported.

System Throughput report

If you specify the-s flag, this report will be generated. This report provides statistics for the entire system. The report has the following format:

Kbps represents the amount of data transferred (read or write) to the entire system in KB per second.

Tps represents the number of transfers per second to the entire system.

The total number of KB read by Kb_read from the entire system.

Kb_wrtn writes to the total number of KB for the entire system.

Adapter Throughput report

If you specify the-a flag, the report is generated. This report provides statistics based on each adapter, including physical and virtual adapters. This report has the following format for physical adapter reports:

Kbps represents the amount of data transferred to (read or write) to the adapter in KB per second.

Tps represents the number of transfers output to the adapter per second.

The total number of KB read by Kb_read from the adapter.

The total number of KB written to the adapter by Kb_wrtn.

The default throughput report for virtual adapters has the following format:

Kbps represents the amount of data transferred to (read or write) to the adapter in KB per second.

Tps represents the number of transfers output to the adapter per second.

The number of blocks received by bkread from the managed server to this adapter per second.

The number of blocks sent by bkwrtn from this adapter to the managed server per second.

The partition identity of the partition-id managed server, which serves requests sent by this adapter.

The extended throughput report for the virtual adapter (- D option) has the following format:

Metrics related to transmission (xfer:)

Kbps represents the amount of data transferred to (read or write) to the adapter in KB per second.

Tps represents the number of transfers output to the adapter per second.

The number of blocks received by bkread from the managed server to this adapter per second.

The number of blocks sent by bkwrtn from this adapter to the managed server per second.

The partition identity of the partition-id managed server, which serves requests sent by this adapter.

The adapter reads the service metric (read:)

Rps represents the number of read requests per second.

Avgserv represents the average time it takes to receive a response from a managed server as a read request sent. Different suffixes are used to represent units of time. The default is milliseconds.

Minserv represents the minimum time that a read request that has been sent receives a response from a managed server. Different suffixes are used to represent units of time. The default is milliseconds.

Maxserv represents the maximum time that a read request that has been sent receives a response from a managed server. Different suffixes are used to represent units of time. The default is milliseconds.

The adapter writes the service metric (write:)

Wps represents the number of write requests per second.

Avgserv represents the average time it takes to receive a response from a managed server as a sent write request. Different suffixes are used to represent units of time. The default is milliseconds.

Minserv represents the minimum time to receive a response from a managed server as a sent write request. Different suffixes are used to represent units of time. The default is milliseconds.

Maxserv represents the maximum time to receive a response from a managed server as a sent write request. Different suffixes are used to represent units of time. The default is milliseconds.

Adapter waits for queue metric (queue:)

Avgtime represents the average time that a transport request spends waiting in the queue. Different suffixes are used to represent units of time. The default is milliseconds.

Mintime represents the minimum time that a transport request spends waiting in the queue. Different suffixes are used to represent units of time. The default is milliseconds.

Maxtime represents the maximum time that a transport request spends waiting in the queue. Different suffixes are used to represent units of time. The default is milliseconds.

Avgwqsz represents the average size of the waiting queue.

Avgsqsz represents the average size of the service queue.

Sqfull represents the number of times the service queue becomes full per second (that is, the managed server no longer accepts any service requests).

Suffix annotations that represent different illustration units

Suffix description

K 1000 bytes.

M 1 000 000 bytes (if displayed in xfer metrics). Minutes (if displayed as a read / write / wait service metric).

G 1 000 000 000 bytes.

T 1 000 000 000 bytes.

S seconds.

H hours.

Asynchronous Ipaw O report

The Asynchronous Icano report has the following headings:

Avgc specifies the average global AIO request count per second for the interval.

Avfc specifies the average fast path request count per second for the interval.

The maximum global AIO request count since maxgc last accessed this value.

The maximum count of fast path requests since maxfc last accessed this value.

The maximum number of AIO requests allowed by maxreqs.

Disk input / output history

To improve performance, the collection of disk input / output statistics has been disabled. To enable the collection of this data, enter:

Chdev-l sys0-an iostat=true

To display the current settings, enter:

Lsattr-E-l sys0-an iostat

If the collection of disk input / output history is disabled and iostat is called without a time interval, the iostat output shows that the message disk history since boot is not available instead of disk statistics.

Mark

-a specifies the adapter throughput report.

-A displays AIO statistics for the specified interval and count.

-d specifies only drive reports.

-D specifies only the extended drive report.

-l displays the output in a long list. The default column width is 80.

-m specifies the statistics for the path.

The-P option is the same as the-An option, except for data obtained using the POSIX AIO call.

-Q specifies AIO queues and their request counts.

-Q displays a list of all mounted file systems and associated queues and their request counts.

-R specifies that the min* and max* values should be reset at each interval. By default, only one reset will be performed when iostat starts.

-s specifies the system throughput report.

-t specifies only tty/cpu reports.

-T specifies the timestamp.

-z resets disk input / output statistics. Only root users can use this option.

Note:

-Q or-Q can only be specified with-A.

-an and-s can also be specified with-A, but not with-A when-Q or-Q is specified.

-t and-d cannot be specified at the same time.

-t and-D cannot be specified at the same time.

-d and-D cannot be specified at the same time.

-R can only be specified with-D.

Example

To display a single history report after boot for all tty, CPU, and disks, enter:

Iostat

To display a persistent disk report with a two-second interval for a disk with a logical name of disk1, enter:

Iostat-d disk1 2

To display six reports with a two-second interval for a disk with the logical name disk1, enter:

Iostat disk1 2 6

To display six reports with a two-second interval for all disks, enter:

Iostat-d 2 6

To display six reports in two-second intervals for three disks named disk1, disk2, and disk3, enter:

Iostat disk1 disk2 disk3 2 6

To print a system throughput report since the system booted, enter:

Iostat-s

To print an adapter throughput report with a five-second interval, enter:

Iostat-a 5

To print ten system and adapter throughput reports at 20-second intervals with only tty and CPU reports (no disk reports), enter:

Iostat-sat 20 10

To print a system and adapter throughput report (every 30 seconds) with disk usage reports for hdisk0 and hdisk7, enter:

Iostat-sad hdisk0 hdisk7 30

To display the timestamp of the next line of each line of iostat output, enter:

Iostat-T 60

To display six reports on AIO at two-second intervals, enter:

Iostat-A 2 6

To display AIO statistics for queues associated with all mounted file systems since boot, enter:

Iostat-A-Q

To display the extended drive report for all disks, enter:

Iostat-D

To display an extended drive report for a specific disk, enter:

Iostat-D hdisk0

To reset disk input / output statistics, enter:

Iostat-z

File

/ usr/bin/iostat contains the iostat command.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report