Re: different data from snmpwalk

Dave Shield <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
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?



>> 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.

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.
   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.


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

------------------------------------------------------------------------------
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.