XRootD
StatsFileSystem Class Reference

#include <XrdStatsFileSystem.hh>

+ Inheritance diagram for StatsFileSystem:
+ Collaboration diagram for StatsFileSystem:

Public Member Functions

 StatsFileSystem (XrdOss *oss, XrdSysLogger *log, const char *configName, XrdOucEnv *envP)
 
virtual ~StatsFileSystem ()
 
int Chmod (const char *path, mode_t mode, XrdOucEnv *env=0) override
 
bool Config (const char *configfn)
 
void Connect (XrdOucEnv &env) override
 
int Create (const char *tid, const char *path, mode_t mode, XrdOucEnv &env, int opts=0) override
 
void Disc (XrdOucEnv &env) override
 
void EnvInfo (XrdOucEnv *env) override
 
uint64_t Features () override
 
int FSctl (int cmd, int alen, const char *args, char **resp=0) override
 
int Init (XrdSysLogger *lp, const char *cfn) override
 
int Init (XrdSysLogger *lp, const char *cfn, XrdOucEnv *env) override
 
int Lfn2Pfn (const char *Path, char *buff, int blen) override
 
const char * Lfn2Pfn (const char *Path, char *buff, int blen, int &rc) override
 
int Mkdir (const char *path, mode_t mode, int mkpath=0, XrdOucEnv *env=0) override
 
XrdOssDFnewDir (const char *user=0) override
 
XrdOssDFnewFile (const char *user=0) override
 
int Reloc (const char *tident, const char *path, const char *cgName, const char *anchor=0) override
 
int Remdir (const char *path, int Opts=0, XrdOucEnv *env=0) override
 
int Rename (const char *oPath, const char *nPath, XrdOucEnv *oEnvP=0, XrdOucEnv *nEnvP=0) override
 
int Stat (const char *path, struct stat *buff, int opts=0, XrdOucEnv *env=0) override
 
int StatFS (const char *path, char *buff, int &blen, XrdOucEnv *env=0) override
 
int StatLS (XrdOucEnv &env, const char *path, char *buff, int &blen) override
 
int StatPF (const char *path, struct stat *buff) override
 
int StatPF (const char *path, struct stat *buff, int opts) override
 
int Stats (char *buff, int blen) override
 
int StatVS (XrdOssVSInfo *vsP, const char *sname=0, int updt=0) override
 
int StatXA (const char *path, char *buff, int &blen, XrdOucEnv *env=0) override
 
int StatXP (const char *path, unsigned long long &attr, XrdOucEnv *env=0) override
 
int Truncate (const char *path, unsigned long long fsize, XrdOucEnv *env=0) override
 
int Unlink (const char *path, int Opts=0, XrdOucEnv *env=0) override
 
- Public Member Functions inherited from XrdOss
 XrdOss ()
 Constructor and Destructor. More...
 
virtual ~XrdOss ()
 

Friends

class StatsDirectory
 
class StatsFile
 

Additional Inherited Members

- Static Public Attributes inherited from XrdOss
static const int PF_csVer = 0x00000001
 verified file checksums present More...
 
static const int PF_csVun = 0x00000002
 unverified file checksums present More...
 
static const int PF_dInfo = 0x00000001
 
static const int PF_dNums = 0x00000002
 
static const int PF_dStat = 0x00000008
 
static const int PF_isLFN = 0x00000004
 

Detailed Description

Definition at line 17 of file XrdStatsFileSystem.hh.

Constructor & Destructor Documentation

◆ StatsFileSystem()

StatsFileSystem::StatsFileSystem ( XrdOss oss,
XrdSysLogger log,
const char *  configName,
XrdOucEnv envP 
)

Definition at line 14 of file XrdStatsFileSystem.cc.

14  :
15  m_oss(oss),
16  m_env(envP),
17  m_log(lp, "fsstat_"),
18  m_slow_duration(std::chrono::seconds(1))
19 {
20  if (!oss) {
21  throw std::runtime_error("The storage statistics plugin must be chained with another filesystem.");
22  }
23  m_log.Say("------ Initializing the storage statistics plugin.");
24  if (!Config(configfn)) {
25  throw std::runtime_error("Failed to configure the storage statistics plugin.");
26  }
27  pthread_t tid;
28  int rc;
29  if ((rc = XrdSysThread::Run(&tid, StatsFileSystem::AggregateBootstrap, static_cast<void *>(this), 0, "FS Stats Compute Thread"))) {
30  m_log.Emsg("StatsFileSystem", rc, "create stats compute thread");
31  throw std::runtime_error("Failed to create the statistics computing thread.");
32  }
33  if (envP) {
34  m_gstream = reinterpret_cast<XrdXrootdGStream*>(envP->GetPtr("oss.gStream*"));
35  m_log.Say("Config", "Stats monitoring has", m_gstream ? "" : " NOT", " been configured via xrootd.mongstream directive");
36  }
37 }
bool Config(const char *configfn)
void * GetPtr(const char *varname)
Definition: XrdOucEnv.cc:263
int Emsg(const char *esfx, int ecode, const char *text1, const char *text2=0)
Definition: XrdSysError.cc:95
void Say(const char *text1, const char *text2=0, const char *txt3=0, const char *text4=0, const char *text5=0, const char *txt6=0)
Definition: XrdSysError.cc:141
static int Run(pthread_t *, void *(*proc)(void *), void *arg, int opts=0, const char *desc=0)
XrdOucEnv * envP
Definition: XrdPss.cc:109

References Config(), XrdSysError::Emsg(), XrdProxy::envP, XrdOucEnv::GetPtr(), XrdSysThread::Run(), and XrdSysError::Say().

+ Here is the call graph for this function:

◆ ~StatsFileSystem()

StatsFileSystem::~StatsFileSystem ( )
virtual

Definition at line 39 of file XrdStatsFileSystem.cc.

39 {}

Member Function Documentation

◆ Chmod()

int StatsFileSystem::Chmod ( const char *  path,
mode_t  mode,
XrdOucEnv envP = 0 
)
overridevirtual

Change file mode settings.

Parameters
path- Pointer to the path of the file in question.
mode- The new file mode setting.
envP- Pointer to environmental information.
Returns
0 upon success or -errno or -osserr (see XrdOssError.hh).

Implements XrdOss.

Definition at line 111 of file XrdStatsFileSystem.cc.

112 {
113  OpTimer op(m_ops.m_chmod_ops, m_slow_ops.m_chmod_ops, m_times.m_chmod, m_slow_times.m_chmod, m_slow_duration);
114  return m_oss->Chmod(path, mode, env);
115 }
virtual int Chmod(const char *path, mode_t mode, XrdOucEnv *envP=0)=0

References XrdOss::Chmod().

+ Here is the call graph for this function:

◆ Config()

bool StatsFileSystem::Config ( const char *  configfn)

Definition at line 52 of file XrdStatsFileSystem.cc.

53 {
55 
56  XrdOucGatherConf statsConf("fsstats.trace fsstats.slowop", &m_log);
57  int result;
58  if ((result = statsConf.Gather(configfn, XrdOucGatherConf::trim_lines)) < 0) {
59  m_log.Emsg("Config", -result, "parsing config file", configfn);
60  return false;
61  }
62 
63  char *val;
64  while (statsConf.GetLine()) {
65  val = statsConf.GetToken(); // Ignore -- we asked for a single value
66  if (!strcmp(val, "trace")) {
67  m_log.setMsgMask(0);
68  if (!(val = statsConf.GetToken())) {
69  m_log.Emsg("Config", "fsstats.trace requires an argument. Usage: fsstats.trace [all|err|warning|info|debug|none]");
70  return false;
71  }
72  do {
73  if (!strcmp(val, "all")) {m_log.setMsgMask(m_log.getMsgMask() | LogMask::All);}
74  else if (!strcmp(val, "error")) {m_log.setMsgMask(m_log.getMsgMask() | LogMask::Error);}
75  else if (!strcmp(val, "warning")) {m_log.setMsgMask(m_log.getMsgMask() | LogMask::Error | LogMask::Warning);}
76  else if (!strcmp(val, "info")) {m_log.setMsgMask(m_log.getMsgMask() | LogMask::Error | LogMask::Warning | LogMask::Info);}
77  else if (!strcmp(val, "debug")) {m_log.setMsgMask(m_log.getMsgMask() | LogMask::Error | LogMask::Warning | LogMask::Info | LogMask::Debug);}
78  else if (!strcmp(val, "none")) {m_log.setMsgMask(0);}
79  } while ((val = statsConf.GetToken()));
80  } else if (!strcmp(val, "slowop")) {
81  if (!(val = statsConf.GetToken())) {
82  m_log.Emsg("Config", "fsstats.slowop requires an argument. Usage: fsstats.slowop [duration]");
83  return false;
84  }
85  std::string errmsg;
86  if (!ParseDuration(val, m_slow_duration, errmsg)) {
87  m_log.Emsg("Config", "fsstats.slowop couldn't parse duration", val, errmsg.c_str());
88  return false;
89  }
90  }
91  }
92  m_log.Emsg("Config", "Logging levels enabled", LogMaskToString(m_log.getMsgMask()).c_str());
93 
94  return true;
95 }
bool ParseDuration(const std::string &duration, std::chrono::steady_clock::duration &result, std::string &errmsg)
std::string LogMaskToString(int mask)
@ Info
@ Warning
@ All
@ trim_lines
Prefix trimmed lines.
void setMsgMask(int mask)
Definition: XrdSysError.hh:154
int getMsgMask()
Definition: XrdSysError.hh:156

References All, Macaroons::Debug, XrdSysError::Emsg(), Macaroons::Error, XrdOucGatherConf::Gather(), XrdOucGatherConf::GetLine(), XrdSysError::getMsgMask(), XrdOucGatherConf::GetToken(), Info, LogMaskToString(), ParseDuration(), XrdSysError::setMsgMask(), XrdOucGatherConf::trim_lines, and Warning.

Referenced by StatsFileSystem().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Connect()

void StatsFileSystem::Connect ( XrdOucEnv env)
overridevirtual

Notify storage system that a client has connected.

Parameters
env- Reference to environmental information.

Reimplemented from XrdOss.

Definition at line 117 of file XrdStatsFileSystem.cc.

118 {
119  m_oss->Connect(env);
120 }
virtual void Connect(XrdOucEnv &env)
Definition: XrdOss.cc:42

References XrdOss::Connect().

+ Here is the call graph for this function:

◆ Create()

int StatsFileSystem::Create ( const char *  tid,
const char *  path,
mode_t  mode,
XrdOucEnv env,
int  opts = 0 
)
overridevirtual

Create file.

Parameters
tid- Pointer to the trace identifier.
path- Pointer to the path of the file to create.
mode- The new file mode setting.
env- Reference to environmental information.
opts- Create options: XRDOSS_mkpath - create dir path if it does not exist. XRDOSS_new - the file must not already exist. oflags<<8 - open flags shifted 8 bits to the left/
Returns
0 upon success or -errno or -osserr (see XrdOssError.hh).

Implements XrdOss.

Definition at line 122 of file XrdStatsFileSystem.cc.

124 {
125  return m_oss->Create(tid, path, mode, env, opts);
126 }
struct myOpts opts
virtual int Create(const char *tid, const char *path, mode_t mode, XrdOucEnv &env, int opts=0)=0

References XrdOss::Create(), and opts.

+ Here is the call graph for this function:

◆ Disc()

void StatsFileSystem::Disc ( XrdOucEnv env)
overridevirtual

Notify storage system that a client has disconnected.

Parameters
env- Reference to environmental information.

Reimplemented from XrdOss.

Definition at line 128 of file XrdStatsFileSystem.cc.

129 {
130  m_oss->Disc(env);
131 }
virtual void Disc(XrdOucEnv &env)
Definition: XrdOss.cc:48

References XrdOss::Disc().

+ Here is the call graph for this function:

◆ EnvInfo()

void StatsFileSystem::EnvInfo ( XrdOucEnv envP)
overridevirtual

Notify storage system of initialization information (deprecated).

Parameters
envP- Pointer to environmental information.

Reimplemented from XrdOss.

Definition at line 133 of file XrdStatsFileSystem.cc.

134 {
135  m_oss->EnvInfo(env);
136 }
virtual void EnvInfo(XrdOucEnv *envP)
Definition: XrdOss.cc:54

References XrdOss::EnvInfo().

+ Here is the call graph for this function:

◆ Features()

uint64_t StatsFileSystem::Features ( )
overridevirtual

Return storage system features.

Returns
Storage system features (see XRDOSS_HASxxx flags).

Reimplemented from XrdOss.

Definition at line 138 of file XrdStatsFileSystem.cc.

139 {
140  return m_oss->Features();
141 }
virtual uint64_t Features()
Definition: XrdOss.cc:60

References XrdOss::Features().

+ Here is the call graph for this function:

◆ FSctl()

int StatsFileSystem::FSctl ( int  cmd,
int  alen,
const char *  args,
char **  resp = 0 
)
overridevirtual

Execute a special storage system operation.

Parameters
cmd- The operation to be performed: XRDOSS_FSCTLFA - Perform proxy file attribute operation
alen- Length of data pointed to by args.
args- Data sent with request, zero if alen is zero.
resp- Where the response is to be set, if any.
Returns
0 upon success or -errno or -osserr (see XrdOssError.hh).

Reimplemented from XrdOss.

Definition at line 143 of file XrdStatsFileSystem.cc.

144 {
145  return m_oss->FSctl(cmd, alen, args, resp);
146 }
virtual int FSctl(int cmd, int alen, const char *args, char **resp=0)
Definition: XrdOss.cc:66

References XrdOss::FSctl().

+ Here is the call graph for this function:

◆ Init() [1/2]

int StatsFileSystem::Init ( XrdSysLogger lp,
const char *  cfn 
)
overridevirtual

Initialize the storage system V1 (deprecated).

Parameters
lp- Pointer to the message logging object.
cfn- Pointer to the configuration file.
Returns
0 upon success or -errno or -osserr (see XrdOssError.hh).

Implements XrdOss.

Definition at line 148 of file XrdStatsFileSystem.cc.

149 {
150  return 0;
151 }

Referenced by Init().

+ Here is the caller graph for this function:

◆ Init() [2/2]

int StatsFileSystem::Init ( XrdSysLogger lp,
const char *  cfn,
XrdOucEnv envP 
)
overridevirtual

Initialize the storage system V2.

Parameters
lp- Pointer to the message logging object.
cfn- Pointer to the configuration file.
envP- Pointer to environmental information.
Returns
0 upon success or -errno or -osserr (see XrdOssError.hh).

Reimplemented from XrdOss.

Definition at line 153 of file XrdStatsFileSystem.cc.

154 {
155  return Init(lp, cfn);
156 }
int Init(XrdSysLogger *lp, const char *cfn) override

References Init().

+ Here is the call graph for this function:

◆ Lfn2Pfn() [1/2]

int StatsFileSystem::Lfn2Pfn ( const char *  Path,
char *  buff,
int  blen 
)
overridevirtual

Translate logical name to physical name V1 (deprecated).

Parameters
Path- Path in whose information is wanted.
buff- Pointer to the buffer to hold the new path.
blen- Length of the buffer.
Returns
0 upon success or -errno or -osserr (see XrdOssError.hh).

Reimplemented from XrdOss.

Definition at line 253 of file XrdStatsFileSystem.cc.

254 {
255  return m_oss->Lfn2Pfn(Path, buff, blen);
256 }
XrdOucString Path
virtual int Lfn2Pfn(const char *Path, char *buff, int blen)
Definition: XrdOss.hh:873

References XrdOss::Lfn2Pfn(), and Path.

+ Here is the call graph for this function:

◆ Lfn2Pfn() [2/2]

const char * StatsFileSystem::Lfn2Pfn ( const char *  Path,
char *  buff,
int  blen,
int &  rc 
)
overridevirtual

Translate logical name to physical name V2.

Parameters
Path- Path in whose information is wanted.
buff- Pointer to the buffer to hold the new path.
blen- Length of the buffer.
rc- Place where failure return code is to be returned: -errno or -osserr (see XrdOssError.hh).
Returns
Pointer to the translated path upon success or nil on failure.

Reimplemented from XrdOss.

Definition at line 258 of file XrdStatsFileSystem.cc.

259 {
260  return m_oss->Lfn2Pfn(Path, buff, blen, rc);
261 }

References XrdOss::Lfn2Pfn(), and Path.

+ Here is the call graph for this function:

◆ Mkdir()

int StatsFileSystem::Mkdir ( const char *  path,
mode_t  mode,
int  mkpath = 0,
XrdOucEnv envP = 0 
)
overridevirtual

Create a directory.

Parameters
path- Pointer to the path of the directory to be created.
mode- The directory mode setting.
mkpath- When true the path is created if it does not exist.
envP- Pointer to environmental information.
Returns
0 upon success or -errno or -osserr (see XrdOssError.hh).

Implements XrdOss.

Definition at line 158 of file XrdStatsFileSystem.cc.

160 {
161  return m_oss->Mkdir(path, mode, mkpath, env);
162 }
virtual int Mkdir(const char *path, mode_t mode, int mkpath=0, XrdOucEnv *envP=0)=0

References XrdOss::Mkdir().

+ Here is the call graph for this function:

◆ newDir()

XrdOssDF * StatsFileSystem::newDir ( const char *  tident = 0)
overridevirtual

Obtain a new director object to be used for future directory requests.

Parameters
tident- The trace identifier.
Returns
pointer- Pointer to an XrdOssDF object.
nil - Insufficient memory to allocate an object.

Implements XrdOss.

Definition at line 97 of file XrdStatsFileSystem.cc.

98 {
99  // Call the underlying OSS newDir
100  std::unique_ptr<XrdOssDF> wrapped(m_oss->newDir(user));
101  return new StatsDirectory(user, std::move(wrapped), m_log, *this);
102 }
friend class StatsDirectory
virtual XrdOssDF * newDir(const char *tident)=0

References XrdOss::newDir(), and StatsDirectory.

+ Here is the call graph for this function:

◆ newFile()

XrdOssDF * StatsFileSystem::newFile ( const char *  tident = 0)
overridevirtual

Obtain a new file object to be used for a future file requests.

Parameters
tident- The trace identifier.
Returns
pointer- Pointer to an XrdOssDF object.
nil - Insufficient memory to allocate an object.

Implements XrdOss.

Definition at line 104 of file XrdStatsFileSystem.cc.

105 {
106  // Call the underlying OSS newFile
107  std::unique_ptr<XrdOssDF> wrapped(m_oss->newFile(user));
108  return new StatsFile(std::move(wrapped), m_log, *this);
109 }
friend class StatsFile
virtual XrdOssDF * newFile(const char *tident)=0

References XrdOss::newFile(), and StatsFile.

+ Here is the call graph for this function:

◆ Reloc()

int StatsFileSystem::Reloc ( const char *  tident,
const char *  path,
const char *  cgName,
const char *  anchor = 0 
)
overridevirtual

Relocate/Copy the file at ‘path’ to a new location.

Parameters
tident- -> trace identifier for this operation.
path- -> fully qualified name of the file to relocate.
cgName- -> target space name[:path]
anchor- Processing directions (see XrdOssReloc.cc example).
Returns
0 upon success or -errno or -osserr (see XrdOssError.hh).

Reimplemented from XrdOss.

Definition at line 164 of file XrdStatsFileSystem.cc.

166 {
167  return m_oss->Reloc(tident, path, cgName, anchor);
168 }
#define tident
virtual int Reloc(const char *tident, const char *path, const char *cgName, const char *anchor=0)
Definition: XrdOss.cc:76

References XrdOss::Reloc(), and tident.

+ Here is the call graph for this function:

◆ Remdir()

int StatsFileSystem::Remdir ( const char *  path,
int  Opts = 0,
XrdOucEnv envP = 0 
)
overridevirtual

Remove a directory.

Parameters
path- Pointer to the path of the directory to be removed.
Opts- The processing options: XRDOSS_Online - only remove online copy XRDOSS_isPFN - path is already translated.
envP- Pointer to environmental information.
Returns
0 upon success or -errno or -osserr (see XrdOssError.hh).

Implements XrdOss.

Definition at line 170 of file XrdStatsFileSystem.cc.

171 {
172  return m_oss->Remdir(path, Opts, env);
173 }
virtual int Remdir(const char *path, int Opts=0, XrdOucEnv *envP=0)=0
int Opts
Definition: XrdMpxStats.cc:58

References XrdMpx::Opts, and XrdOss::Remdir().

+ Here is the call graph for this function:

◆ Rename()

int StatsFileSystem::Rename ( const char *  oPath,
const char *  nPath,
XrdOucEnv oEnvP = 0,
XrdOucEnv nEnvP = 0 
)
overridevirtual

Rename a file or directory.

Parameters
oPath- Pointer to the path to be renamed.
nPath- Pointer to the path oPath is to have.
oEnvP- Environmental information for oPath.
nEnvP- Environmental information for nPath.
Returns
0 upon success or -errno or -osserr (see XrdOssError.hh).

Implements XrdOss.

Definition at line 175 of file XrdStatsFileSystem.cc.

177 {
178  OpTimer op(m_ops.m_rename_ops, m_slow_ops.m_rename_ops, m_times.m_rename, m_slow_times.m_rename, m_slow_duration);
179  return m_oss->Rename(oPath, nPath, oEnvP, nEnvP);
180 }
virtual int Rename(const char *oPath, const char *nPath, XrdOucEnv *oEnvP=0, XrdOucEnv *nEnvP=0)=0

References XrdOss::Rename().

+ Here is the call graph for this function:

◆ Stat()

int StatsFileSystem::Stat ( const char *  path,
struct stat buff,
int  opts = 0,
XrdOucEnv envP = 0 
)
overridevirtual

Return state information on a file or directory.

Parameters
path- Pointer to the path in question.
buff- Pointer to the structure where info it to be returned.
opts- Options: XRDOSS_preop - this is a stat prior to open. XRDOSS_resonly - only look for resident files. XRDOSS_updtatm - update file access time.
envP- Pointer to environmental information.
Returns
0 upon success or -errno or -osserr (see XrdOssError.hh).

Implements XrdOss.

Definition at line 182 of file XrdStatsFileSystem.cc.

184 {
185  OpTimer op(m_ops.m_stat_ops, m_slow_ops.m_stat_ops, m_times.m_stat, m_slow_times.m_stat, m_slow_duration);
186  return m_oss->Stat(path, buff, opts, env);
187 }
virtual int Stat(const char *path, struct stat *buff, int opts=0, XrdOucEnv *envP=0)=0

References opts, and XrdOss::Stat().

+ Here is the call graph for this function:

◆ StatFS()

int StatsFileSystem::StatFS ( const char *  path,
char *  buff,
int &  blen,
XrdOucEnv envP = 0 
)
overridevirtual

Return filesystem physical space information associated with a path.

Parameters
path- Path in the partition in question.
buff- Pointer to the buffer to hold the information.
blen- Length of the buffer. This is updated with the actual number of bytes placed in the buffer as in snprintf().
envP- Pointer to environmental information.
Returns
"<wval> <fsp> <utl> <sval> <fsp> <utl>" where: <wval> is "0" if XRDEXP_NOTRW specified, otherwise "1" <fsp> is free space in megabytes. <utl> is percentage utilization (i.e. allocated space) <sval> is "1' if XRDEXP_STAGE specified, otherwise "0" Upon failure -errno or -osserr (see XrdOssError.hh) returned.

Reimplemented from XrdOss.

Definition at line 194 of file XrdStatsFileSystem.cc.

196 {
197  OpTimer op(m_ops.m_stat_ops, m_slow_ops.m_stat_ops, m_times.m_stat, m_slow_times.m_stat, m_slow_duration);
198  return m_oss->StatFS(path, buff, blen, env);
199 }
virtual int StatFS(const char *path, char *buff, int &blen, XrdOucEnv *envP=0)
Definition: XrdOss.cc:87

References XrdOss::StatFS().

+ Here is the call graph for this function:

◆ StatLS()

int StatsFileSystem::StatLS ( XrdOucEnv env,
const char *  path,
char *  buff,
int &  blen 
)
overridevirtual

Return filesystem physical space information associated with a space name.

Parameters
env- Ref to environmental information. If the environment has the key oss.cgroup defined, the associated value is used as the space name and the path is ignored.
path- Path in the name space in question. The space name associated with gthe path is used unless overridden.
buff- Pointer to the buffer to hold the information.
blen- Length of the buffer. This is updated with the actual number of bytes placed in the buffer as in snprintf().
Returns
"oss.cgroup=<name>&oss.space=<totbytes>&oss.free=<freebytes> &oss.maxf=<maxcontigbytes>&oss.used=<bytesused> &oss.quota=<quotabytes>" in buff upon success. Upon failure -errno or -osserr (see XrdOssError.hh) returned.

Reimplemented from XrdOss.

Definition at line 201 of file XrdStatsFileSystem.cc.

203 {
204  OpTimer op(m_ops.m_stat_ops, m_slow_ops.m_stat_ops, m_times.m_stat, m_slow_times.m_stat, m_slow_duration);
205  return m_oss->StatLS(env, path, buff, blen);
206 }
virtual int StatLS(XrdOucEnv &env, const char *path, char *buff, int &blen)
Definition: XrdOss.cc:97

References XrdOss::StatLS().

+ Here is the call graph for this function:

◆ StatPF() [1/2]

int StatsFileSystem::StatPF ( const char *  path,
struct stat buff 
)
overridevirtual

Reimplemented from XrdOss.

Definition at line 214 of file XrdStatsFileSystem.cc.

215 {
216  OpTimer op(m_ops.m_stat_ops, m_slow_ops.m_stat_ops, m_times.m_stat, m_slow_times.m_stat, m_slow_duration);
217  return m_oss->StatPF(path, buff, 0);
218 }
virtual int StatPF(const char *path, struct stat *buff, int opts)
Definition: XrdOss.cc:107

References XrdOss::StatPF().

+ Here is the call graph for this function:

◆ StatPF() [2/2]

int StatsFileSystem::StatPF ( const char *  path,
struct stat buff,
int  opts 
)
overridevirtual

Reimplemented from XrdOss.

Definition at line 208 of file XrdStatsFileSystem.cc.

209 {
210  OpTimer op(m_ops.m_stat_ops, m_slow_ops.m_stat_ops, m_times.m_stat, m_slow_times.m_stat, m_slow_duration);
211  return m_oss->StatPF(path, buff, opts);
212 }

References opts, and XrdOss::StatPF().

+ Here is the call graph for this function:

◆ Stats()

int StatsFileSystem::Stats ( char *  buff,
int  blen 
)
overridevirtual

Return statistics.

Parameters
buff- Pointer to the buffer to hold statistics.
blen- Length of the buffer.
Returns
The number of bytes placed in the buffer excluding null byte.

Reimplemented from XrdOss.

Definition at line 189 of file XrdStatsFileSystem.cc.

190 {
191  return m_oss->Stats(buff, blen);
192 }
virtual int Stats(char *buff, int blen)
Definition: XrdOss.hh:707

References XrdOss::Stats().

+ Here is the call graph for this function:

◆ StatVS()

int StatsFileSystem::StatVS ( XrdOssVSInfo vsP,
const char *  sname = 0,
int  updt = 0 
)
overridevirtual

Return space information for a space name.

Parameters
vsP- Pointer to the XrdOssVSInfo object to hold results. It should be fully initialized (i.e. a new copy).
sname- Pointer to the space name. If the name starts with a plus (e.g. "+public"), partition information is returned, should it exist. If nil, space information for all spaces is returned. See, XrdOssVS.hh for more info.
updt- When true, a space update occurrs prior to a query.
Returns
0 upon success or -errno or -osserr (see XrdOssError.hh).

Reimplemented from XrdOss.

Definition at line 220 of file XrdStatsFileSystem.cc.

221 {
222  OpTimer op(m_ops.m_stat_ops, m_slow_ops.m_stat_ops, m_times.m_stat, m_slow_times.m_stat, m_slow_duration);
223  return m_oss->StatVS(vsP, sname, updt);
224 }
virtual int StatVS(XrdOssVSInfo *vsP, const char *sname=0, int updt=0)
Definition: XrdOss.cc:117

References XrdOss::StatVS().

+ Here is the call graph for this function:

◆ StatXA()

int StatsFileSystem::StatXA ( const char *  path,
char *  buff,
int &  blen,
XrdOucEnv envP = 0 
)
overridevirtual

Return logical extended attributes associated with a path.

Parameters
path- Path in whose information is wanted.
buff- Pointer to the buffer to hold the information.
blen- Length of the buffer. This is updated with the actual number of bytes placed in the buffer as in snprintf().
envP- Pointer to environmental information.
Returns
"oss.cgroup=<name>&oss.type={'f'|'d'|'o'}&oss.used=<totbytes> &oss.mt=<mtime>&oss.ct=<ctime>&oss.at=<atime>&oss.u=*&oss.g=* &oss.fs={'w'|'r'}" Upon failure -errno or -osserr (see XrdOssError.hh) returned.

Reimplemented from XrdOss.

Definition at line 226 of file XrdStatsFileSystem.cc.

228 {
229  OpTimer op(m_ops.m_stat_ops, m_slow_ops.m_stat_ops, m_times.m_stat, m_slow_times.m_stat, m_slow_duration);
230  return m_oss->StatXA(path, buff, blen, env);
231 }
virtual int StatXA(const char *path, char *buff, int &blen, XrdOucEnv *envP=0)
Definition: XrdOss.cc:127

References XrdOss::StatXA().

+ Here is the call graph for this function:

◆ StatXP()

int StatsFileSystem::StatXP ( const char *  path,
unsigned long long &  attr,
XrdOucEnv envP = 0 
)
overridevirtual

Return export attributes associated with a path.

Parameters
path- Path in whose information is wanted.
attr- Reference to where the inforamation is to be stored.
envP- Pointer to environmental information.
Returns
0 upon success or -errno or -osserr (see XrdOssError.hh).

Reimplemented from XrdOss.

Definition at line 233 of file XrdStatsFileSystem.cc.

235 {
236  OpTimer op(m_ops.m_stat_ops, m_slow_ops.m_stat_ops, m_times.m_stat, m_slow_times.m_stat, m_slow_duration);
237  return m_oss->StatXP(path, attr, env);
238 }
virtual int StatXP(const char *path, unsigned long long &attr, XrdOucEnv *envP=0)
Definition: XrdOss.cc:137

References XrdOss::StatXP().

+ Here is the call graph for this function:

◆ Truncate()

int StatsFileSystem::Truncate ( const char *  path,
unsigned long long  fsize,
XrdOucEnv envP = 0 
)
overridevirtual

Truncate a file.

Parameters
path- Pointer to the path of the file to be truncated.
fsize- The size that the file is to have.
envP- Pointer to environmental information.
Returns
0 upon success or -errno or -osserr (see XrdOssError.hh).

Implements XrdOss.

Definition at line 240 of file XrdStatsFileSystem.cc.

242 {
243  OpTimer op(m_ops.m_truncate_ops, m_slow_ops.m_truncate_ops, m_times.m_truncate, m_slow_times.m_truncate, m_slow_duration);
244  return m_oss->Truncate(path, fsize, env);
245 }
virtual int Truncate(const char *path, unsigned long long fsize, XrdOucEnv *envP=0)=0

References XrdOss::Truncate().

+ Here is the call graph for this function:

◆ Unlink()

int StatsFileSystem::Unlink ( const char *  path,
int  Opts = 0,
XrdOucEnv envP = 0 
)
overridevirtual

Remove a file.

Parameters
path- Pointer to the path of the file to be removed.
Opts- Options: XRDOSS_isMIG - this is a migratable path. XRDOSS_isPFN - do not apply name2name to path. XRDOSS_Online - remove only the online copy.
envP- Pointer to environmental information.
Returns
0 upon success or -errno or -osserr (see XrdOssError.hh).

Implements XrdOss.

Definition at line 247 of file XrdStatsFileSystem.cc.

248 {
249  OpTimer op(m_ops.m_unlink_ops, m_slow_ops.m_unlink_ops, m_times.m_unlink, m_slow_times.m_unlink, m_slow_duration);
250  return m_oss->Unlink(path, Opts, env);
251 }
virtual int Unlink(const char *path, int Opts=0, XrdOucEnv *envP=0)=0

References XrdMpx::Opts, and XrdOss::Unlink().

+ Here is the call graph for this function:

Friends And Related Function Documentation

◆ StatsDirectory

friend class StatsDirectory
friend

Definition at line 19 of file XrdStatsFileSystem.hh.

Referenced by newDir().

◆ StatsFile

friend class StatsFile
friend

Definition at line 18 of file XrdStatsFileSystem.hh.

Referenced by newFile().


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