Bluehost.com Web Hosting $6.95

RE: add a forever process in agent

This is a discussion on RE: add a forever process in agent within the SNMP Users forums, part of the Networking and Network Related category; On Thu, 2005-09-22 at 17:53 +0800, Jim Su wrote: > Yes, this list is constantly generated/updated ...


Go Back   Usenet Forums > Networking and Network Related > SNMP Users

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 09-22-2005
Dave Shield
 
Posts: n/a
Default RE: add a forever process in agent

On Thu, 2005-09-22 at 17:53 +0800, Jim Su wrote:

> Yes, this list is constantly generated/updated said every 5 minutes
> regardless agent receives the request or not.


OK - then use 'snmp_alarm_register'


> I have the feeling that this routine may be able to run the
> forever process I want.


Yes, it will.

> I have to take out the while(1) in my process. I have a sleep
> routine in the forever process so the process sleeps if system
> time is not on the 5, 10, 15, ... minutes on the hour.


No - don't do that.
You'll be conflicting with the on-going operation of the agent.

What you need is a single "alarm callback" routine, which
will be triggered (by the agent) every 600s. This routine
should generate/update the data list, then return.

The rest of the time, control should lie with the main agent
driving code (so that it can accept and process requests,
perform any other regular maintenance, etc).
Your code shouldn't worry about *when* to reload the
list - the agent takes care of that. Your code is purely
concerned with *how* to reload the list.


Dave


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server.
Download it for free - -and be entered to win a 42" plasma tv or your very
own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
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/...net-snmp-users
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 10:12 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0