2011-03-01 22:57:17

by Simon Kirby

[permalink] [raw]
Subject: RPC slots count exported to userland

Is there a place where a summary of the same table which gets dumped out
by "echo 0 > /proc/sys/sunrpc/debug" is exported normally to userland?

"nfsstat" accesses /proc/net/rpc/nfs and /proc/net/rpc/nfsd but they just
seem to be running counts. It would be nice to set up a way to monitor
when the system is close to running out of RPC slots so we can try to
kick out whatever mount might be stuck or similar to avoid an entire
outage.

Cheers,

Simon-


2011-03-01 23:44:52

by Myklebust, Trond

[permalink] [raw]
Subject: Re: RPC slots count exported to userland

On Tue, 2011-03-01 at 14:36 -0800, Simon Kirby wrote:
> Is there a place where a summary of the same table which gets dumped out
> by "echo 0 > /proc/sys/sunrpc/debug" is exported normally to userland?
>
> "nfsstat" accesses /proc/net/rpc/nfs and /proc/net/rpc/nfsd but they just
> seem to be running counts. It would be nice to set up a way to monitor
> when the system is close to running out of RPC slots so we can try to
> kick out whatever mount might be stuck or similar to avoid an entire
> outage.

You should be able to get that information from
/proc/self/mountstats

See the 'mountstats' python script in recent nfs-utils sources for
details.

Cheers
Trond
--
Trond Myklebust
Linux NFS client maintainer

NetApp
[email protected]
http://www.netapp.com