SourceFiles.org - Use the Source, Luke
Home | Register | News | Forums | Guide | MyLinks | Bookmark

Related Sites

Latest News
  General News
  Reviews
  Press Releases
  Software
  Hardware
  Security
  Tutorials
  Off Topic


Back to files

What is nfsstats?

nfsstats.pl is a NFS sub agent for the Net-SNMP snmpd daemon. It allows Linux NFS statistics (both client and server) to be made available as SNMP values. This makes them graphable by tools such as MRTG, Cacti, Ganglia etc etc.

Currently, only NFS v3 statistics are available, though other versions can easily be added at a later date. nfsstats.pl works by parsing the output of /proc/net/rpc/nfs and /proc/net/rpc/nfsd.

Craig Macdonald wrote this. Patches are welcome: <craig{funny squiggly at symbol}macdee.net> Installation
Installation instructsion are contained in the form of comments at the top of nfsstats.pl script. nfsstats.pl is only suitable for Linux. NFS version 3 statistics are made available.

Firstly, ensure you have a working Net-SNMP install. Secondly, ensure you have the Perl sub-components of Net-SNMP installed (in Fedora Core, do yum install net-snmp-perl). Thirdly, save nfsstats.pl to /var/net-snmp/. Add the following line to /etc/snmp/snmpd.conf: master agentx. Start nfsstats.pl in the way of your choice, logged to file of your choice (eg 2>/dev/null). Note that nfsstats.pl must be started as root.

If your snmpd is built with embedded Perl support (Fedora Core doesn't), then you can import the sub agent directly into the snmpd. See the script for more details. Usage
After you have successfully installed nfsstats.pl, you should be able to walk the provided OIDs: snmpwalk -v 2c -c public localhost 'enterprises.6789.6789' or snmpwalk -v 2c -c public localhost '.1.3.6.1.4.1.6789.6789'. As we have no MIB for nfsstats.pl yet, the numbers coming back wont make much sense. However, they should bear a striking resemblance to the output of /usr/sbin/nfsstat!

The list below is all the 114 statistics that nfsstats.pl can provide for SNMP values. The ones you should monitor (eg using MRTG) are entirely up to you.


Other Sites

Discussion Groups
  Beginners
  Distributions
  Networking / Security
  Software
  PDAs

About | FAQ | Privacy | Awards | Contact
Comments to the webmaster are welcome.
Copyright 2006 Sourcefiles.org All rights reserved.