• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

Understanding the nfsiostat command output (Examples Included)

by admin

The nfsiostat command works as iostat command for the NFS mount points on the server. It uses the file /proc/self/mountstats as input and provides information about the input/output performance of NFS shares mounted in the system. Below is a sample output from the nfsiostat command.

nfsiostat command output linux

The below table displays a short description of each column in the about output.

Field Description
op/s This is the number of operations per second.
rpc bklog This is the length of the backlog queue.
kB/s This is the number of kB written/read per second.
kB/op This is the number of kB written/read per each operation.
retrans This is the number of retransmissions.
avg RTT (ms) This is the duration from the time that client’s kernel sends the RPC request until the time it receives the reply.
avg exe (ms) This is the duration from the time that NFS client does the RPC request to its kernel until the RPC request is completed, this includes the RTT time above.

nfsiostat command syntax

Below is a syntax to use the nfsiostat command.

# nfsiostat --help
Usage: nfsiostat [interval] [count] [options] [mount point]

Options:
  --version             show program's version number and exit
  -h, --help            show this help message and exit

  Statistics Options:
    File I/O is displayed unless one of the following is specified:

    -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

  Display Options:
    Options affecting display format:

    -s, --sort          Sort NFS mount points by ops/second
    -l LIST, --list=LIST
                        only print stats for first LIST mount points

Here,
interval – time in seconds between each report.
count – number of reports to be generated at [interval] seconds apart. If you do not specify the count here, the report will be generated countinuously at the specified interval.
options – The various options are explained in the examples below.
mount_point – you can specify a specific NFS mount point for which the stats to be displayed. In this case report only for the specified mount point is generated.

Examples of nfsiostat command

1. Running nfsiostat without any arguments

When you run nfsiostat with interval as an argument, then the difference from previous interval will be displayed, otherwise the results will be from the time that the share was mounted. For example :

# nfsiostat

10.130.12.150:/data01 mounted on /data01:

   op/s         rpc bklog
   0.08            0.00
read:             ops/s            kB/s           kB/op         retrans         avg RTT (ms)    avg exe (ms)
                  0.052           6.436         124.154        0 (0.0%)           9.365           9.617
write:            ops/s            kB/s           kB/op         retrans         avg RTT (ms)    avg exe (ms)
                  0.001           0.214         199.536        0 (0.0%)           5.673          72.526

2. Running nfsiostat at particular interval

You can run the nfsiostat command at a particular interval for infinite time. Do not provide the [count] argument in that case. For example, to run the nfsiostat command continuously at the interval of 5 seconds:

# nfsiostat 5

If you do not want nfsiostat to run continuously and only want a finite number of reports, use the [count] argument with the [interval] argument. For example, to produce 10 reports at interval of 5 seconds use the below command.

# nfsiostat 5 10

3. Running nfsiostat only for a specific mount point

In case if you have several mount NFS mount points on the server and you are only concerned about a specific NFS mount point only, you can use the below command to dislay statistics of that mount point only.

# nfsiostat 5 5 /particular/mount/point

4. Sorting output by operations per second

To sort the report output by operations per second on NFS mount points use the ‘-s‘ or ‘–sort‘ argument. For example,

# nfsiostat -s

5. Displaying statistics related a a specific parameter

If you only want to display io statistics pertaining to a particular parameter, you can use below options with the nfsiostat command.

  • -a – displays statistics related to the attribute cache
  • -d – displays statistics related to directory operations
  • -p – displays statistics related to the page cache
How to troubleshoot NFS transfer latency issues using “nfsiostat” in CentOS / RHEL

Filed Under: CentOS/RHEL 6, CentOS/RHEL 7, Linux

Some more articles you might also be interested in …

  1. man: command not found
  2. How To Check Swap Usage of Each Processes in Linux
  3. How to Install Cockpit’s Web Console in CentOS/RHEL 8
  4. How to Hot-add and Remove Logical Memory in CentOS/RHEL 7
  5. CentOS / RHEL 7 : How to disable Transparent Huge pages (THP)
  6. Oracle OS watcher (OSWatcher) – Understanding oswiostat
  7. rm: command not found
  8. gsettings: command not found
  9. How to disable NetworkManager on CentOS / RHEL 7
  10. Images preview with ngx_http_image_filter_module

You May Also Like

Primary Sidebar

Recent Posts

  • powertop Command Examples in Linux
  • powertop: command not found
  • powerstat: command not found
  • powerstat Command Examples in Linux

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright