1#ifndef __XRDXROOTDMONITOR__
2#define __XRDXROOTDMONITOR__
36#include <netinet/in.h>
48#define XROOTD_MON_ALL 0x00000001
49#define XROOTD_MON_FILE 0x00000002
50#define XROOTD_MON_IO 0x00000004
51#define XROOTD_MON_INFO 0x00000008
52#define XROOTD_MON_USER 0x00000010
53#define XROOTD_MON_AUTH 0x00000020
54#define XROOTD_MON_PATH (XROOTD_MON_IO | XROOTD_MON_FILE)
55#define XROOTD_MON_REDR 0x00000040
56#define XROOTD_MON_IOV 0x00000080
57#define XROOTD_MON_FSTA 0x00000100
58#define XROOTD_MON_CCM 0x00000200
59#define XROOTD_MON_PFC 0x00000400
60#define XROOTD_MON_TCPMO 0x00000800
61#define XROOTD_MON_TPC 0x00001000
62#define XROOTD_MON_THROT 0x00002000
63#define XROOTD_MON_GSTRM (XROOTD_MON_CCM | XROOTD_MON_PFC | XROOTD_MON_TCPMO | XROOTD_MON_THROT)
65#define XROOTD_MON_FSLFN 1
66#define XROOTD_MON_FSOPS 2
67#define XROOTD_MON_FSSSQ 4
68#define XROOTD_MON_FSXFR 8
90 {Add_io(dictid, rlen, offset);}
97 {
if (lastWindow != currWindow) Mark();
98 else if (nextEnt == lastEnt) Flush();
99 monBuff->
info[nextEnt].
arg0.id[0] = vtype;
100 monBuff->
info[nextEnt].
arg0.id[1] = vseq;
101 monBuff->
info[nextEnt].
arg0.sVal[1] = vcnt;
102 monBuff->
info[nextEnt].
arg0.rTot[1] = 0;
103 monBuff->
info[nextEnt].
arg1.buflen = rlen;
104 monBuff->
info[nextEnt++].
arg2.dictid = dictid;
110 {Add_io(dictid,(
kXR_int32)htonl(-wlen),offset);}
112 void appID(
char *
id);
118static void Defaults(
char *dest1,
int m1,
char *dest2,
int m2);
119static void Defaults(
int msz,
int rsz,
int wsz,
120 int flush,
int flash,
int iDent,
int rnm,
121 int fbsz,
int fsint=0,
int fsopt=0,
int fsion=0);
130 const char *iHost,
const char *iProg,
131 const char *iName,
int Port);
136 {
return ((monMode1|monMode2) & mode) != 0;}
143 const char opC,
const char *
Path);
145static int Send(
int mmode,
void *buff,
int size,
bool setseq=
true);
159 Hello(
const char *dest,
char mode);
161virtual ~Hello() {
if (theDest) free(theDest);}
183inline int Auths() {
return XrdXrootdMonitor::monAUTH;}
196inline int Fstat() {
return monFSTAT;}
198inline int Info() {
return (
Agent ? XrdXrootdMonitor::monINFO : 0);}
202inline int Logins() {
return (
Agent ? XrdXrootdMonitor::monUSER : 0);}
214 void Register(
const char *Uname,
const char *Hname,
215 const char *Pname,
unsigned int xSID=0);
220 void Report(
int eCode,
int aCode);
224inline int Ready() {
return XrdXrootdMonitor::monACTIVE;}
250static MonRdrBuff *rdrMP;
254 {
if (lastWindow != currWindow) Mark();
255 else if (nextEnt == lastEnt) Flush();
256 monBuff->
info[nextEnt].
arg0.val = offs;
257 monBuff->
info[nextEnt].
arg1.buflen = blen;
258 monBuff->
info[nextEnt++].
arg2.dictid = duid;
261 unsigned char do_Shift(
long long xTot,
unsigned int &xVal);
264 const char id,
int size);
265static MonRdrBuff *Fetch();
267static void Flush(MonRdrBuff *mP);
271static void startClock();
298static int numMonitor;
307static char monACTIVE;
union XrdXrootdMonTrace::@170 arg2
XrdXrootdMonTrace info[sizeof(XrdXrootdMonTrace)]
const kXR_char XROOTD_MON_MAPUSER
const kXR_char XROOTD_MON_MAPINFO
union XrdXrootdMonTrace::@169 arg1
const kXR_char XROOTD_MON_MAPPATH
union XrdXrootdMonTrace::@168 arg0
kXR_unt32 MapInfo(const char *Info)
kXR_unt32 MapPath(const char *Path)
void Register(const char *Uname, const char *Hname, const char *Pname, unsigned int xSID=0)
void Report(const char *Info)
static XrdXrootdMonitor * altMon
static void Defaults(char *dest1, int m1, char *dest2, int m2)
void Add_rv(kXR_unt32 dictid, kXR_int32 rlen, kXR_int16 vcnt, kXR_char vseq, kXR_char vtype)
void Disc(kXR_unt32 dictid, int csec, char Flags=0)
void Close(kXR_unt32 dictid, long long rTot, long long wTot)
static int Send(int mmode, void *buff, int size, bool setseq=true)
void Add_rd(kXR_unt32 dictid, kXR_int32 rlen, kXR_int64 offset)
static bool ModeEnabled(int mode)
void Add_wr(kXR_unt32 dictid, kXR_int32 wlen, kXR_int64 offset)
void Open(kXR_unt32 dictid, off_t fsize)
static kXR_unt32 GetDictID(bool hbo=false)