• 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 : How to create and host yum repository over httpd
  2. host Command Examples in Linux
  3. CentOS / RHEL 6 : How to extract initramfs image and edit/view it
  4. cpio: command not found
  5. dnsrecon: command not found
  6. lrztar Command Examples in Linux
  7. wifi-menu: command not found
  8. a2dissite: command not found
  9. btrfs check Command Examples in Linux
  10. CIFS Share Filesystem Is Not Mounted after Reboot on CentOS/RHEL 7

You May Also Like

Primary Sidebar

Recent Posts

  • nixos-rebuild Command Examples in Linux
  • nixos-option: Command Examples in Linux
  • nixos-container : Command Examples in Linux
  • nitrogen Command Examples in Linux

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright