fiostat (1)

NAME

fiostat - VxFS file I/O statistics utility

AVAILABILITY

VRTSvxfs

SYNOPSIS

fiostat on [ -o offset] [ -l length] -n nfilerange pathname

fiostat off pathname

fiostat reset pathname

fiostat getconfig pathname

fiostat dump [ -i interval [ -S ] [ -c count] ] -r pathname

DESCRIPTION

The fiostat command prints and resets file and file range I/O statistics, turns on and off file range I/O statistics, and gets file range statistic configuration values. A file range is the portion of the file starting from the offset offset, and ending at the offset equal to offset plus length. The pathname parameter can be the pathname of a regular file or a QIO file. The file name extension ::cdev:vxfs: is required for a QIO file.

The fiostat command reads file-level I/O statistics for the specified file and prints the statistics to standard output. If file range statistics are turned on, fiostat reads and prints statistics for the file ranges. These statistics show I/O activity since the file’s last close or since the previous statistics reset.

KEYWORDS

on Turns on file range statistics for the specified file. If it is already on, current statistics are reset to zero and the configuration is set to the specified values.
off Turns off file range statistics for the specified file. No action is taken if the file range statistics are already turned off.
reset Resets statistics to zero.
getconfig Prints the current configuration values, offset, length, and nfilerange, to standard output if file range statistics are turned on. When file range statistics are turned off, fiostat prints zeroes.
dump Prints file statistics for the specified file to standard output. If file range statistics are turned on, fiostat prints the statistics to standard output.

OPTIONS

-c count The fiostat command stops after printing statistics count times.
-i interval Prints current I/O statistics every interval seconds.
-l length Specifies the total length of file ranges in bytes. The length can be specified in kilobytes, megabytes, gigabytes, or terabytes by appending k, m, g, or t. The default length is the file’s current size.
-o offset Specifies the file offset in bytes where the first file range starts. The offset can be specified in kilobytes, megabytes, gigabytes, or terabytes by appending k, m, g, or t. The default offset is zero.
-n nfilerange
  Specifies the number of file ranges to monitor. The number must be a non-zero value less than 1024. 1024 is the maximum number of file ranges allowed per file.
-r Resets statistics to zero after each print.
-S Displays statistics for each interval. Otherwise, the fiostat command displays the accumulated statistics for the entire time interval.

OUTPUT FORMAT

I/O statistics are printed in a single line output record preceded by the file’s name, the current local time on the system, the time when statistics were reset last, and two header lines. The output line consists of blank-separated fields for the object type (file or file range), and statistics on read and write operations:
o Number of read operations
o Number of write operations
o Number of bytes read
o Number of bytes written
o Average time spent on read operations
o Average time spent on write operations

File range statistics do not include average time spent on read and write operations.

The following is sample output of a file-level-only statistics dump:


File Name: /mnt/foo Current time: Wed 28 Sep 2005 01:08:33 PM PDT Reset time: Wed 28 Sep 2005 01:06:33 PM PDT FILE/SUBFILE OPERATIONS BYTES AVG TIME(ms) READ WRITE READ WRITE READ WRITE

file 341 348 34926 35699 4.1 4.5

The following is sample output of a file and file range statistics dump:

File Name: /mnt/foo Current time: Wed 28 Sep 2005 01:08:33 PM PDT Reset time: Wed 28 Sep 2005 01:06:33 PM PDT FILE/SUBFILE OPERATIONS BYTES AVG TIME(ms) READ WRITE READ WRITE READ WRITE

file 341 348 34926 35699 4.1 4.5 filerange1 27 24 2780 2434 filerange2 27 28 2744 2813 filerange3 27 28 2767 2808 filerange4 25 26 2552 2634

If the -i interval option is supplied, statistics are prefaced with two time stamps showing the current local time on the system and when statistics were reset last.

The following is sample output of a file and file range statistics dump with -i 3 -c 3 specified:


File Name: /mnt/foo FILE/SUBFILE OPERATIONS BYTES AVG TIME(ms) READ WRITE READ WRITE READ WRITE

Current time: Wed 28 Sep 2005 12:56:40 PM PDT Reset time: Wed 28 Sep 2005 12:51:50 PM PDT file 297 301 30426 30918 4.1 4.5 filerange1 24 19 2503 1984 filerange2 24 23 2447 2398 filerange3 24 24 2439 2467 filerange4 21 22 2122 2293 Current time: Wed 28 Sep 2005 12:56:45 PM PDT Reset time: Wed 28 Sep 2005 12:51:50 PM PDT file 322 324 33074 33746 4.1 4.5 filerange1 26 22 2677 2204 filerange2 26 26 2626 2664 filerange3 26 26 2680 2695 filerange4 23 24 2368 2490 Current time: Wed 28 Sep 2005 12:56:50 PM PDT Reset time: Wed 28 Sep 2005 12:51:50 PM PDT file 341 348 34926 35699 4.1 4.5 filerange1 27 24 2780 2434 filerange2 27 28 2744 2813 filerange3 27 28 2767 2808 filerange4 25 26 2552 2634

EXIT CODES

fiostat exits with a non-zero status if the attempted operation fails. A non-zero exit code is not a complete indicator of the problems encountered, but rather denotes the first condition that prevented further execution of the command.

EXAMPLES

To display statistics for file /mnt/foo, which does not have file range statistics turned on:

# fiostat dump /mnt/foo

To turn on file range statistics for file /mnt/foo and monitor the file from offset 1024 to offset 1024+8129=9153 in 10 file ranges:


# fiostat on -o 1024 -l 8129 -n 10 /mnt/foo

To display statistics for file /mnt/foo 8 times at 5-second interval:


fiostat dump -i 5 -c 8 /mnt/foo

SEE ALSO

vxfs_fiostats_dump(3), vxfs_fiostats_getconfig(3), vxfs_fiostats_set(3)


VxFS 5.1 SP1 fiostat (1)