This commit is contained in:
Denis Makogon
2018-01-23 23:15:11 +02:00
committed by Reed Allman
parent 5fc01d6974
commit a70c038760
496 changed files with 7703 additions and 5030 deletions

View File

@@ -5,6 +5,7 @@ import (
"os"
"path"
"github.com/prometheus/procfs/nfsd"
"github.com/prometheus/procfs/xfs"
)
@@ -44,3 +45,14 @@ func (fs FS) XFSStats() (*xfs.Stats, error) {
return xfs.ParseStats(f)
}
// NFSdRPCStats retrieves NFS daemon RPC statistics.
func (fs FS) NFSdRPCStats() (*nfsd.RPCStats, error) {
f, err := os.Open(fs.Path("net/rpc/nfsd"))
if err != nil {
return nil, err
}
defer f.Close()
return nfsd.ParseRPCStats(f)
}