Loading...
Searching...
No Matches
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.

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

References ReqAborts, ReqAlerts, ReqBound, ReqBytes, ReqCancels, ReqCount, ReqFinForce, ReqFinished, ReqGets, ReqMaxsz, ReqPrepErrs, ReqProcs, ReqRedir, ReqRelBuf, ReqStalls, ResAdds, ResRems, RspBad, RspCallBK, RspData, RspErrs, RspFile, RspMDBytes, RspReady, RspStrm, RspUnRdy, and SsiErrs.

## ~XrdSsiStats()

XrdSsiStats::~XrdSsiStats | ( |  | ) |

inline

Definition at line 73 of file XrdSsiStats.hh.

{}

## Member Function Documentation

## setFS()

void XrdSsiStats::setFS | ( | XrdSfsFileSystem * | fsp | ) |

inline

Definition at line 68 of file XrdSsiStats.hh.

{fsP = fsp;}

## Stats()

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

Definition at line 87 of file XrdSsiStats.cc.

{
static const char statfmt[] = "<stats id=\"ssi\"><err>%d</err>"
"<req>"
"<bytes>%lld</bytes><maxsz>%lld</maxsz><cnt>%d</cnt>"
"<bnd>%d</bnd><rdr>%d</rdr><dly>%d</dly>"
"<ab>%d</ab><proc>%d</proc><gets>%d</gets>"
"<relb>%d</relb><al>%d</al><fin>%d</fin>"
"<can>%d</can><finf>%d</finf><perr>%d</perr>"
"</req><rsp>"
"<bad>%d</bad><cbk>%d</cbk><data>%d</data><errs>%d</errs>"
"<file>%d</file><str>%d</str><rdy>%d</rdy><unr>%d</unr>"
"<mdb>%lld</mdb"
"</rsp><res>"
"<add>%d</add><rem>%d</rem>"
"</res></stats>";
// 1 2 3 4 5 6 7 8
static const long long LLMax = 0x7fffffffffffffffLL;
static const int INMax = 0x7fffffff;
int len;
// If no buffer, caller wants the maximum size we will generate
//
if (!buff)
{char dummy[4096]; // Almost any size will do
len = snprintf(dummy, sizeof(dummy), statfmt, INMax,
/*<bytes>*/ LLMax, LLMax, INMax,
/*<bnd>*/ INMax, INMax, INMax,
/*<ab>*/ INMax, INMax, INMax,
/*<relb>*/ INMax, INMax, INMax,
/*<can>*/ INMax, INMax, INMax,
/*<bad>*/ INMax, INMax, INMax, INMax,
/*<file>*/ INMax, INMax, INMax, INMax, LLMax,
/*<res>*/ INMax, INMax);
return len + (fsP ? fsP->getStats(0,0) : 0);
}
// Format our statistics
//
statsMutex.Lock();
len = snprintf(buff, blen, statfmt, SsiErrs,
ReqBytes, ReqMaxsz, ReqCount,
ReqBound, ReqRedir, ReqStalls,
ReqAborts, ReqProcs, ReqGets,
ReqRelBuf, ReqAlerts, ReqFinished,
ReqCancels, ReqFinForce, ReqPrepErrs,
RspBad, RspCallBK, RspData, RspErrs,
RspFile, RspStrm, RspReady, RspUnRdy,
RspMDBytes, ResAdds, ResRems);
statsMutex.UnLock();
// Now include filesystem statistics and return
//
if (fsP) len += fsP->getStats(buff+len, blen-len);
return len;
}
XrdOucStats::statsMutex
XrdSysMutex statsMutex
Definition XrdOucStats.hh:55

References ReqAborts, ReqAlerts, ReqBound, ReqBytes, ReqCancels, ReqCount, ReqFinForce, ReqFinished, ReqGets, ReqMaxsz, ReqPrepErrs, ReqProcs, ReqRedir, ReqRelBuf, ReqStalls, ResAdds, ResRems, RspBad, RspCallBK, RspData, RspErrs, RspFile, RspMDBytes, RspReady, RspStrm, RspUnRdy, SsiErrs, and XrdOucStats::statsMutex.

## Member Data Documentation

## ReqAborts

int XrdSsiStats::ReqAborts

Definition at line 43 of file XrdSsiStats.hh.

Referenced by XrdSsiStats(), and Stats().

## ReqAlerts

int XrdSsiStats::ReqAlerts

Definition at line 44 of file XrdSsiStats.hh.

Referenced by XrdSsiStats(), and Stats().

## ReqBound

int XrdSsiStats::ReqBound

Definition at line 45 of file XrdSsiStats.hh.

Referenced by XrdSsiStats(), and Stats().

## ReqBytes

long long XrdSsiStats::ReqBytes

Definition at line 40 of file XrdSsiStats.hh.

Referenced by XrdSsiStats(), and Stats().

## ReqCancels

int XrdSsiStats::ReqCancels

Definition at line 46 of file XrdSsiStats.hh.

Referenced by XrdSsiStats(), and Stats().

## ReqCount

int XrdSsiStats::ReqCount

Definition at line 47 of file XrdSsiStats.hh.

Referenced by XrdSsiStats(), and Stats().

## ReqFinForce

int XrdSsiStats::ReqFinForce

Definition at line 48 of file XrdSsiStats.hh.

Referenced by XrdSsiStats(), and Stats().

## ReqFinished

int XrdSsiStats::ReqFinished

Definition at line 49 of file XrdSsiStats.hh.

Referenced by XrdSsiStats(), and Stats().

## ReqGets

int XrdSsiStats::ReqGets

Definition at line 50 of file XrdSsiStats.hh.

Referenced by XrdSsiStats(), and Stats().

## ReqMaxsz

long long XrdSsiStats::ReqMaxsz

Definition at line 41 of file XrdSsiStats.hh.

Referenced by XrdSsiStats(), and Stats().

## ReqPrepErrs

int XrdSsiStats::ReqPrepErrs

Definition at line 51 of file XrdSsiStats.hh.

Referenced by XrdSsiStats(), and Stats().

## ReqProcs

int XrdSsiStats::ReqProcs

Definition at line 52 of file XrdSsiStats.hh.

Referenced by XrdSsiStats(), and Stats().

## ReqRedir

int XrdSsiStats::ReqRedir

Definition at line 53 of file XrdSsiStats.hh.

Referenced by XrdSsiStats(), and Stats().

## ReqRelBuf

int XrdSsiStats::ReqRelBuf

Definition at line 54 of file XrdSsiStats.hh.

Referenced by XrdSsiStats(), and Stats().

## ReqStalls

int XrdSsiStats::ReqStalls

Definition at line 55 of file XrdSsiStats.hh.

Referenced by XrdSsiStats(), and Stats().

## ResAdds

int XrdSsiStats::ResAdds

Definition at line 65 of file XrdSsiStats.hh.

Referenced by XrdSsiStats(), and Stats().

## ResRems

int XrdSsiStats::ResRems

Definition at line 66 of file XrdSsiStats.hh.

Referenced by XrdSsiStats(), and Stats().

## RspBad

int XrdSsiStats::RspBad

Definition at line 56 of file XrdSsiStats.hh.

Referenced by XrdSsiStats(), and Stats().

## RspCallBK

int XrdSsiStats::RspCallBK

Definition at line 57 of file XrdSsiStats.hh.

Referenced by XrdSsiStats(), and Stats().

## RspData

int XrdSsiStats::RspData

Definition at line 58 of file XrdSsiStats.hh.

Referenced by XrdSsiStats(), and Stats().

## RspErrs

int XrdSsiStats::RspErrs

Definition at line 59 of file XrdSsiStats.hh.

Referenced by XrdSsiStats(), and Stats().

## RspFile

int XrdSsiStats::RspFile

Definition at line 60 of file XrdSsiStats.hh.

Referenced by XrdSsiStats(), and Stats().

## RspMDBytes

long long XrdSsiStats::RspMDBytes

Definition at line 42 of file XrdSsiStats.hh.

Referenced by XrdSsiStats(), and Stats().

## RspReady

int XrdSsiStats::RspReady

Definition at line 61 of file XrdSsiStats.hh.

Referenced by XrdSsiStats(), and Stats().

## RspStrm

int XrdSsiStats::RspStrm

Definition at line 62 of file XrdSsiStats.hh.

Referenced by XrdSsiStats(), and Stats().

## RspUnRdy

int XrdSsiStats::RspUnRdy

Definition at line 63 of file XrdSsiStats.hh.

Referenced by XrdSsiStats(), and Stats().

## SsiErrs

int XrdSsiStats::SsiErrs

Definition at line 64 of file XrdSsiStats.hh.

Referenced by XrdSsiStats(), and Stats().

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

- XrdSsiStats.hh
- XrdSsiStats.cc