I gave a look at the code, and by itself it seems reasonable, since it
seems that apMon should not be so heavy to execute, and also it's quite
Anyway I don't feel so comfortable in hardcoding into the app code
which is related to one particular external system. My proposal is to
define a simple interface able to init, submit info and terminate a
monitoring session through an external dynamic library. A plugin.
Doing so, the app is not tied to a particular system, and we could
write the plugin e.g. for XrdMon too. From my side this iwll require to
define the interface and implement the info collection, and from your
side this would require to put your apMon-related code into a dynlibrary
with 3-4 functions (I hope!).
I'd like to know an opinion from you and from other people which may
have some interest on this. Maybe this evening at the meeting.
Catalin Cirstoiu wrote:
> Hi Fabrizio,
> I've attached a Xrd copy client instrumented with ApMon... and from a
> diff with what is on the site at the development version source, I don't
> see many differences (except for the ApMon part, of course).
> In terms of a plugin needs, the minimum I think it would be:
> - a place where the monitoring plugin could initialize and accept some
> parameters. In this case, ApMon takes the parameters from environment
> variables and it can be disabled with a command line switch;
> - a way to determine source and destination IP's, file size, current
> transfer speed, currently transferred bytes;
> - a point to send a status message, for example when the progress bar is
> updated; this should be also called at the very end of the transfer.
> If you want to take a look at the ApMon-cpp library, you can get it from
> Please tell me if there is something unclear or if I can help somehow.