fiostat - VxFS file I/O statistics utility
fiostat on [ -o offset] [ -l length] -n nsubfiles filename
fiostat dump [ -i interval [ -c count] ] -r filename
The fiostat command prints and resets file and sub-file I/O statistics, turns on and off sub-file I/O statistics, and gets sub-file statistic configuration values. filename 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 sub-file statistics are turned on, fiostat reads and prints statistics for the sub-file units. These statistics show I/O activity since the file's last close or since the previous statistics reset.
This command works on a local node, only.
Turns on sub-file 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.
Turns off sub-file statistics for the specified file. No action is taken if the sub-file statistics are already turned off.
Prints the current configuration values, offset, length, and nsubfiles, to standard output if sub-file statistics are turned on. When sub-file statistics are turned off, fiostat prints zeroes.
Prints file statistics for the specified file to standard output. If sub-file statistics are turned on, fiostat prints the statistics to standard output.
The fiostat command stops after printing statistics count times.
Prints current I/O statistics every interval seconds.
Specifies the total length of sub-file units 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.
Specifies the file offset in bytes where the first sub-file unit starts. The offset can be specified in kilobytes, megabytes, gigabytes, or terabytes by appending k, m, g, or t. The default offset is zero.
Specifies the number of sub-file units to monitor. The number must be a non-zero value less than 1024. 1024 is the maximum number of sub-file units allowed per file.
Resets statistics to zero after each print.
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 subfile), and statistics on read and write operations:
Sub-file statistics do not include average time spent on read and write operations.
The following is sample output of a file-level-only statistics dump:
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 sub-file statistics dump:
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
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 sub-file statistics dump with -i 3 -c 3 specified:
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
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
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
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.
To display statistics for file /mnt/foo, which does not have sub-file statistics turned on:
To turn on sub-file statistics for file /mnt/foo and monitor the file from offset 1024 to offset 1024+8129=9153 in 10 sub-file units:
# 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
vxfs_fiostats_dump(3), vxfs_fiostats_getconfig(3), vxfs_fiostats_set(3)