NFS I/O Monitoring with nfsiostat: A Quick Guide

The nfsiostat command is a tool for displaying I/O statistics for each NFS (Network File System) mount point on the client. Similar to iostat, it helps monitor NFS performance by providing real-time data on the I/O activities of mounted NFS points.

Usage

nfsiostat [ interval [ count ] ] [ options ] [ <mount point> ]

Installation

On Ubuntu, you can install nfsiostat by running the following command:

sudo apt install nfs-common

Key Options

  • -a, --attr: Displays statistics related to the attribute cache.
  • -d, --dir: Displays statistics related to directory operations.
  • -p, --page: Displays statistics related to the page cache.
  • -s, --sort: Sorts NFS mount points by operations per second (ops/second), useful for identifying the most active I/O points.
  • -l LIST, --list=LIST: Only displays statistics for the first LIST number of mount points, allowing a focused view of key NFS points.

Parameters

  • interval: Sets the time interval (in seconds) between reports. The command will keep running until manually stopped or until the specified count of reports is reached.
  • count: Specifies the total number of reports to generate before terminating.
  • mount point: The NFS mount point(s) to monitor. You can specify one or more mount points to view detailed statistics for specific NFS mounts instead of all mounted NFS points by default.

Examples

  • Report I/O statistics every 5 seconds, for a total of 10 times:
nfsiostat 5 10

Identify which mount points have the highest I/O activity:

nfsiostat -s

Print statistics for the first 2 mount points:

nfsiostat -l 2

View I/O statistics for the /mnt/nfs mount point:

nfsiostat /mnt/nfs

This tool provides a valuable way to monitor the performance of NFS mounts in real time, helping system administrators identify potential bottlenecks and optimize their NFS configurations.

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注