[Date Prev]   [Date Next] [Thread Prev]   [Thread Next] [Date Index]   [Thread Index]


     Re: [snips-users] monitor access to cisco router using telnet

On Thu, Jun 16, 2005 at 11:41:00AM -0400, Allan P. Magmanlac wrote:
> Guys,
>   It seems the problem all along is that I specified two different 
> intervals.
>   [...]
> Can someone please confirm that I cannot use more that one POLLINTERVAL  
> declarations.

You can only specify one pollinterval... looking at the code, directly,
it reads and parses the file, then iterates over the hosts it found and
sets all the proper values from how it was parsed.  So, "last one in
wins," basically.

In readconfig() from ~/cvs/snips/portmon/main.c line 106:

-- begin
   * Now parse the config file

  h = hostlist;
  while(fgets(record, BUFSIZ - 3, pconfig) != NULL )    /* keeps the \n */
  }     /* end: while */

  fclose (pconfig);                     /* Not needed any more */

  if (!pollinterval)
    pollinterval = POLLINTERVAL ;               /* default value */
-- end

Russell M. Van Tassell
russell at loosenut com

"As the valley gives height to the mountain, so can sorrow give meaning
 to pleasure; as the well is the source of the fountain, deep adversity
 can be a treasure."                                     -- William Ward

Zyrion Traverse Network Monitoring & Network Management Software