1 #ifndef __XRDXROOTDMONITOR__
2 #define __XRDXROOTDMONITOR__
36 #include <netinet/in.h>
37 #include <sys/types.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_OSS 0x00004000
64 #define XROOTD_MON_GSTRM (XROOTD_MON_CCM | XROOTD_MON_PFC | XROOTD_MON_TCPMO | XROOTD_MON_THROT | XROOTD_MON_OSS)
66 #define XROOTD_MON_FSLFN 1
67 #define XROOTD_MON_FSOPS 2
68 #define XROOTD_MON_FSSSQ 4
69 #define XROOTD_MON_FSXFR 8
91 {Add_io(dictid, rlen, offset);}
98 {
if (lastWindow != currWindow) Mark();
99 else if (nextEnt == lastEnt) Flush();
100 monBuff->
info[nextEnt].
arg0.id[0] = vtype;
101 monBuff->
info[nextEnt].
arg0.id[1] = vseq;
102 monBuff->
info[nextEnt].
arg0.sVal[1] = vcnt;
103 monBuff->
info[nextEnt].
arg0.rTot[1] = 0;
104 monBuff->
info[nextEnt].
arg1.buflen = rlen;
105 monBuff->
info[nextEnt++].
arg2.dictid = dictid;
111 {Add_io(dictid,(
kXR_int32)htonl(-wlen),offset);}
113 void appID(
char *
id);
119 static void Defaults(
char *dest1,
int m1,
char *dest2,
int m2);
120 static void Defaults(
int msz,
int rsz,
int wsz,
121 int flush,
int flash,
int iDent,
int rnm,
122 int fbsz,
int fsint=0,
int fsopt=0,
int fsion=0);
131 const char *iHost,
const char *iProg,
132 const char *iName,
int Port);
137 {
return ((monMode1|monMode2) & mode) != 0;}
144 const char opC,
const char *
Path);
146 static int Send(
int mmode,
void *buff,
int size,
bool setseq=
true);
148 static time_t
Tick();
160 Hello(
const char *dest,
char mode);
162 virtual ~Hello() {
if (theDest) free(theDest);}
184 inline int Auths() {
return XrdXrootdMonitor::monAUTH;}
197 inline int Fstat() {
return monFSTAT;}
199 inline int Info() {
return (
Agent ? XrdXrootdMonitor::monINFO : 0);}
203 inline int Logins() {
return (
Agent ? XrdXrootdMonitor::monUSER : 0);}
215 void Register(
const char *Uname,
const char *Hname,
216 const char *Pname,
unsigned int xSID=0);
221 void Report(
int eCode,
int aCode);
225 inline int Ready() {
return XrdXrootdMonitor::monACTIVE;}
251 static MonRdrBuff *rdrMP;
255 {
if (lastWindow != currWindow) Mark();
256 else if (nextEnt == lastEnt) Flush();
257 monBuff->
info[nextEnt].
arg0.val = offs;
258 monBuff->
info[nextEnt].
arg1.buflen = blen;
259 monBuff->
info[nextEnt++].
arg2.dictid = duid;
262 unsigned char do_Shift(
long long xTot,
unsigned int &xVal);
265 const char id,
int size);
266 static MonRdrBuff *Fetch();
268 static void Flush(MonRdrBuff *mP);
272 static void startClock();
289 static int autoFlash;
290 static int autoFlush;
291 static int FlushTime;
298 static int isEnabled;
299 static int numMonitor;
308 static char monACTIVE;
309 static char monFSTAT;
310 static char monCLOCK;
union XrdXrootdMonTrace::@170 arg1
XrdXrootdMonTrace info[sizeof(XrdXrootdMonTrace)]
const kXR_char XROOTD_MON_MAPUSER
const kXR_char XROOTD_MON_MAPINFO
union XrdXrootdMonTrace::@169 arg0
union XrdXrootdMonTrace::@171 arg2
const kXR_char XROOTD_MON_MAPPATH
Hello(const char *dest, char mode)
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)