diff --git a/src/XrdXrootd/XrdXrootdMonData.hh b/src/XrdXrootd/XrdXrootdMonData.hh index cc876e72233..f6fdf72c28f 100644 --- a/src/XrdXrootd/XrdXrootdMonData.hh +++ b/src/XrdXrootd/XrdXrootdMonData.hh @@ -183,8 +183,10 @@ struct XrdXrootdMonFileTOD XrdXrootdMonFileHdr Hdr; // 8 int tBeg; // time(0) of following record int tEnd; // time(0) when packet was sent +kXR_int64 sID; // Server id in lower 48 bits }; + // The following variable length structure exists in XrdXrootdMonFileOPN if // "lfn" has been specified. It exists only when recFlag & hasLFN is TRUE. // The user's dictid will be zero (missing) if user monitoring is not enabled. diff --git a/src/XrdXrootd/XrdXrootdMonFile.cc b/src/XrdXrootd/XrdXrootdMonFile.cc index a0fe8d59682..c92589b10e0 100644 --- a/src/XrdXrootd/XrdXrootdMonFile.cc +++ b/src/XrdXrootd/XrdXrootdMonFile.cc @@ -38,6 +38,15 @@ #include "XrdXrootd/XrdXrootdMonFile.hh" #include "XrdXrootd/XrdXrootdFileStats.hh" +/******************************************************************************/ +/* G l o b a l s */ +/******************************************************************************/ + +namespace XrdXrootdMonInfo +{ +extern long long mySID; +} + /******************************************************************************/ /* S t a t i c M e m b e r s */ /******************************************************************************/ @@ -71,7 +80,7 @@ char XrdXrootdMonFile::fsOPS = 0; char XrdXrootdMonFile::fsSSQ = 0; char XrdXrootdMonFile::fsXFR = 0; char XrdXrootdMonFile::crecFlag = 0; - + /******************************************************************************/ /* C l o s e */ /******************************************************************************/ @@ -338,6 +347,7 @@ bool XrdXrootdMonFile::Init(XrdScheduler *sp, XrdSysError *errp, int bfsz) repTOD->Hdr.recType = XrdXrootdMonFileHdr::isTime; repTOD->Hdr.recFlag = 0; repTOD->Hdr.recSize = htons(sizeof(XrdXrootdMonFileTOD)); + repTOD->sID = static_cast(XrdXrootdMonInfo::mySID); // Establish first real record in the buffer (always fixed) // diff --git a/src/XrdXrootd/XrdXrootdMonitor.cc b/src/XrdXrootd/XrdXrootdMonitor.cc index a12584eab9d..f1fac80b5bd 100644 --- a/src/XrdXrootd/XrdXrootdMonitor.cc +++ b/src/XrdXrootd/XrdXrootdMonitor.cc @@ -88,7 +88,6 @@ int XrdXrootdMonitor::rdrTOD = 0; int XrdXrootdMonitor::rdrWin = 0; int XrdXrootdMonitor::rdrNum = 3; kXR_int32 XrdXrootdMonitor::sizeWindow = 60; -long long XrdXrootdMonitor::mySID = 0; char XrdXrootdMonitor::sidName[16]= {0}; short XrdXrootdMonitor::sidSize = 0; char XrdXrootdMonitor::monINFO = 0; @@ -107,6 +106,13 @@ char XrdXrootdMonitor::monCLOCK = 0; extern XrdOucTrace *XrdXrootdTrace; +namespace XrdXrootdMonInfo +{ +long long mySID = 0; +} + +using namespace XrdXrootdMonInfo; + /******************************************************************************/ /* L o c a l D e f i n e s */ /******************************************************************************/ diff --git a/src/XrdXrootd/XrdXrootdMonitor.hh b/src/XrdXrootd/XrdXrootdMonitor.hh index f1244e9b511..0c9ab44dc47 100644 --- a/src/XrdXrootd/XrdXrootdMonitor.hh +++ b/src/XrdXrootd/XrdXrootdMonitor.hh @@ -256,7 +256,6 @@ static int isEnabled; static int numMonitor; static int monIdent; static int monRlen; -static long long mySID; static char sidName[16]; static short sidSize; static char monIO;