Hi,

First, I run "sudo snmpd" not "sudo snmp". Sorry for the typo.

I delete those duplicated lines and it works. So, I realize that the snmpd
should take care of this kind of issue.

Now, I run snmpget -c public -v2c localhost system.sysUpTime.0

It gives me the correct result.

But, I run snmpget -c public -v2c 137.99.10.108 system.sysUpTime.0

It says "Timeout: No response from 137.99.10.108"

"137.99.10.108" is my ip address.

I suppose both "localhost" and "ip address" would give me the result. but
why not?

Thanks,
Xian

On Fri, Nov 13, 2009 at 12:01 PM, Dave Shield <[email protected]>wrote:

> 2009/11/13 Xian Chen <[email protected]>:
> > After executing sudo snmp, I check the snmp.log file.  It says:
> > Sensor Data Collection not supported
> > netsnmp_assert 0 == (ifentry->ns_flags & 0x00000100) failed
> > if-mib/ifTable/ifTable_data_access.c:285 _add_new_interface()
> > NET-SNMP version 5.4.2.1
> > So, snmpget or snmpwalk cannot pull out any information from my host.
> > Any comments?
>
>
> I've no idea what commands Apple might provide, but I would
> expect "sudo snmp" to give the error "command not found".
> We don't include a command called "snmp".
>
> Three fairly specialised error messages might indicate problems
> with individual MIB modules, but shouldn't kill the whole agent.
> If nothing else, you ought to be able to query the system group.
>
> But since you haven't given any details of what snmpget
> or snmpwalk command you've tried, it's impossible to know
> what might be happening.
>
>
> As regards to your config file.
>
>
>
> > # snmpd.conf
> > #
> > #   - created by the snmpconf configuration program
>
>  <shudder>
>
>
>
> > rwuser  admin
> > rwuser  private
> > rouser  public
>
> You should probably check whether these users have been created
> in the file /var/net-snmp/snmpd.conf.    Defining a r{ow}user line
> does *not* automatically create the user.   This has to be done
> explicitly.   See README.snmpv3 for details.
>
>
>
>
> > rocommunity  public default .1.3.6.1.2.1.1.4
> > rocommunity  public
> > rocommunity  public
>
> Three lines, listing the same community string?
> That's one of the reasons that I don't like "snmpconf"!
>
> Get rid of the first two.
> (Unless you explicitly want to limit queries to just 'sysContact'
> and nothing else!)
>
>
> > rwcommunity  private
> > rwcommunity  private
>
> Get rid of one of these (and change
> "private" to something less guessable!)
>
>
> > syslocation Right here, right now.
> > syslocation  server_room
> > syslocation  ite225
>
> > syscontact Administrator <[email protected]>
> > syscontact  [email protected]
>
> Again, there's no point in having multiple copies of these
> directives.   Decide which value you want to use, and
> get rid of the others.
>
> > #
> > # Unknown directives read in from other files by snmpconf
> > #
> > #com2sec local     localhost       COMMUNITY
> > #com2sec mynetwork NETWORK/24      COMMUNITY
> > group MyRWGroup v1         local
> > group MyRWGroup v2c        local
> > group MyRWGroup usm        local
> > group MyROGroup v1         mynetwork
> > group MyROGroup v2c        mynetwork
> > group MyROGroup usm        mynetwork
> > view all    included  .1                               80
> > access MyROGroup ""      any       noauth    exact  all    none   none
> > access MyRWGroup ""      any       noauth    exact  all    all    none
>
> If you're using the r[ow]{comunity,user} approach,
> then get rid of these lines.    They'll just confuse the issue.
>
>
>
> Dave
>
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to