XRootD
Loading...
Searching...
No Matches
XrdXrootdConfigMon.cc
Go to the documentation of this file.
1/******************************************************************************/
2/* */
3/* X r d X r o o t d M o n C o n f . h h */
4/* */
5/* (c) 2020 by the Board of Trustees of the Leland Stanford, Jr., University */
6/* All Rights Reserved */
7/* Produced by Andrew Hanushevsky for Stanford University under contract */
8/* DE-AC02-76-SFO0515 with the Department of Energy */
9/* */
10/* This file is part of the XRootD software suite. */
11/* */
12/* XRootD is free software: you can redistribute it and/or modify it under */
13/* the terms of the GNU Lesser General Public License as published by the */
14/* Free Software Foundation, either version 3 of the License, or (at your */
15/* option) any later version. */
16/* */
17/* XRootD is distributed in the hope that it will be useful, but WITHOUT */
18/* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or */
19/* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public */
20/* License for more details. */
21/* */
22/* You should have received a copy of the GNU Lesser General Public License */
23/* along with XRootD in a file called COPYING.LESSER (LGPL license) and file */
24/* COPYING (GPL license). If not, see <http://www.gnu.org/licenses/>. */
25/* */
26/* The copyright holder's institutional names and contributor's names may not */
27/* be used to endorse or promote products derived from this software without */
28/* specific prior written permission of the institution or contributor. */
29/******************************************************************************/
30
31#include <limits>
32#include <cstdio>
33#include <cstring>
34#include <strings.h>
35
36#include "XrdNet/XrdNetAddr.hh"
37
38#include "XrdOuc/XrdOuca2x.hh"
39#include "XrdOuc/XrdOucEnv.hh"
41
46
47/******************************************************************************/
48/* L o c a l S t a t i c s */
49/******************************************************************************/
50
51namespace
52{
53struct MonParms
54 {char *monDest[2];
55 int monMode[2];
56 int monFlash;
57 int monFlush;
58 int monGBval;
59 int monMBval;
60 int monRBval;
61 int monWWval;
62 int monFbsz;
63 int monIdent;
64 int monRnums;
65 int monFSint;
66 int monFSopt;
67 int monFSion;
68
69 void Exported() {monDest[0] = monDest[1] = 0;}
70
71 MonParms() : monDest{0,0}, monMode{0,0}, monFlash(0), monFlush(0),
72 monGBval(0), monMBval(0), monRBval(0), monWWval(0),
73 monFbsz(0), monIdent(3600),monRnums(0),
74 monFSint(0), monFSopt(0), monFSion(0) {}
75 ~MonParms() {if (monDest[0]) free(monDest[0]);
76 if (monDest[1]) free(monDest[1]);
77 }
78};
79
80MonParms *MP = 0;
81
82struct XrdXrootdGSReal::GSParms gsObj[] =
83 {{"ccm", 0, XROOTD_MON_CCM, 0, -1, XROOTD_MON_GSCCM, 0,
85 {"oss", 0, XROOTD_MON_OSS, 0, -1, XROOTD_MON_GSOSS, 0,
87 {"pfc", 0, XROOTD_MON_PFC, 0, -1, XROOTD_MON_GSPFC, 0,
89 {"TcpMon", 0, XROOTD_MON_TCPMO, 0, -1, XROOTD_MON_GSTCP, 0,
91 {"Throttle", 0, XROOTD_MON_THROT, 0, -1, XROOTD_MON_GSTHR, 0,
93 {"Tpc", 0, XROOTD_MON_TPC, 0, -1, XROOTD_MON_GSTPC, 0,
95 };
96}
97
98/******************************************************************************/
99/* C o n f i g G S t r e a m */
100/******************************************************************************/
101
102bool XrdXrootdProtocol::ConfigGStream(XrdOucEnv &myEnv, XrdOucEnv *urEnv)
103{
105 static const int numgs=sizeof(gsObj)/sizeof(struct XrdXrootdGSReal::GSParms);
106 char vbuff[64];
107 bool aOK, gXrd[numgs] = {false, false, false, true, false, true};
108
109// For each enabled monitoring provider, allocate a g-stream and put
110// its address in our environment.
111//
112 for (int i = 0; i < numgs; i++)
113 {if (gsObj[i].dest || XrdXrootdMonitor::ModeEnabled(gsObj[i].Mode))
114 {if (MP && gsObj[i].maxL <= 0) gsObj[i].maxL = MP->monGBval;
115 gs = new XrdXrootdGSReal(gsObj[i], aOK);
116 if (!aOK) return false;
117 snprintf(vbuff, sizeof(vbuff), "%s.gStream*", gsObj[i].pin);
118 if (!gXrd[i]) myEnv.PutPtr(vbuff, (void *)gs);
119 else if (urEnv) urEnv->PutPtr(vbuff, (void *)gs);
120 }
121 }
122
123// Configure the TPC monitor if we have a gStream for it
124//
125 if (urEnv && (gs = (XrdXrootdGStream*)urEnv->GetPtr("Tpc.gStream*")))
126 {XrdXrootdTpcMon* tpcMon = new XrdXrootdTpcMon("xroot",eDest.logger(),*gs);
127 myEnv.PutPtr("TpcMonitor*", (void*)tpcMon);
128 }
129
130// All done
131//
132 return true;
133}
134
135/******************************************************************************/
136/* C o n f i g M o n */
137/******************************************************************************/
138
139bool XrdXrootdProtocol::ConfigMon(XrdProtocol_Config *pi, XrdOucEnv &xrootdEnv)
140{
141 int i, numgs = sizeof(gsObj)/sizeof(struct XrdXrootdGSReal::GSParms);
142
143// Check if anything was configured.
144//
145 for (i = 0; i < numgs && !gsObj[i].dest; i++);
146 if (i < numgs && !MP) MP = new MonParms;
147 else if (!MP) return true;
148
149// Set monitor defaults, this has to be done first
150//
151 XrdXrootdMonitor::Defaults(MP->monMBval, MP->monRBval, MP->monWWval,
152 MP->monFlush, MP->monFlash, MP->monIdent,
153 MP->monRnums, MP->monFbsz,
154 MP->monFSint, MP->monFSopt, MP->monFSion);
155
156// Complete destination dependent setup
157//
158 XrdXrootdMonitor::Defaults(MP->monDest[0], MP->monMode[0],
159 MP->monDest[1], MP->monMode[1]);
160
161// Initialize monitoring enough to construct gStream objects.
162//
164
165// Config g-stream objects, as needed. This needs to be done before we
166// load any plugins but after we initialize phase 1 monitoring.
167//
168 ConfigGStream(xrootdEnv, pi->theEnv);
169
170// Enable monitoring (it won't do anything if it wasn't enabled)
171//
172 if (!XrdXrootdMonitor::Init()) return false;
173
174// Cleanup
175//
176 if (MP->monDest[0]) MP->Exported();
177 delete MP;
178
179// All done
180//
181 return true;
182}
183
184/******************************************************************************/
185/* x m o n */
186/******************************************************************************/
187
188/* Function: xmon
189
190 Purpose: Parse directive: monitor [...] [all] [auth] [flush [io] <sec>]
191 [fstat <sec> [lfn] [ops] [ssq] [xfr <n>]
192 [{fbuff | fbsz} <sz>] [gbuff <sz>]
193 [ident {<sec>|off}] [mbuff <sz>]
194 [rbuff <sz>] [rnums <cnt>] [window <sec>]
195 [dest [Events] <host:port>]
196
197 Events: [ccm] [files] [fstat] [info] [io] [iov] [pfc] [redir] [tcpmon] [throttle] [user]
198
199 all enables monitoring for all connections.
200 auth add authentication information to "user".
201 flush [io] <sec> time (seconds, M, H) between auto flushes. When
202 io is given applies only to i/o events.
203 fstat <sec> produces an "f" stream for open & close events
204 <sec> specifies the flush interval (also see xfr)
205 lfn - adds lfn to the open event
206 ops - adds the ops record when the file is closed
207 ssq - computes the sum of squares for the ops rec
208 xfr <n>- inserts i/o stats for open files every
209 <sec>*<n>. Minimum is 1.
210 fbsz <sz> size of message buffer for file stream monitoring.
211 gbuff <sz> size of message buffer for g-stream monitoring.
212 ident {<sec>|off} time (seconds, M, H) between identification records.
213 The keyword "off" turns them off.
214 mbuff <sz> size of message buffer for event trace monitoring.
215 rbuff <sz> size of message buffer for redirection monitoring.
216 rnums <cnt> bumber of redirections monitoring streams.
217 window <sec> time (seconds, M, H) between timing marks.
218 dest specified routing information. Up to two dests
219 may be specified.
220 ccm monitor cache context management
221 files only monitors file open/close events.
222 fstats vectors the "f" stream to the destination
223 info monitors client appid and info requests.
224 io monitors I/O requests, and files open/close events.
225 iov like I/O but also unwinds vector reads.
226 pfc monitor proxy file cache
227 redir monitors request redirections
228 tcpmon monitors tcp connection closes.
229 throttle monitors I/O activity via the throttle plugin
230 tpc Third Party Copy
231 user monitors user login and disconnect events.
232 <host:port> where monitor records are to be sentvia UDP.
233
234 Output: 0 upon success or !0 upon failure. Ignored by master.
235*/
236
237int XrdXrootdProtocol::xmon(XrdOucStream &Config)
238{
239 char *val = 0;
240 long long tempval;
241 int i, xmode=0, *flushDest;
242 bool haveWord = true;
243
244// Check if this is a continuation
245//
246 if ((val = Config.GetWord()) && !strcmp("...", val)) val = Config.GetWord();
247 else if (MP) {delete MP; MP = 0;}
248
249// Allocate a new parameter block if we don't have one
250//
251 if (!MP) MP = new MonParms;
252
253// Make sure we have at least one option here
254//
255 if (!val)
256 {eDest.Emsg("Config", "no monitor parameters specified");
257 return 1;
258 }
259
260// Process all the options
261//
262 while(haveWord || (val = Config.GetWord()))
263 {haveWord = false;
264 if (!strcmp("all", val)) xmode = XROOTD_MON_ALL;
265 else if (!strcmp("auth", val))
266 MP->monMode[0] = MP->monMode[1] = XROOTD_MON_AUTH;
267 else if (!strcmp("flush", val))
268 {if ((val = Config.GetWord()) && !strcmp("io", val))
269 { flushDest = &MP->monFlash; val = Config.GetWord();}
270 else flushDest = &MP->monFlush;
271 if (!val)
272 {eDest.Emsg("Config", "monitor flush value not specified");
273 return 1;
274 }
275 if (XrdOuca2x::a2tm(eDest,"monitor flush",val,
276 flushDest,1)) return 1;
277 }
278 else if (!strcmp("fstat",val))
279 {if (!(val = Config.GetWord()))
280 {eDest.Emsg("Config", "monitor fstat value not specified");
281 return 1;
282 }
283 if (XrdOuca2x::a2tm(eDest,"monitor fstat",val,
284 &MP->monFSint,0)) return 1;
285 while((val = Config.GetWord()))
286 if (!strcmp("lfn", val)) MP->monFSopt |= XROOTD_MON_FSLFN;
287 else if (!strcmp("ops", val)) MP->monFSopt |= XROOTD_MON_FSOPS;
288 else if (!strcmp("ssq", val)) MP->monFSopt |= XROOTD_MON_FSSSQ;
289 else if (!strcmp("xfr", val))
290 {if (!(val = Config.GetWord()))
291 {eDest.Emsg("Config", "monitor fstat xfr count not specified");
292 return 1;
293 }
294 if (XrdOuca2x::a2i(eDest,"monitor fstat io count",
295 val, &MP->monFSion,1)) return 1;
296 MP->monFSopt |= XROOTD_MON_FSXFR;
297 }
298 else {haveWord = true; break;}
299 }
300 else if (!strcmp("mbuff", val) || !strcmp("rbuff", val) ||
301 !strcmp("gbuff", val) || !strcmp("fbuff", val) ||
302 !strcmp("fbsz", val))
303 {char bName[16], bType = *val;
304 snprintf(bName,sizeof(bName),"monitor %s",val);
305 if (!(val = Config.GetWord()))
306 {eDest.Emsg("Config", "value not specified"); return 1;}
307 if (XrdOuca2x::a2sz(eDest,bName,val,&tempval,1024,65535))
308 return 1;
309 int bVal = static_cast<int>(tempval);
310 switch(bType)
311 {case 'f': MP->monFbsz = bVal; break;
312 case 'g': MP->monGBval = bVal; break;
313 case 'm': MP->monMBval = bVal; break;
314 case 'r': MP->monRBval = bVal; break;
315 default: break;
316 }
317 }
318 else if (!strcmp("ident", val))
319 {if (!(val = Config.GetWord()))
320 {eDest.Emsg("Config", "monitor ident value not specified");
321 return 1;
322 }
323 if (!strcmp("off", val)) MP->monIdent = -1;
324 else if (XrdOuca2x::a2tm(eDest,"monitor ident",val,
325 &MP->monIdent,0)) return 1;
326 }
327 else if (!strcmp("rnums", val))
328 {if (!(val = Config.GetWord()))
329 {eDest.Emsg("Config", "monitor rnums value not specified");
330 return 1;
331 }
332 if (XrdOuca2x::a2i(eDest,"monitor rnums",val, &MP->monRnums,1,
333 XrdXrootdMonitor::rdrMax)) return 1;
334 }
335 else if (!strcmp("window", val))
336 {if (!(val = Config.GetWord()))
337 {eDest.Emsg("Config", "monitor window value not specified");
338 return 1;
339 }
340 if (XrdOuca2x::a2tm(eDest,"monitor window",val,
341 &MP->monWWval,1)) return 1;
342 }
343 else break;
344 }
345
346 if (!val) return 0;
347
348 for (i = 0; i < 2; i++)
349 {if (strcmp("dest", val)) break;
350 while((val = Config.GetWord()))
351 if (!strcmp("ccm", val)) MP->monMode[i] |= XROOTD_MON_CCM;
352 else if (!strcmp("files",val)) MP->monMode[i] |= XROOTD_MON_FILE;
353 else if (!strcmp("fstat",val)) MP->monMode[i] |= XROOTD_MON_FSTA;
354 else if (!strcmp("info", val)) MP->monMode[i] |= XROOTD_MON_INFO;
355 else if (!strcmp("io", val)) MP->monMode[i] |= XROOTD_MON_IO;
356 else if (!strcmp("iov", val)) MP->monMode[i] |= (XROOTD_MON_IO
358 else if (!strcmp("pfc", val)) MP->monMode[i] |= XROOTD_MON_PFC;
359 else if (!strcmp("redir", val)) MP->monMode[i] |= XROOTD_MON_REDR;
360 else if (!strcmp("tcpmon", val)) MP->monMode[i] |= XROOTD_MON_TCPMO;
361 else if (!strcmp("throttle", val)) MP->monMode[i] |= XROOTD_MON_THROT;
362 else if (!strcmp("tpc", val)) MP->monMode[i] |= XROOTD_MON_TPC;
363 else if (!strcmp("user", val)) MP->monMode[i] |= XROOTD_MON_USER;
364 else break;
365
366 if (!val) {eDest.Emsg("Config","monitor dest value not specified");
367 return 1;
368 }
369 if (MP->monDest[i]) free(MP->monDest[i]);
370 if (!(MP->monDest[i] = xmondest("monitor dest", val))) return 1;
371 if (!(val = Config.GetWord())) break;
372 }
373
374 if (val)
375 {if (!strcmp("dest", val))
376 eDest.Emsg("Config", "Warning, a maximum of two dest values allowed.");
377 else eDest.Emsg("Config", "Warning, invalid monitor option", val);
378 }
379
380// Make sure dests differ
381//
382 if (MP->monDest[0] && MP->monDest[1]
383 && !strcmp(MP->monDest[0], MP->monDest[1]))
384 {eDest.Emsg("Config", "Warning, monitor dests are identical.");
385 MP->monMode[0] |= MP->monMode[1]; MP->monMode[1] = 0;
386 free(MP->monDest[1]); MP->monDest[1] = 0;
387 }
388
389// Add files option if I/O is enabled
390//
391 if (MP->monMode[0] & XROOTD_MON_IO) MP->monMode[0] |= XROOTD_MON_FILE;
392 if (MP->monMode[1] & XROOTD_MON_IO) MP->monMode[1] |= XROOTD_MON_FILE;
393
394// If ssq was specified, make sure we support IEEE754 floating point
395//
396#if !defined(__solaris__) || !defined(_IEEE_754)
397 if (MP->monFSopt & XROOTD_MON_FSSSQ && !(std::numeric_limits<double>::is_iec559))
398 {MP->monFSopt &= ~XROOTD_MON_FSSSQ;
399 eDest.Emsg("Config","Warning, 'fstat ssq' ignored; platform does not "
400 "use IEEE754 floating point.");
401 }
402#endif
403
404// The caller may have deferred setting destinations. If so, don't upset what
405// if currently set.
406//
407 if (MP->monDest[0])
408 MP->monMode[0] |= (MP->monMode[0] ? xmode : XROOTD_MON_FILE|xmode);
409 if (MP->monDest[1])
410 MP->monMode[1] |= (MP->monMode[1] ? xmode : XROOTD_MON_FILE|xmode);
411// All done
412//
413 return 0;
414}
415
416/******************************************************************************/
417/* x m o n d e s t */
418/******************************************************************************/
419
420char *XrdXrootdProtocol::xmondest(const char *what, char *val)
421{
422 XrdNetAddr netdest;
423 const char *eText;
424 char netBuff[288];
425
426// Parse the host:port spec
427//
428 if ((eText = netdest.Set(val)))
429 {eDest.Emsg("Config", what, "endpoint is invalid;", eText);
430 return 0;
431 }
432
433// Reformat it to get full host name
434//
435 if (!netdest.Format(netBuff, sizeof(netBuff), XrdNetAddrInfo::fmtName))
436 {eDest.Emsg("Config", what, "endpoint is unreachable");
437 return 0;
438 }
439
440// Return a copy
441//
442 return strdup(netBuff);
443}
444
445/******************************************************************************/
446/* x m o n g s */
447/******************************************************************************/
448
449/* Function: xmongs
450
451 Purpose: Parse directive: mongstream <strm> use <opts>
452
453 <strm>: {all | ccm | oss | pfc | tcpmon | tpc} [<strm>]
454
455 <opts>: [flust <t>] [maxlen <l>] [send <fmt> [noident] <host:port>]
456
457 <fmt> {cgi | json} <hdr> | nohdr
458
459 <hdr> dflthdr | sitehdr | hosthdr | insthdr | fullhdr
460
461 all applies options to all gstreams.
462 ccm gstream: cache context management
463 pfc gstream: proxy file cache
464 tcpmon gstream: tcp connection monitoring
465 throttle gstream: monitors I/O activity via the throttle plugin
466 tpc gstream: Third Party Copy
467
468 noXXX do not include information.
469
470 Output: 0 upon success or !0 upon failure. Ignored by master.
471*/
472
473int XrdXrootdProtocol::xmongs(XrdOucStream &Config)
474{
475 static const int isFlush = 0;
476 static const int isMaxL = 1;
477 static const int isSend = 2;
478
479 struct gsOpts {const char *opname; int opwhat;} gsopts[] =
480 {{"flush", isFlush},
481 {"maxlen", isMaxL},
482 {"send", isSend}
483 };
484 int numopts = sizeof(gsopts)/sizeof(struct gsOpts);
485
486 int numgs = sizeof(gsObj)/sizeof(struct XrdXrootdGSReal::GSParms);
489 int i, selMon = 0, opt = -1, hdr = -1, fmt = -1, flushVal = -1;
490 long long maxlVal = -1;
491 char *val, *dest = 0;
492
493// Make sure we have something here
494//
495 if (!(val = Config.GetWord()))
496 {eDest.Emsg("config", "gstream parameters not specified"); return 1;}
497
498// First tokens are the list of streams, at least one must be specified
499//
500do {if (!strcmp("all", val)) selMon = selAll;
501 else {for (i = 0; i < numgs; i++)
502 {if (!strcasecmp(val, gsObj[i].pin))
503 {selMon |= gsObj[i].Mode; break;}
504 }
505 if (i >= numgs) break;
506 }
507 } while((val = Config.GetWord()));
508
509 if (!selMon)
510 {eDest.Emsg("config", "gstream name not specified"); return 1;}
511
512// The next token needs to be 'using' if there is is one.
513//
514 if (val)
515 {if (strcmp(val, "use"))
516 {eDest.Emsg("config","mongstream expected 'use' not",val); return 1;}
517 if (!(val = Config.GetWord()))
518 {eDest.Emsg("config","gstream parameters not specified after 'use'");
519 return 1;
520 }
521 } else {
522 eDest.Emsg("config","mongstream expected 'use' verb not found");
523 return 1;
524 }
525
526// Process all the parameters now
527//
528do{for (i = 0; i < numopts; i++)
529 {if (!strcmp(val, gsopts[i].opname))
530 {if (!(val = Config.GetWord()))
531 {eDest.Emsg("Config", "gstream", gsopts[i].opname,
532 "value not specified");
533 return 1;
534 }
535 break;
536 }
537 }
538
539// Check if we actually found a keyword
540//
541 if (i >= numopts)
542 {eDest.Emsg("config", "invalid gstream parameter", val);
543 return 1;
544 }
545
546// Handle each specific one
547//
548 switch(gsopts[i].opwhat)
549 {case isFlush:
550 if (XrdOuca2x::a2tm(eDest, "gstream flush", val, &flushVal, 0))
551 return 1;
552 break;
553 case isMaxL:
554 if (XrdOuca2x::a2sz(eDest, "gstream maxlen",
555 val, &maxlVal, 1024, 65535)) return 1;
556 break;
557 case isSend:
558 if (dest) free(dest);
559 if (!xmongsend(Config, val, dest, opt, fmt, hdr)) return 1;
560 break;
561 default: break;
562 }
563
564 } while((val = Config.GetWord()));
565
566// Set the values
567//
568 for (i = 0; i < numgs; i++)
569 {if (gsObj[i].Mode & selMon)
570 {if (dest)
571 {if (gsObj[i].dest) free((void *)gsObj[i].dest);
572 gsObj[i].dest = dest;
573 }
574 if (flushVal >= 0) gsObj[i].flsT = flushVal;
575 if (maxlVal >= 0) gsObj[i].maxL = maxlVal;
576 if (opt >= 0) gsObj[i].Opt = opt;
577 if (fmt >= 0) gsObj[i].Fmt = fmt;
578 if (hdr >= 0) gsObj[i].Hdr = hdr;
579 }
580 }
581
582 return 0;
583}
584
585/******************************************************************************/
586/* m o n g s e n d */
587/******************************************************************************/
588
589bool XrdXrootdProtocol::xmongsend(XrdOucStream &Config, char *val, char *&dest,
590 int &opt, int &fmt, int &hdr)
591{
592 struct gsFmts {const char *opname; int opval;} gsfmt[] =
593 {
595 {"json", XrdXrootdGSReal::fmtJson},
596 {"nohdr", XrdXrootdGSReal::fmtNone}
597 };
598 int numfmts = sizeof(gsfmt)/sizeof(struct gsFmts);
599
600 struct gsHdrs {const char *opname; int opval;} gshdr[] =
601 {
602 {"dflthdr", XrdXrootdGSReal::hdrNorm},
603 {"sitehdr", XrdXrootdGSReal::hdrSite},
604 {"hosthdr", XrdXrootdGSReal::hdrHost},
605 {"insthdr", XrdXrootdGSReal::hdrInst},
606 {"fullhdr", XrdXrootdGSReal::hdrFull}
607 };
608 int numhdrs = sizeof(gshdr)/sizeof(struct gsHdrs);
609
610 int i;
611
612// First token muxt be the format
613//
614 for (i = 0; i < numfmts; i++)
615 if (!strcmp(val, gsfmt[i].opname))
616 {fmt = gsfmt[i].opval; break;}
617 if (i >= numfmts)
618 {eDest.Emsg("Config","gstream send format is invalid -", val);
619 return false;
620 }
621
622// The next one is the the optional hdr spec
623//
624 val = Config.GetWord();
626 else if (val)
627 {for (i = 0; i < numhdrs; i++)
628 if (!strcmp(val, gshdr[i].opname))
629 {hdr = gshdr[i].opval;
630 val = Config.GetWord();
631 break;
632 }
633 }
634
635// The final token can be "noident"
636//
637 if (val && !strcmp(val, "noident"))
639 val = Config.GetWord();
640 }
641
642// Finally, we must have the host and port
643//
644 if (!val)
645 {eDest.Emsg("Config", "gstream send endpoint not specified");
646 return false;
647 }
648
649// Get the endpoint
650//
651 dest = xmondest("gstream send", val);
652 return dest != 0;
653}
#define XROOTD_MON_INFO
int Mode
const kXR_char XROOTD_MON_GSTPC
const kXR_char XROOTD_MON_GSTCP
const kXR_char XROOTD_MON_GSOSS
const kXR_char XROOTD_MON_GSCCM
const kXR_char XROOTD_MON_GSTHR
const kXR_char XROOTD_MON_GSPFC
#define XROOTD_MON_IOV
#define XROOTD_MON_FSSSQ
#define XROOTD_MON_TPC
#define XROOTD_MON_ALL
#define XROOTD_MON_AUTH
#define XROOTD_MON_IO
#define XROOTD_MON_TCPMO
#define XROOTD_MON_PFC
#define XROOTD_MON_USER
#define XROOTD_MON_FSLFN
#define XROOTD_MON_OSS
#define XROOTD_MON_CCM
#define XROOTD_MON_FSTA
#define XROOTD_MON_FSOPS
#define XROOTD_MON_FSXFR
#define XROOTD_MON_THROT
#define XROOTD_MON_FILE
#define XROOTD_MON_REDR
int Format(char *bAddr, int bLen, fmtUse fmtType=fmtAuto, int fmtOpts=0)
@ fmtName
Hostname if it is resolvable o/w use fmtAddr.
const char * Set(const char *hSpec, int pNum=PortInSpec)
void * GetPtr(const char *varname)
Definition XrdOucEnv.cc:263
void PutPtr(const char *varname, void *value)
Definition XrdOucEnv.cc:298
static int a2i(XrdSysError &, const char *emsg, const char *item, int *val, int minv=-1, int maxv=-1)
Definition XrdOuca2x.cc:45
static int a2sz(XrdSysError &, const char *emsg, const char *item, long long *val, long long minv=-1, long long maxv=-1)
Definition XrdOuca2x.cc:257
static int a2tm(XrdSysError &, const char *emsg, const char *item, int *val, int minv=-1, int maxv=-1)
Definition XrdOuca2x.cc:288
const char * myName
XrdOucEnv * theEnv
const char * myProg
int Emsg(const char *esfx, int ecode, const char *text1, const char *text2=0)
XrdSysLogger * logger(XrdSysLogger *lp=0)
static const int hdrNone
Format as JSON info.
static const int hdrInst
Include site, host, port, inst.
static const int fmtBin
Do not include info.
static const int fmtJson
Format as CGI info.
static const int hdrSite
Include site.
static const int hdrHost
Include site, host.
static const int optNoID
Don't send ident records.
static const int hdrNorm
Include standard header.
static const int fmtNone
static const int fmtCgi
Format as binary info.
static const int hdrFull
Include site, host, port, inst, pgm.
static const int rdrMax
static void Defaults(char *dest1, int m1, char *dest2, int m2)
static bool ModeEnabled(int mode)
static const char * myInst
static XrdSysError & eDest
static XrdScheduler * Sched
XrdCmsConfig Config
XrdXrootdTpcMon * tpcMon
Definition XrdOfsTPC.cc:84