• 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

mountstats Command Examples in Linux

by admin

The mountstats command displays various NFS client statistics for each given mount point. If no mount point is given, statistics will be displayed for all NFS mount points on the client. This command is useful in obtaining NFS mount options, buffered versus direct IO, RTT latency per RPC procedure, and backlog latency per RPC procedure.

mountstats Command Examples

1. To get the NFS mount stats:

# mountstats 

2. To get only NFS mount stats:

# mountstats --nfs 

3. To display the RPC stats:

# mountstats --rpc 

4. To display only the transport statistics:

# mountstats --xprt 

5. Display only the raw statistics. This is intended for use with the -f|–file and -S|–since options.

# mountstats --raw --file [file]
# mountstats --raw --since [time]

6. To display the version info:

# mountstats --version 

Conclusion

The mountstats command queries the file /proc/self/mountstats to display the NFS client statistics. You can also use this file directly to determine the date an NFS share was mounted. Use the below script/command to determine the date an NFS share was mounted.

# date -d "@$(($(date +%s)-$(grep -A 2 "/mnt " /proc/self/mountstats | awk -F: '/age/ { print $2 }')))"

“/mnt ” should be replaced with the actual mount point

Filed Under: Linux

Some more articles you might also be interested in …

  1. CentOS / RHEL 4 : How to configure interface bonding (NIC teaming)
  2. “yum clean all” not clearing yum repository cache in CentOS/RHEL/OEL
  3. CentOS / RHEL : How to prevent disabled repositories from being downloaded into the yum cache
  4. Manage ASM Audit Files with syslog – configure lograte and auditing
  5. How to install an RPM package into a different directory in CentOS/RHEL/Fedora
  6. How to enable text colour in vi similar to vim in CentOS/RHEL
  7. How To Configure 802.1q VLAN On NIC On CentOS/RHEL 7 and 8
  8. poweroff Command Examples in Linux
  9. How to disable swap in Linux
  10. Why Does “netstat” Output Show Many Connections in CLOSE_WAIT Status?

You May Also Like

Primary Sidebar

Recent Posts

  • vgextend Command Examples in Linux
  • setpci command – configure PCI device
  • db_load command – generate db database
  • bsdtar command – Read and write tape archive files

© 2022 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright