Table question

Frank Fock frank.fock____marconi.com
Fri Jun 9 11:41:35 CEST 2000


Arend Melissant wrote:
> I have a question about tables. My snmp agent has a table of running
> processes on the computer. The number of rows changes from time to time (as
> processes get started or killed). When and how do I change the table rows??
> 
> - Can the user (on the management side) ask for an update fo the table?

Sure, one can implement an update trigger object, but as I think getting
the running processes is not time consuming task, I would recommend the
following :

> - Should I poll the process list from time to time (problem: data can be too
> old)
> - Is there anoyher way??
>

Use a timer (you can use the Timer class from tools.h) to determine,
when the last update occured. Override the MyTable::is_empty() and the
MyTable::get_request methods and check the timer before you call the 
MibTable's variants of these methods. If the table date is, for example
2 seconds, old, then you can make an update of the table before going on.
 
Best regards,
Frank

-- 
Frank Fock                     Marconi Communications Software Systems
<frank.fock at marconicomms.com>  Blumenstrasse 22-24, 
Phone: +49 7191 13-4851        71522 Backnang,            
Fax:   +49 7191 13-2502        Germany



More information about the AGENTPP mailing list