Hi -

I am trying to combine notes so you get all the info.  Here is a history of
the problem - in a nutshell, after I get called to free the cache, I never
get another load call.  Let me know if you need more info.  There are files
attached below.

I replaced the table init code with the call to
netsnmp_cache_check_and_reload( cache ) and that seems to be working ok.
(When I ran the mib2c with the cache option, it still generated the comment
to "initialize the table here", so I assumed I still had to initialize it
even with the cache.)

After 60 seconds, the cache free is called and then when I issue a command,
I don't see any load debug messages.

If I don't put the netsnmp_cache_check_and_reload( cache ) call in the
table init routine, the load is not called when I issue a command.

In either case, the status of the snmpd continues to show "running - I am
not seeing the agent crash.  So I am not seeing exactly what you are.



Kathy McLeod

----- Forwarded by Kathy McLeod/Rochester/IBM on 04/13/2010 04:16 PM -----
                                                                       
             Kathy                                                     
             McLeod/Rochester/                                         
             i...@ibmus                                                  To
                                       [email protected]
             04/06/2010 02:59          t                               
             PM                                                         cc
                                                                       
                                                                   Subject
                                       Re: cache load never gets called
                                                                       
                                                                       
                                                                       
                                                                       
                                                                       
                                                                       





Thanks.  That worked and it now does cache loads/frees.  But it is not
working as I expected.

1)  I thought it would always issue a free before a load.  However, the
first time I issue a command (this happens whether I issue it right away
after the table init routine or if I wait more than 60 seconds (my timeout
value), I see the load without a free first.  My table is now 8 rows long
instead of 4.  (The table init creates indexes 1 - 4, and the cache load
creates 5 - 8.  See screen1 file attached.)

2) After 60 seconds, I see the cache free.  This works ok, but when I issue
another command, I never see another load and I get an error message for
the command.

I have included my .c, a debug file, and the output of my snmptable
command.  I have net-snmp-5.3.2.2-7.el5_4.2 on RedHat 5.4. Let me know if
you need more info.  Thanks.

(See attached file: lldpPortConfigTable.c)(See attached file: debug.txt)
(See attached file: screen1.txt)

Kathy McLeod



             Dave Shield
             <d.t.shi...@liver
             pool.ac.uk>                                                To
             Sent by:                  Kathy McLeod/Rochester/i...@ibmus
             dave.shi...@googl                                          cc
             email.com                 [email protected]
                                       t
                                                                   Subject
             04/06/2010 04:51          Re: cache load never gets called
             AM









On 30 March 2010 21:12, Kathy McLeod <[email protected]> wrote:
> I ran the mib2c to generate a cache handler for a file created using
> mib2c.table_data.conf.  The main function still works ok, but even tho I
> set the cache timeout value to -1, it never seems to expire.  I also
tested
> with a timeout value of 60 and it didn't expire.  The only debug
statements
> I get are the ones in the init and deinit routines.  I am not able to
> figure out what is wrong.

The cache helper is not getting injected into the helper chain correctly.
It needs to be inserted before the handler "TABLE_TDATA_NAME"
rather than "TABLE_DATA_NAME".

I'll tweak the mib2c config file accordingly.

Dave
(See attached file: lldpPortConfigTable.c)(See attached file: debug.txt)
(See attached file: screen1.txt)
------------------------------------------------------------------------------

Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
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

Attachment: lldpPortConfigTable.c
Description: Binary data

Attachment: debug.txt
Description: Binary data

Attachment: screen1.txt
Description: Binary data

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
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

Reply via email to