XRootD
XrdSsiStats Class Reference

#include <XrdSsiStats.hh>

+ Inheritance diagram for XrdSsiStats:
+ Collaboration diagram for XrdSsiStats:

Public Member Functions

 XrdSsiStats ()
 
 ~XrdSsiStats ()
 
void setFS (XrdSfsFileSystem *fsp)
 
int Stats (char *buff, int blen)
 
- Public Member Functions inherited from XrdOucStats
 XrdOucStats ()
 
 ~XrdOucStats ()
 
void Bump (int &val)
 
void Bump (int &val, int n)
 
void Bump (long long &val)
 
void Bump (long long &val, long long n)
 

Public Attributes

int ReqAborts
 
int ReqAlerts
 
int ReqBound
 
long long ReqBytes
 
int ReqCancels
 
int ReqCount
 
int ReqFinForce
 
int ReqFinished
 
int ReqGets
 
long long ReqMaxsz
 
int ReqPrepErrs
 
int ReqProcs
 
int ReqRedir
 
int ReqRelBuf
 
int ReqStalls
 
int ResAdds
 
int ResRems
 
int RspBad
 
int RspCallBK
 
int RspData
 
int RspErrs
 
int RspFile
 
long long RspMDBytes
 
int RspReady
 
int RspStrm
 
int RspUnRdy
 
int SsiErrs
 
- Public Attributes inherited from XrdOucStats
XrdSysMutex statsMutex
 

Detailed Description

Definition at line 37 of file XrdSsiStats.hh.

Constructor & Destructor Documentation

◆ XrdSsiStats()

XrdSsiStats::XrdSsiStats ( )

Definition at line 49 of file XrdSsiStats.cc.

50 {
51 
52 fsP = 0;
53 
54 ReqBytes = 0; // Stats: Number of requests bytes total
55 ReqMaxsz = 0; // Stats: Number of requests largest size
56 RspMDBytes = 0; // Stats: Number of metada response bytes
57 ReqAborts = 0; // Stats: Number of request aborts
58 ReqAlerts = 0; // Stats: Number of request alerts
59 ReqBound = 0; // Stats: Number of requests bound
60 ReqCancels = 0; // Stats: Number of request Finished()+cancel
61 ReqCount = 0; // Stats: Number of requests (total)
62 ReqFinForce = 0; // Stats: Number of request Finished()+forced
63 ReqFinished = 0; // Stats: Number of request Finished()
64 ReqGets = 0; // Stats: Number of requests -> GetRequest()
65 ReqPrepErrs = 0; // Stats: Number of request prepare errors
66 ReqProcs = 0; // Stats: Number of requests -> ProcessRequest()
67 ReqRedir = 0; // Stats: Number of request redirects
68 ReqRelBuf = 0; // Stats: Number of request -> RelRequestBuff()
69 ReqStalls = 0; // Stats: Number of request stalls
70 RspBad = 0; // Stats: Number of invalid responses
71 RspCallBK = 0; // Stats: Number of request callbacks
72 RspData = 0; // Stats: Number of data responses
73 RspErrs = 0; // Stats: Number of error responses
74 RspFile = 0; // Stats: Number of file responses
75 RspReady = 0; // Stats: Number of ready responses
76 RspStrm = 0; // Stats: Number of stream responses
77 RspUnRdy = 0; // Stats: Number of unready responses
78 SsiErrs = 0; // Stats: Number of SSI detected errors
79 ResAdds = 0; // Stats: Number of resource additions
80 ResRems = 0; // Stats: Number of resource removals
81 }
long long ReqMaxsz
Definition: XrdSsiStats.hh:41
long long RspMDBytes
Definition: XrdSsiStats.hh:42
long long ReqBytes
Definition: XrdSsiStats.hh:40

◆ ~XrdSsiStats()

XrdSsiStats::~XrdSsiStats ( )
inline

Definition at line 73 of file XrdSsiStats.hh.

73 {}

Member Function Documentation

◆ setFS()

void XrdSsiStats::setFS ( XrdSfsFileSystem fsp)
inline

Definition at line 68 of file XrdSsiStats.hh.

68 {fsP = fsp;}

Referenced by XrdSfsGetFileSystem2().

+ Here is the caller graph for this function:

◆ Stats()

int XrdSsiStats::Stats ( char *  buff,
int  blen 
)

Definition at line 87 of file XrdSsiStats.cc.

88 {
89  static const char statfmt[] = "<stats id=\"ssi\"><err>%d</err>"
90  "<req>"
91  "<bytes>%lld</bytes><maxsz>%lld</maxsz><cnt>%d</cnt>"
92  "<bnd>%d</bnd><rdr>%d</rdr><dly>%d</dly>"
93  "<ab>%d</ab><proc>%d</proc><gets>%d</gets>"
94  "<relb>%d</relb><al>%d</al><fin>%d</fin>"
95  "<can>%d</can><finf>%d</finf><perr>%d</perr>"
96  "</req><rsp>"
97  "<bad>%d</bad><cbk>%d</cbk><data>%d</data><errs>%d</errs>"
98  "<file>%d</file><str>%d</str><rdy>%d</rdy><unr>%d</unr>"
99  "<mdb>%lld</mdb"
100  "</rsp><res>"
101  "<add>%d</add><rem>%d</rem>"
102  "</res></stats>";
103 // 1 2 3 4 5 6 7 8
104  static const long long LLMax = 0x7fffffffffffffffLL;
105  static const int INMax = 0x7fffffff;
106  int len;
107 
108 // If no buffer, caller wants the maximum size we will generate
109 //
110  if (!buff)
111  {char dummy[4096]; // Almost any size will do
112  len = snprintf(dummy, sizeof(dummy), statfmt, INMax,
113  /*<bytes>*/ LLMax, LLMax, INMax,
114  /*<bnd>*/ INMax, INMax, INMax,
115  /*<ab>*/ INMax, INMax, INMax,
116  /*<relb>*/ INMax, INMax, INMax,
117  /*<can>*/ INMax, INMax, INMax,
118  /*<bad>*/ INMax, INMax, INMax, INMax,
119  /*<file>*/ INMax, INMax, INMax, INMax, LLMax,
120  /*<res>*/ INMax, INMax);
121  return len + (fsP ? fsP->getStats(0,0) : 0);
122  }
123 
124 // Format our statistics
125 //
126  statsMutex.Lock();
127  len = snprintf(buff, blen, statfmt, SsiErrs,
136  statsMutex.UnLock();
137 
138 // Now include filesystem statistics and return
139 //
140  if (fsP) len += fsP->getStats(buff+len, blen-len);
141  return len;
142 }
XrdSysMutex statsMutex
Definition: XrdOucStats.hh:55
virtual int getStats(char *buff, int blen)=0

Referenced by XrdSsiSfs::getStats().

+ Here is the caller graph for this function:

Member Data Documentation

◆ ReqAborts

int XrdSsiStats::ReqAborts

Definition at line 43 of file XrdSsiStats.hh.

Referenced by XrdSsiFileReq::DoIt(), and XrdSsiFileReq::Finalize().

◆ ReqAlerts

int XrdSsiStats::ReqAlerts

Definition at line 44 of file XrdSsiStats.hh.

Referenced by XrdSsiFileReq::Alert().

◆ ReqBound

int XrdSsiStats::ReqBound

Definition at line 45 of file XrdSsiStats.hh.

◆ ReqBytes

long long XrdSsiStats::ReqBytes

Definition at line 40 of file XrdSsiStats.hh.

Referenced by XrdSsiFileReq::Activate().

◆ ReqCancels

int XrdSsiStats::ReqCancels

Definition at line 46 of file XrdSsiStats.hh.

Referenced by XrdSsiFileReq::DoIt(), and XrdSsiFileReq::Finalize().

◆ ReqCount

int XrdSsiStats::ReqCount

Definition at line 47 of file XrdSsiStats.hh.

Referenced by XrdSsiFileReq::Activate().

◆ ReqFinForce

int XrdSsiStats::ReqFinForce

Definition at line 48 of file XrdSsiStats.hh.

Referenced by XrdSsiFileSess::close().

◆ ReqFinished

int XrdSsiStats::ReqFinished

Definition at line 49 of file XrdSsiStats.hh.

Referenced by XrdSsiFileReq::DoIt(), and XrdSsiFileReq::Finalize().

◆ ReqGets

int XrdSsiStats::ReqGets

Definition at line 50 of file XrdSsiStats.hh.

Referenced by XrdSsiFileReq::GetRequest().

◆ ReqMaxsz

long long XrdSsiStats::ReqMaxsz

Definition at line 41 of file XrdSsiStats.hh.

Referenced by XrdSsiFileReq::Activate().

◆ ReqPrepErrs

int XrdSsiStats::ReqPrepErrs

Definition at line 51 of file XrdSsiStats.hh.

Referenced by XrdSsiFileSess::open().

◆ ReqProcs

int XrdSsiStats::ReqProcs

Definition at line 52 of file XrdSsiStats.hh.

Referenced by XrdSsiFileReq::DoIt().

◆ ReqRedir

int XrdSsiStats::ReqRedir

Definition at line 53 of file XrdSsiStats.hh.

Referenced by XrdSsiFileSess::open().

◆ ReqRelBuf

int XrdSsiStats::ReqRelBuf

Definition at line 54 of file XrdSsiStats.hh.

Referenced by XrdSsiFileReq::RelRequestBuffer().

◆ ReqStalls

int XrdSsiStats::ReqStalls

Definition at line 55 of file XrdSsiStats.hh.

Referenced by XrdSsiFileSess::open().

◆ ResAdds

int XrdSsiStats::ResAdds

Definition at line 65 of file XrdSsiStats.hh.

Referenced by XrdSsiCms::Added().

◆ ResRems

int XrdSsiStats::ResRems

Definition at line 66 of file XrdSsiStats.hh.

Referenced by XrdSsiCms::Removed().

◆ RspBad

int XrdSsiStats::RspBad

Definition at line 56 of file XrdSsiStats.hh.

Referenced by XrdSsiFileReq::ProcessResponse().

◆ RspCallBK

int XrdSsiStats::RspCallBK

Definition at line 57 of file XrdSsiStats.hh.

◆ RspData

int XrdSsiStats::RspData

Definition at line 58 of file XrdSsiStats.hh.

Referenced by XrdSsiFileReq::ProcessResponse().

◆ RspErrs

int XrdSsiStats::RspErrs

Definition at line 59 of file XrdSsiStats.hh.

Referenced by XrdSsiFileReq::ProcessResponse().

◆ RspFile

int XrdSsiStats::RspFile

Definition at line 60 of file XrdSsiStats.hh.

Referenced by XrdSsiFileReq::ProcessResponse().

◆ RspMDBytes

long long XrdSsiStats::RspMDBytes

Definition at line 42 of file XrdSsiStats.hh.

Referenced by XrdSsiFileSess::AttnInfo().

◆ RspReady

int XrdSsiStats::RspReady

Definition at line 61 of file XrdSsiStats.hh.

Referenced by XrdSsiFileSess::fctl().

◆ RspStrm

int XrdSsiStats::RspStrm

Definition at line 62 of file XrdSsiStats.hh.

Referenced by XrdSsiFileReq::ProcessResponse().

◆ RspUnRdy

int XrdSsiStats::RspUnRdy

Definition at line 63 of file XrdSsiStats.hh.

Referenced by XrdSsiFileSess::fctl().

◆ SsiErrs

int XrdSsiStats::SsiErrs

Definition at line 64 of file XrdSsiStats.hh.


The documentation for this class was generated from the following files: