A question about the ArgusClientTimeout() function
Carter Bullard
carter at qosient.com
Thu Jun 14 17:39:31 EDT 2001
Hey Chris,
No signals used to call ArgusClientTimeout. This is
just called from a select() loop in the routine
ArgusReadStream().
The ArgusClientTimeout is called based on the value of
RaClientTimeout. If you want to change the frequency
of the calls to RaClientTimeout, just declare this:
extern struct timeval RaClientTimeout;
in your ArgusClientTimeout() routine and set the values appropriately.
The minimum value that makes sense right now would be 200 mSec,
as that is the default select() timeout value. If you make it
large, and then change it back to a small timeout value, the
large interval will have to pass before the shorter one will
be used.
It doesn't matter if your connected or not. The man page
probably needs to be updated.
I'm trying to decide what to do with the next set of
clients with regard to how this behaves when your reading
from a file. Does the timeout refer to real-time, or should
it be relative to the timestamps in the records that are
in the file? Any opinions?
On your roll, the appOptstring doesn't work anymore, because
we made some basic changes to the getopt strategy. I never
really documented it, so I didn't worry about removing it.
Do you want it back?
Carter
Carter Bullard
QoSient, LLC
300 E. 56th Street, Suite 18K
New York, New York 10022
carter at qosient.com
Phone +1 212 588-9133
Fax +1 212 588-9134
http://qosient.com
-----Original Message-----
From: owner-argus-info at lists.andrew.cmu.edu
[mailto:owner-argus-info at lists.andrew.cmu.edu] On Behalf Of Chris Carton
Sent: Thursday, June 14, 2001 11:17 AM
To: argus-info at lists.andrew.cmu.edu
Subject: A question about the ArgusClientTimeout() function
I working on developing a custom argus client and I have a quick
question
(actually two) about this function, ArgusClientTimeout().
The quick blurb of a comment that is found with it in the ra_template
code,
indicates "that it gets called every second when the client is connected
to a
remote argus server with the -S flag".
My first question is, is this function called from a signal handler?
Specifically, I'd like to know if any of the other client functions
(such as
Ra_ProcessRecord) could be interrupted by a signal that results in this
ArgusClientTimeout function being called before the interruped function
is
resumed. And if so, which signals are used, because I like to be able to
block
them at certian points.
The second question is about the fact that I've noticed that this
function
seems to be called every second regardless of whether I run the client
with
the -S flag or not. I think that's a good thing, however I wanted to ask
if I
can rely on that functionality, or not. Though, if not, I think it's a
change
that we should consider making. It would allow for more versitle
clients.
While I'm on a roll, I've thought of another question. I'm having
trouble
figuring out how to use the appOptstring variable and in trying to get
some
client specifec options passed to the parse_arg() funcion. If someone
could
explain to me how that works I'd really appreciate it.
Chris Carton
www.q1labs.com
More information about the argus
mailing list