IOSTATS(4) IOSTATS(4) NAME iostats - file system to measure I/O SYNOPSIS iostats [ -d ] [ -C ] cmd [ args... ] DESCRIPTION Iostats is a user-level 9P filter that interposes itself between a program and the regular file server, which allows it to gather statistics of file system use at the level of the Plan 9 file system protocol, 9P. After a program exits a report is printed on standard error. The report consists of three sections. The first section reports the amount of user data in read and write messages sent by the program and the average rate at which the data was transferred. The protocol line reports the amount of data sent as message headers, that is, protocol overhead. The rpc line reports the total number of file system trans- actions. The second section gives the number of messages, the fastest, slowest, and average turn around time and the amount of data involved with each 9P message type. The final section gives an I/O summary for each file used by the program in terms of opens, reads and writes. If the -d flag is present, a debugging log including all 9P traffic is written to standard error. The -C flag sets the MCACHE flag on the mount which allows the kernel to cache (see bind(1)). EXAMPLE Display summary of file I/O incurred by ls(1): iostats ls Start a new shell, displaying all 9P traffic caused by the shell or its children: iostats -d rc SOURCE /sys/src/cmd/iostats.c SEE ALSO dup(3), exportfs(4) BUGS Page 1 Plan 9 (printed 12/21/24) IOSTATS(4) IOSTATS(4) Poor clock resolution means that large amounts of I/O must be done to get accurate rate figures. Can be fooled by programs that do fresh mounts outside its purview, or by the use of names of files with content that can vary by process (e.g., `#d', `/dev/cons'). Page 2 Plan 9 (printed 12/21/24)