On Tue, Apr 14, 2009 at 4:37 PM, Dave Shield <[email protected]>wrote:
> 2009/4/14 Eric Magutu <[email protected]>:
> >> What is the output of running the script
> >> /usr/local/exim-snmp-stats/snmp-stats-show.pl
> >> on the two systems?
> >> That's the obvious first thing to check,
> >
> > They are both outputting results
>
> So running /usr/local/exim-snmp-stats/snmp-stats-show.pl
> by hand on mx102 gives you real numbers, while running
> the same script via snmpd gives you all 0s. Correct?
>
The result varies but the mx is a secondary mx so it does not get a lot of
mail. I see the statistics file changing occasionally going to 2 4 but
mostly stays at 0
>
>
>
> >> If that looks OK, then try checking what user the two SNMP agents
> >> are running as, what the permissions on the stats script are,
> >> what the permissions are on any data files that this script
> >> needs to use, etc.
> >
> > Since the statistics file where the data is stored is being outputted
> and
> > everything but the last 11 lines most of which are a replication of the
> > lines just above it. I think the problem is not with the scripts or
> > permissions but with the net-snmp
>
> Well, you haven't actually told us *how* the SNMP agent is configured,
> but I'm guessing that you are using the "extend" directive.
>
here is a copy of the snmpd.conf file running on both machines
syslocation "my network"
syscontact "Eric Magutu"
sysservices 78
extend .1.3.6.1.4.1.3031.64 snmp-stats-show.pl
/usr/local/exim-snmp-stats/snmp-stats-show.pl
rocommunity public
exec .1.3.6.1.4.1.3031.64 snmp-stats-show.pl
/usr/local/exim-snmp-stats/snmp-stats-show.pl
>
> This effectively just runs the specified script, and reports the output
> (in a variety of ways).
>
> So if running the script by hand gives sensible results, and running
> it via SNMPd gives 0's - then there must be something different between
> the two environments.
>
>
> I've been assuming that you are running the same SNMP configuration
> (version, config file, etc) on both systems - although you haven't actually
> given us any information about this.
The snmpd version is 5.3.2
>
> But assuming the two setups are the same - the only explanation
> that springs to mind is that one agent might be running in a
> less-privileged mode, so the script cannot read the data file(s).
> This would certainly be one possibility for a difference between running
> the script manually, and via the agent.
>
I have uninstalled and reinstalled the snmpd and it is now producing data.
Maybe the snmpd was corrupted.
>
>
> That's why I asked about how you are running the two agents, and
> suggesting you check relevant permissions.
> If you were running Linux, I'd suggest checking the SELinux configuration
> and/or log files to see if anything was being reported there. I'm not
> sure
> whether FreeBSD has anything similar, but it would certainly be worth
> checking the log files to see whether anything is reported there.
>
>
> Dave
>
Thanks for all your help.
--
Regards,
Eric Magutu
------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users