Re: mib2c.table_data.conf, cache timeout period does'nt seems to change.

2012-02-10 Thread Dave Shield
On 10 February 2012 20:06, Francois Bouchard  wrote:
> I was asking for hints about the cache timeout values.  It can't be modify
> when changing the xxx_TIMEOUT define statement ( ie.e stays at 60 seconds )

H
  you should be able to modify this timeout by editing the header
file and recompiling the module.

Perhaps you could post the code that you're working with
so that we can test this

Dave

--
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: mib2c.table_data.conf, cache timeout period does'nt seems to change.

2012-02-10 Thread Francois Bouchard
Hi,
Sorry about the mistake,

I was asking for hints about the cache timeout values.  It can't be modify
when changing the xxx_TIMEOUT define statement ( ie.e stays at 60 seconds )


Any hints?

Francois


> But to answer your question - yes, I believe -S cache=1
> *is* different to "local cached copy" option
They are binary equal files



2012/2/10 Dave Shield 

> On 10 February 2012 15:02, Francois Bouchard 
> wrote:
> > Is there defference in the code using mib2c -S cache=1 -c
> > mib2c.table_data.conf myTable   instead of
> > mib2c -c mib2c.table_data.conf my myTable, option 1) ?
>
> Errr... that second form looks invalid.
> mib2c only takes a single root OID.
>
> It would either be
>
>mib2c -c mib2c.table_data.conf  my
> or
>mib2c -c mib2c.table_data.conf  myTable
>
> Not both.
>
> I'm not quite sure why you're being asked questions
> (unless it's because of the invalid invocation) - table_data
> is a single, non-interactive configuration.
>
> But to answer your question - yes, I believe -S cache=1
> *is* different to "local cached copy" option
>
> Dave
>
--
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: mib2c.table_data.conf, cache timeout period does'nt seems to change.

2012-02-10 Thread Dave Shield
On 10 February 2012 15:02, Francois Bouchard  wrote:
> Is there defference in the code using mib2c -S cache=1 -c
> mib2c.table_data.conf myTable   instead of
> mib2c -c mib2c.table_data.conf my myTable, option 1) ?

Errr... that second form looks invalid.
mib2c only takes a single root OID.

It would either be

mib2c -c mib2c.table_data.conf  my
or
mib2c -c mib2c.table_data.conf  myTable

Not both.

I'm not quite sure why you're being asked questions
(unless it's because of the invalid invocation) - table_data
is a single, non-interactive configuration.

But to answer your question - yes, I believe -S cache=1
*is* different to "local cached copy" option

Dave

--
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: mib2c on entire MIB -- gluing the bits together

2012-02-10 Thread Dave Shield
On 10 February 2012 14:41, Chris Smith  wrote:
> What do I then need to do to glue the bits together into a working
> subagent?

a)   Tweak the code that handles the 'initialize' calls, so that both
  init routines are invoked.
 (either by adding 'init_myTable' to the scalar initialisation code,
  adding 'init_myScalars' to the table initialisation code,
  or calling both of them at the same point in the main
  subagent driving code)

b)   Tweak the environment used to build the subagent, so that
  it compiles and links both (or all) the MIB modules into
  the same binary.

>  Presumably I somehow need to run mib2c on the root node,
> myMIB, to generate code that registers and delegates calls to the scalar
> and table nodes.  And what about the subagent wrapper that talks to the
> master?

It's probably not worth trying to handle this using mib2c directly.
Take the individual generated code file, and merge them by hand.

Dave

--
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


snmpd on ARM, error with /proc/bus/pci

2012-02-10 Thread Patrick
Hello all,

I am using snmpd on a ARM based target running Linux. This target have no PCI.
When I try to start snmpd  I have the following error:

/etc/init.d/snmpd start
Starting network management services:pcilib: Cannot open /proc/bus/pci
pcilib: Cannot find any working access method.
 snmpd.

Of course, as I have not PCI on my target, I have no pci entry in /proc/bus.
I have looked inside the configure script of net-snmp and libpci is needed for 
if-mib description.

How could I properly disable this ?

Thanks in advance

Patrick

--
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


mib2c on entire MIB -- gluing the bits together

2012-02-10 Thread Chris Smith
Hi,

I'm a new Net-SNMP user, learning how to code my first MIB subagent for
a pre-written MIB file.  I gather, from searching these archives, that
mib2c is intended to be run on a single MIB node with a single type of
data, so if I had the following MIB:

myMIB
myMIB.scalar
myMIB.table

I would run mib2c on myMIB.scalar and again on myMIB.table, generating
two sets of .c/.h files, correct?

What do I then need to do to glue the bits together into a working
subagent?  Presumably I somehow need to run mib2c on the root node,
myMIB, to generate code that registers and delegates calls to the scalar
and table nodes.  And what about the subagent wrapper that talks to the
master?

Thanks,
Chris
-- 
Chris Smith 

--
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: mib2c.table_data.conf, cache timeout period does'nt seems to change.

2012-02-10 Thread Francois Bouchard
oups wrong button let me finish my post,

Is there defference in the code using mib2c* -S cache=1* -c
mib2c.table_data.conf myTable  * instead of*  mib2c -c
mib2c.table_data.conf my myTable, *option 1)* ?



Thanks
Francois

2012/2/10 Francois Bouchard 

> Hi,
>
>
> For tables implemented with the mib2c.table_data.conf script (option 1,
> for cache enabled) the default timeout period of 60 seconds is working well
> but when I lower that value with the
> #define statement (5, then 30) the timeout period stays steady at 60
> seconds)
>
>
> The code for the table is generated with the script
>
>mib2c -c mib2c.table_data.conf my myTable, option 1)  Hold a local
> cached copy of some external data which is then used to service incoming
> requests.
>
>
>
>
>
>
>   mib2c -Scache=1  -c mib2c.table_data.conf  myTable
>
>
>
>
> I'll try some other stuff today.
>
> Francois
>
--
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


mib2c.table_data.conf, cache timeout period does'nt seems to change.

2012-02-10 Thread Francois Bouchard
Hi,


For tables implemented with the mib2c.table_data.conf script (option 1, for
cache enabled) the default timeout period of 60 seconds is working well but
when I lower that value with the
#define statement (5, then 30) the timeout period stays steady at 60
seconds)


The code for the table is generated with the script

   mib2c -c mib2c.table_data.conf my myTable, option 1)  Hold a local
cached copy of some external data which is then used to service incoming
requests.






  mib2c -Scache=1  -c mib2c.table_data.conf  myTable




I'll try some other stuff today.

Francois
--
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


UDS

2012-02-10 Thread shay naveh
Hi all,
I have 2 questions regarding UDS in SNMP:
1. Does SNMP ( any version ) support abstract names? if so, from which
version? and how they are configured?
Note: UDS abstract name is a UDS socket which is opened in the process
memory rather than as a file path.

2. snmpd opens /etc/snmptrap UDS. What is the reason for this socket and
how can one disable it?

Thx,
Shay
--
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Intermittent time-outs

2012-02-10 Thread Ivan Lezhnjov Jr.
Hi everyone!

Here's a pretty weird problem. We have a NMS server and a bunch of
servers and equipment to keep an eye on with the help of net-snmp.
Intermittently snmpwalk will fail to get data from one of the servers
and end its attempt with this:

[root@nms ~]# snmpwalk  -v2c -c $PASS $SERVER
Timeout: No Response from $SERVER

What happens to snmpd on the server that is being monitored is the
following (in strace parlance):

[root@server ~]# ps axuwf |grep snmp
root 20630  0.0  0.7  80308 59808 ?Sl   Jan28  14:29
/usr/sbin/snmpd -Lsd -Lf /dev/null -p /var/run/snmpd.pid -a
root 23964  0.0  0.0   3912   668 pts/3S+   16:38   0:00
  \_ grep snmp
[root@server ~]# strace -p 20630
Process 20630 attached - interrupt to quit
select(18, [17], NULL, NULL, {0, 769000}) = 0 (Timeout)
select(18, [17], NULL, NULL, {1, 0})= 0 (Timeout)
select(18, [17], NULL, NULL, {1, 0})= 0 (Timeout)
select(18, [17], NULL, NULL, {1, 0})= 0 (Timeout)
select(18, [17], NULL, NULL, {1, 0})= 0 (Timeout)
select(18, [17], NULL, NULL, {1, 0})= 0 (Timeout)
select(18, [17], NULL, NULL, {1, 0})= 0 (Timeout)
select(18, [17], NULL, NULL, {1, 0})= 0 (Timeout)
select(18, [17], NULL, NULL, {1, 0})= 0 (Timeout)
select(18, [17], NULL, NULL, {1, 0})= 0 (Timeout)
select(18, [17], NULL, NULL, {1, 0})= 0 (Timeout)
select(18, [17], NULL, NULL, {1, 0})= 1 (in [17], left {0, 458000})
read(17, "36\n", 1023)  = 3
select(18, [17], NULL, NULL, {1, 0})= 1 (in [17], left {1, 0})
--- SIGCHLD (Child exited) @ 0 (0) ---
read(17, "", 1020)  = 0
waitpid(24053, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], WNOHANG) = 24053
close(17)   = 0
pipe([15, 16])  = 0
pipe([17, 18])  = 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0xb7f92928) = 24126
close(15)   = 0
close(18)   = 0
close(16)   = 0
select(18, [17], NULL, NULL, {1, 0})= 0 (Timeout)
select(18, [17], NULL, NULL, {1, 0})= 0 (Timeout)
select(18, [17], NULL, NULL, {1, 0})= 0 (Timeout)
select(18, [17], NULL, NULL, {1, 0})= 0 (Timeout)
select(18, [17], NULL, NULL, {1, 0})= 0 (Timeout)
select(18, [17], NULL, NULL, {1, 0}

My first thought was to check the Internet link (yes, the server is
not on the LAN or in DMZ), which looked fine by the way, and the
server actually is a SIP server serving quite a bit of calls, but
there were no issues related to poor link quality with the calls at
all.

I then tried to snmpalk localhost right on the server where snmpd is installed:

[root@server ~]# snmpwalk  -v2c -c $PASS localhost
Timeout: No Response from localhost

Now, this timeout lasts only for as long as (approximately) 20-30s.

The problem is that Cacti running on NMS server has stopped to draw
graphs since a long time. That is why I set out to figure why it was
so. However, I couldn't pinpoint exactly what the problem is so far.
Interestingly, the graps started reappearing again, but they're kind
of incomplete. It looks to me as if Cacti poller fails to communicate
with the server's snmpd for whatever reason. See screenshot at
http://i.imgur.com/PI3yE.jpg to get a visual on these graphs and alleged
incompleteness. Note, that this graph used to work just fine for some
time. This is the server that was set up and configured by someone
long before me, so I don't know whether anything has been changed.
I've been told that there were no changes to the configuration of the
NMS but the problem arose simply out of the blue. Can't tell how
accurate that information is, but let's just assume it is.

I've no clue how to further troubleshoot this problem and whether the
timeouts I see in strace are the problem. Thought I'd write this
message and hopefully someone will be able to help.

Here's the system information where snmpd runs:

[root@server ~]# uname -a
Linux server 2.6.18-164.el5PAE #1 SMP Thu Sep 3 04:10:44 EDT 2009 i686
i686 i386 GNU/Linux
[root@server ~]# cat /etc/redhat-release
CentOS release 5.3 (Final)
[root@server ~]# yum list installed |grep snmp
net-snmp.i386   1:5.3.2.2-5.el5_3.2installed
net-snmp-devel.i386 1:5.3.2.2-5.el5_3.2installed
net-snmp-libs.i386  1:5.3.2.2-5.el5_3.2installed
net-snmp-perl.i386  1:5.3.2.2-5.el5_3.2installed
net-snmp-utils.i386 1:5.3.2.2-5.el5_3.2installed

Btw I checked some other hosts that has pretty graphs, and there are no
these time-outs happening there. The configs for these two hosts are not
awfully different, in fact pretty similar.

I'd appreciate any help here, 'cuz I'm literally clueless as to how to get rid
of these timeouts.

-

help for newbie config: aliases and host-specific configs

2012-02-10 Thread Matthew Monaco
I basically need to do:

$ snmpwalk -v2c -mALL -c rescore-public 128.x.y.z

 From what I gather in the man pages I should be able to do

$ snmpwalk alias:myalias

and/or

$ snmpwalk myalias

I can specify those options as the default in ~/.snmp/snmp.conf. But when I try 
to make them host-specific, nothing works. I've tried two approaches:

First, adding "alias myalias 128.x.y.z" in snmp.conf and putting everything 
else 
in hosts/128.x.y.z.conf (and also hosts/myalias.conf and alias:myalias.conf). 
With -DALL I can see that hosts/128.x.y.z.conf is actually parsed, and the 
version, for example, is accepted, but then I see securityName not specified. 
Adding -v2c to the command line fixes this. So I'm not sure why the 
host-specific settings are not being honored.

The second approach I've tried is to have no global ~/.snmp/snmp.conf file at 
all, and a hosts/myalias.conf with "transport 128.x.y.z" This has similar 
results to the alias method.

I am not subscribed to the list, so please be sure to explicitly include me on 
any replies.

Thanks so much!

--
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users