XRootD
Loading...
Searching...
No Matches
XrdXrootdMonFile.hh
Go to the documentation of this file.
1#ifndef __XRDXROOTDMONFILE__
2#define __XRDXROOTDMONFILE__
3/******************************************************************************/
4/* */
5/* X r d X r o o t d M o n F i l e . h h */
6/* */
7/* (c) 2012 by the Board of Trustees of the Leland Stanford, Jr., University */
8/* All Rights Reserved */
9/* Produced by Andrew Hanushevsky for Stanford University under contract */
10/* DE-AC02-76-SFO0515 with the Department of Energy */
11/* */
12/* This file is part of the XRootD software suite. */
13/* */
14/* XRootD is free software: you can redistribute it and/or modify it under */
15/* the terms of the GNU Lesser General Public License as published by the */
16/* Free Software Foundation, either version 3 of the License, or (at your */
17/* option) any later version. */
18/* */
19/* XRootD is distributed in the hope that it will be useful, but WITHOUT */
20/* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or */
21/* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public */
22/* License for more details. */
23/* */
24/* You should have received a copy of the GNU Lesser General Public License */
25/* along with XRootD in a file called COPYING.LESSER (LGPL license) and file */
26/* COPYING (GPL license). If not, see <http://www.gnu.org/licenses/>. */
27/* */
28/* The copyright holder's institutional names and contributor's names may not */
29/* be used to endorse or promote products derived from this software without */
30/* specific prior written permission of the institution or contributor. */
31/******************************************************************************/
32
33#include "Xrd/XrdJob.hh"
37
41
43{
44public:
45
46static void Close(XrdXrootdFileStats *fsP, bool isDisc=false);
47
48static void Defaults(int intv, int opts, int iocnt, int fbsz);
49
50static void Disc(unsigned int usrID);
51
52 void DoIt();
53
54static bool Init();
55
56static void Open(XrdXrootdFileStats *fsP,
57 const char *Path, unsigned int uDID, bool isRW);
58
59 XrdXrootdMonFile() : XrdJob("monitor fstat") {}
61
62private:
63
64static void DoXFR();
65static void DoXFR(XrdXrootdFileStats *fsP);
66static void Flush();
67static char *GetSlot(int slotSZ);
68
69static XrdSysMutex bfMutex;
70static XrdSysMutex fmMutex;
72static short fmUse[XrdXrootdMonFMap::mapNum];
73static char *repBuff;
74static XrdXrootdMonHeader *repHdr;
75static XrdXrootdMonFileTOD *repTOD;
76static char *repNext;
77static char *repFirst;
78static char *repLast;
79static int totRecs;
80static int xfrRecs;
81static int repSize;
82static int repTime;
83static int fmHWM;
84static int crecSize;
85static int xfrCnt;
86static int fBsz;
87static int xfrRem;
88static XrdXrootdMonFileXFR xfrRec;
89static short crecNLen;
90static short trecNLen;
91static char fsLFN;
92static char fsLVL;
93static char fsOPS;
94static char fsSSQ;
95static char fsXFR;
96static char crecFlag;
97};
98#endif
XrdOucString Path
struct myOpts opts
static const int mapNum
static void Disc(unsigned int usrID)
static void Defaults(int intv, int opts, int iocnt, int fbsz)
static void Open(XrdXrootdFileStats *fsP, const char *Path, unsigned int uDID, bool isRW)
static void Close(XrdXrootdFileStats *fsP, bool isDisc=false)