But what if the trap never times out?  It appears that the
value of _trap_timer just keeps getting decremented forever!
(There's a different conditional that keeps alerts from being
sent after it gets below zero.)  I can't find anything in the
code that could ever reset it.  Am I misunderstanding the
intended purpose of _trap_timer?


Tim,

Having just read this code, I'll agree that its a bit confusing. But I don't believe this is a bug.

Essentially _trap_timer is used entirely as a way to prevent trap timeout alarms from happening on every pass through the code after the timeout is reached. I.e. the actual check for the timeout is where it compares
($tm - $sref->{"_last_trap"}) to $sref->{"traptimeout"}. And then when a trap timeout actually occurs, _trap_timer is reset so that no more timeout
alerts will be sent until that much time has passed again.


Does that help?

-David Nolan
Network Software Designer
Computing Services
Carnegie Mellon University

Ah, I think I see. So _trap_timer is simply irrelevant when all is well, and it only becomes useful *after* a trap has timed out and mon is deciding whether it's now time to send another alert about it? So I guess, strictly speaking, it's really an alert timer rather than a trap timer? And if we're not in an alert state, there's no reason to decrement it, but there's no reason *not* to decrement it either. Did I get all that right?

Thanks, David!

Tim


_______________________________________________ mon mailing list [EMAIL PROTECTED] http://linux.kernel.org/mailman/listinfo/mon

Reply via email to