LinuxCommandLibrary

nfsiostat

Report NFS client input/output statistics

SYNOPSIS

nfsiostat [options] [interval [count]]

PARAMETERS

-a
    Reports statistics for all RPC calls. By default, only read and write calls are reported.

-d
    Reports NFS RPC calls (operations per second and average latency) in addition to traditional throughput and latency statistics.

-k
    Displays statistics in kilobytes per second instead of blocks per second.

-m
    Displays statistics about all mounted NFS filesystems. This is often the default behavior or implied when no specific mount point is given.

-p
    Pretty-prints the output, often showing a more human-readable and organized format.

-r
    Reports RPC statistics, specifically operations per second and average latency for each NFS RPC call.

-t
    Displays a timestamp with each report generated.

-V
    Displays version information for the nfsiostat command.

-h
    Displays a help message, summarizing command usage and options.

interval
    Specifies the time in seconds between each report. If specified without count, nfsiostat reports continuously.

count
    Specifies the number of reports to generate. This option is only valid when an interval is also specified.

DESCRIPTION

nfsiostat is a powerful command-line utility for monitoring Network File System (NFS) client-side I/O performance. It's part of the sysstat package and provides detailed statistics on NFS operations, throughput, and latency for mounted NFS filesystems.

This tool helps system administrators identify and troubleshoot performance bottlenecks on Linux systems that heavily rely on NFS mounts. It can report a snapshot of current activity or continuously monitor NFS I/O over specified intervals, showing metrics like operations per second, kilobytes transferred per second, and average latency for various NFS RPC calls (e.g., read, write, getattr, open). By analyzing nfsiostat output, users can gain insights into their NFS client's behavior and optimize their storage infrastructure.

CAVEATS

nfsiostat relies on kernel-provided statistics, typically accessed via `/proc/net/rpc/nfs` or `/proc/self/mountstats`.
The availability and granularity of these statistics can vary across different Linux kernel versions.
Elevated privileges (root) may be required to access some of these kernel statistics comprehensively.
It exclusively reports client-side NFS statistics; for server-side NFS performance metrics, other tools like nfsstat are typically used.

OUTPUT INTERPRETATION

The output of nfsiostat typically includes columns such as:
Mount Point: The path where the NFS filesystem is mounted.
ops/s: Total NFS operations per second.
kB_read/s and kB_wrtn/s: Kilobytes read from and written to the NFS mount per second.
avg_rq_sz: Average request size in kilobytes.
avg_rd_lat, avg_wr_lat: Average read and write latency in milliseconds.

When `-r` or `-a` options are used, it also displays detailed statistics for individual NFS RPC calls (e.g., getattr, lookup, open, read, write), showing their operations per second and average latency.

COMMON USAGE EXAMPLES

To get a single report for all mounted NFS filesystems:
nfsiostat -m

To monitor NFS I/O every 2 seconds, for 5 reports:
nfsiostat 2 5

To get detailed RPC call statistics and latencies every 3 seconds continuously:
nfsiostat -rd 3

HISTORY

nfsiostat is an integral part of the sysstat package, a well-established suite of performance monitoring tools for Linux systems. The sysstat project, maintained by Sebastien Godard, has a long history of providing robust system performance insights.

nfsiostat specifically evolved to leverage the growing NFS client-side statistics exported by the Linux kernel, enabling more granular monitoring of distributed file system performance over time. Its development has mirrored improvements in kernel-level NFS statistics reporting.

SEE ALSO

iostat(1), sar(1), vmstat(8), nfsstat(8)

Copied to clipboard