|
xrootd
|
#include <XrdFrmConfig.hh>

Classes | |
| struct | Cmd |
| struct | Policy |
| struct | VPInfo |
Public Types | |
| enum | PPVar { PP_atime = 0, PP_ctime, PP_fname, PP_fsize, PP_fspace, PP_mtime, PP_pfn, PP_sname, PP_tspace, PP_usage } |
| enum | SubSys { ssAdmin, ssMigr, ssPstg, ssPurg, ssXfr } |
Public Member Functions | |
| int | Configure (int argc, char **argv, int(*ppf)()) |
| int | LocalPath (const char *oldp, char *newp, int newpsz) |
| int | LogicalPath (const char *oldp, char *newp, int newpsz) |
| unsigned long long | PathOpts (const char *Lfn) |
| int | RemotePath (const char *oldp, char *newp, int newpsz) |
| XrdOucTList * | Space (const char *Name, const char *Path=0) |
| XrdFrmConfig (SubSys ss, const char *vopts, const char *uinfo) | |
| ~XrdFrmConfig () | |
Public Attributes | |
| const char * | myProg |
| const char * | myName |
| const char * | myInst |
| const char * | myFrmid |
| const char * | myFrmID |
| const char * | lockFN |
| char * | AdminPath |
| char * | QPath |
| char * | PidPath |
| char * | myInstance |
| char * | StopPurge |
| char * | MSSCmd |
| XrdOucProg * | MSSProg |
| struct XrdFrmConfig::Cmd | xfrCmd [4] |
| int | xfrIN |
| int | xfrOUT |
| char * | CksAlg |
| XrdCksConfig * | CksCfg |
| XrdCks * | CksMan |
| XrdOucName2Name * | the_N2N |
| XrdOss * | ossFS |
| XrdNetCmsNotify * | cmsPath |
| uid_t | myUid |
| gid_t | myGid |
| long long | cmdFree |
| int | cmdHold |
| int | AdminMode |
| int | isAgent |
| int | xfrMax |
| int | FailHold |
| int | IdleHold |
| int | WaitQChk |
| int | WaitPurge |
| int | WaitMigr |
| int | monStage |
| int | haveCMS |
| int | isOTO |
| int | Fix |
| int | Test |
| int | TrackDC |
| int | Verbose |
| int | runOld |
| int | runNew |
| int | nonXA |
| int | hasCache |
| char ** | vectArg |
| int | nextArg |
| int | numcArg |
| struct XrdFrmConfig::VPInfo * | VPList |
| VPInfo * | pathList |
| XrdOucTList * | spacList |
| Policy | dfltPolicy |
| int | dirHold |
| int | pVecNum |
| char | pVec [pVecMax] |
| char * | pProg |
Static Public Attributes | |
| static const int | cmdAlloc = 0x0001 |
| static const int | cmdMDP = 0x0002 |
| static const int | cmdStats = 0x0004 |
| static const int | pVecMax = 8 |
Private Member Functions | |
| int | ConfigCks () |
| XrdOucMsubs * | ConfigCmd (const char *cname, char *cdata) |
| int | ConfigMum (XrdFrmConfigSE &theSE) |
| int | ConfigN2N () |
| int | ConfigMP (const char *) |
| int | ConfigMss () |
| int | ConfigOTO (char *Parms) |
| int | ConfigPaths () |
| void | ConfigPF (const char *pFN) |
| int | ConfigProc () |
| int | ConfigXeq (char *var, int mbok) |
| int | ConfigXfr () |
| int | getTime (const char *, const char *, int *, int mnv=-1, int mxv=-1) |
| int | Grab (const char *var, char **Dest, int nosubs) |
| XrdOucTList * | InsertPL (XrdOucTList *pP, const char *Path, int Plen, int isRW) |
| void | InsertXD (const char *Path) |
| void | Usage (int rc) |
| int | xapath () |
| int | xcks (int isOfs=0) |
| int | xcnsd () |
| int | xcopy () |
| int | xcopy (int &TLim) |
| int | xcmax () |
| int | xdpol () |
| int | xitm (const char *What, int &tDest) |
| int | xnml () |
| int | xmon () |
| int | xpol () |
| int | xpolprog () |
| int | xqchk () |
| int | xspace (int isPrg=0, int isXA=1) |
| void | xspaceBuild (char *grp, char *fn, int isxa) |
| int | xxfr () |
Private Attributes | |
| char * | ConfigFN |
| char * | ossLib |
| char * | LocalRoot |
| char * | RemoteRoot |
| XrdOucStream * | cFile |
| int | plnDTS |
| const char * | pfxDTS |
| const char * | vOpts |
| const char * | uInfo |
| char * | N2N_Lib |
| char * | N2N_Parms |
| XrdOucName2Name * | lcl_N2N |
| XrdOucName2Name * | rmt_N2N |
| SubSys | ssID |
| enum XrdFrmConfig::PPVar |
| enum XrdFrmConfig::SubSys |
| XrdFrmConfig::XrdFrmConfig | ( | SubSys | ss, |
| const char * | vopts, | ||
| const char * | uinfo | ||
| ) |
References vOpts, uInfo, ssID, AdminPath, QPath, AdminMode, xfrMax, FailHold, IdleHold, WaitMigr, WaitPurge, WaitQChk, MSSCmd, xfrCmd, XrdFrmConfig::Cmd::Desc, xfrIN, xfrOUT, isAgent, ossLib, cmsPath, monStage, haveCMS, isOTO, Test, Verbose, pathList, spacList, lockFN, cmdHold, cmdFree, pVecNum, pProg, Fix, dirHold, runOld, runNew, nonXA, myUid, myGid, LocalRoot, RemoteRoot, lcl_N2N, rmt_N2N, the_N2N, N2N_Lib, N2N_Parms, CksAlg, CksCfg, CksMan, myInst, XrdOucUtils::InstName(), ConfigFN, ssAdmin, myFrmid, myFrmID, ssPurg, ssXfr, Say, pfxDTS, and plnDTS.
| XrdFrmConfig::~XrdFrmConfig | ( | ) | [inline] |
| int XrdFrmConfig::ConfigCks | ( | ) | [private] |
References CksAlg, CksMan, CksCfg, and XrdCksConfig::Configure().
Referenced by Configure().
| XrdOucMsubs * XrdFrmConfig::ConfigCmd | ( | const char * | cname, |
| char * | cdata | ||
| ) | [private] |
References Say, index(), access(), X_OK, and XrdOucMsubs::Parse().
Referenced by ConfigXfr().
| int XrdFrmConfig::ConfigMP | ( | const char * | pType | ) | [private] |
References EPNAME, XrdOssRPList, XRDEXP_MIG, XRDEXP_PURGE, Say, nextArg, numcArg, vectArg, XrdOucPListAnchor::Find(), InsertPL(), XRDEXP_MAKELF, VPList, XrdFrmConfig::VPInfo::Name, XrdFrmConfig::VPInfo::Next, spacList, XrdOucPListAnchor::First(), XrdOucPList::Flag(), XrdOucPList::Plen(), XrdOucPList::Path(), LocalPath(), XrdOucTList::text, pathList, XrdOucTList::sval, DEBUG, InsertXD(), XrdOucTList::next, XRDEXP_STAGE, XrdOucPList::Set(), XRDEXP_NOTRW, and XrdOucPList::Next().
Referenced by Configure(), and ConfigXfr().
| int XrdFrmConfig::ConfigMss | ( | ) | [private] |
References MSSCmd, MSSProg, Say, and XrdOucProg::Setup().
Referenced by Configure(), and ConfigXfr().
| int XrdFrmConfig::ConfigMum | ( | XrdFrmConfigSE & | theSE | ) | [private] |
References close, STDERR_FILENO, pipe, fcntl(), F_SETFD, FD_CLOEXEC, XrdFrmConfigSE::myFD, XrdFrmConfigSE::seFD, XrdSysThread::Run(), XrdFrmConfigMum(), and XRDSYSTHREAD_BIND.
Referenced by Configure().
| int XrdFrmConfig::ConfigN2N | ( | void | ) | [private] |
References XrdOucgetName2NameArgs, N2N_Lib, the_N2N, XrdOucgetName2Name(), Say, ConfigFN, LocalRoot, RemoteRoot, lcl_N2N, rmt_N2N, XrdSysPlugin::getPlugin(), and N2N_Parms.
Referenced by Configure(), and ConfigXfr().
| int XrdFrmConfig::ConfigOTO | ( | char * | Parms | ) | [private] |
References index(), XrdOuca2x::a2sp(), Say, cmdFree, XrdOuca2x::a2i(), and cmdHold.
Referenced by Configure().
| int XrdFrmConfig::ConfigPaths | ( | ) | [private] |
References AdminPath, myInst, XrdFrmCns::Init(), myFrmid, haveCMS, cmsPath, Say, XrdNetCmsNotify::isServ, XrdFrcUtils::makePath(), AdminMode, QPath, XrdCms::Config, XrdCmsConfig::AdminPath, and StopPurge.
Referenced by Configure().
| void XrdFrmConfig::ConfigPF | ( | const char * | pFN | ) | [private] |
| int XrdFrmConfig::ConfigProc | ( | void | ) | [private] |
References Say, myInstance, ssID, ssAdmin, CksCfg, ConfigFN, open(), XrdOucStream::Attach(), cFile, XrdOucStream::GetMyFirstWord(), pfxDTS, plnDTS, ConfigXeq(), XrdOucStream::Echo(), XrdOucStream::LastError(), and XrdOucStream::Close().
Referenced by Configure().
| int XrdFrmConfig::Configure | ( | int | argc, |
| char ** | argv, | ||
| int(*)() | ppf | ||
| ) |
References XrdOssGetSS(), XrdOssRunMode, optarg, myProg, vectArg, numcArg, nextArg, vOpts, ConfigFN, XrdCms::Trace, XrdOucTrace::What, TRACE_ALL, XrdOucEnv::Export(), Fix, Usage(), XrdOuca2x::a2sz(), Say, XrdOuca2x::a2ll(), XrdOuca2x::a2i(), myInst, isOTO, ConfigOTO(), Test, Verbose, XrdOuca2x::a2tm(), WaitPurge, optind, ssID, ssAdmin, isAgent, myFrmid, XrdOucUtils::subLogfn(), XrdOucUtils::Undercover(), pipe, myName, XrdSysDNS::getHostName(), XrdOucUtils::InstName(), myInstance, index(), ConfigMum(), XrdBANNER, ConfigProc(), ConfigPaths(), myFrmID, ssPurg, ossFS, ossLib, runNew, runOld, XrdOucUtils::makeHome(), ConfigN2N(), ConfigMss(), ConfigCks(), ConfigMP(), ConfigPF(), ssXfr, ConfigXfr(), XrdSysThread::Run(), XRDSYSTHREAD_BIND, XrdOucUtils::PidFile(), write(), close, STDERR_FILENO, XrdFrmConfigSE::mySem, XrdSysSemaphore::Wait(), XrdFrmConfigSE::Buff, and XrdFrmConfigSE::BLen.
| int XrdFrmConfig::ConfigXeq | ( | char * | var, |
| int | mbok | ||
| ) | [private] |
References xapath(), Grab(), PidPath, haveCMS, xcnsd(), ssID, ssAdmin, xqchk(), xcks(), ossLib, hasCache, xspace(), LocalRoot, xnml(), RemoteRoot, ssXfr, isAgent, xxfr(), xmon(), xcopy(), xcmax(), xitm(), IdleHold, WaitMigr, ssPurg, xdpol(), xpol(), xpolprog(), WaitPurge, cFile, XrdOucStream::noEcho(), Say, and XrdOucStream::Echo().
Referenced by ConfigProc().
| int XrdFrmConfig::ConfigXfr | ( | ) | [private] |
References ConfigN2N(), ConfigMP(), ConfigMss(), xfrCmd, ConfigCmd(), Say, xfrIN, xfrOUT, monStage, and XrdFrmMonitor::Init().
Referenced by Configure().
| int XrdFrmConfig::getTime | ( | const char * | emsg, |
| const char * | item, | ||
| int * | val, | ||
| int | mnv = -1, |
||
| int | mxv = -1 |
||
| ) | [private] |
References XrdOuca2x::a2tm(), and Say.
Referenced by xpol().
| int XrdFrmConfig::Grab | ( | const char * | var, |
| char ** | Dest, | ||
| int | nosubs | ||
| ) | [private] |
References strlcpy(), cFile, XrdOucStream::GetWord(), XrdOucStream::SetEnv(), XrdOucStream::GetRest(), and Say.
Referenced by ConfigXeq(), and xcopy().
| XrdOucTList * XrdFrmConfig::InsertPL | ( | XrdOucTList * | pP, |
| const char * | Path, | ||
| int | Plen, | ||
| int | isRW | ||
| ) | [private] |
References XrdOucTList::next.
Referenced by ConfigMP().
| void XrdFrmConfig::InsertXD | ( | const char * | Path | ) | [private] |
References EPNAME, pathList, XrdFrmConfig::VPInfo::Dir, and DEBUG.
Referenced by ConfigMP().
| int XrdFrmConfig::LocalPath | ( | const char * | oldp, |
| char * | newp, | ||
| int | newpsz | ||
| ) |
References lcl_N2N, XrdOucName2Name::lfn2pfn(), and Say.
Referenced by XrdFrmAdmin::ckAttr(), XrdFrmAdmin::mkFile(), XrdFrmAdmin::mkStat(), and ConfigMP().
| int XrdFrmConfig::LogicalPath | ( | const char * | oldp, |
| char * | newp, | ||
| int | newpsz | ||
| ) |
References lcl_N2N, XrdOucName2Name::pfn2lfn(), and Say.
| unsigned long long XrdFrmConfig::PathOpts | ( | const char * | Lfn | ) |
References XrdOssRPList, and XrdOucPListAnchor::Find().
| int XrdFrmConfig::RemotePath | ( | const char * | oldp, |
| char * | newp, | ||
| int | newpsz | ||
| ) |
References rmt_N2N, XrdOucName2Name::lfn2rfn(), and Say.
| XrdOucTList * XrdFrmConfig::Space | ( | const char * | Name, |
| const char * | Path = 0 |
||
| ) |
| void XrdFrmConfig::Usage | ( | int | rc | ) | [private] |
Referenced by Configure().
| int XrdFrmConfig::xapath | ( | ) | [private] |
References S_IRWXU, cFile, XrdOucStream::GetWord(), Say, AdminPath, S_IRWXG, and AdminMode.
Referenced by ConfigXeq().
| int XrdFrmConfig::xcks | ( | int | isOfs = 0 | ) | [private] |
References CksCfg, XrdCksConfig::ParseLib(), cFile, XrdOucStream::GetWord(), Say, and CksAlg.
Referenced by ConfigXeq().
| int XrdFrmConfig::xcmax | ( | ) | [private] |
References cFile, XrdOucStream::GetWord(), Say, XrdOuca2x::a2i(), and xfrMax.
Referenced by ConfigXeq().
| int XrdFrmConfig::xcnsd | ( | ) | [private] |
References cFile, XrdOucStream::GetWord(), Say, and XrdFrmCns::Init().
Referenced by ConfigXeq().
| int XrdFrmConfig::xcopy | ( | ) | [private] |
References cFile, XrdOucStream::GetWord(), Say, Grab(), xfrCmd, XrdFrmConfig::Cmd::theCmd, XrdFrmConfig::Cmd::Opts, cmdStats, cmdMDP, cmdAlloc, and XrdFrmConfig::Cmd::TLimit.
Referenced by ConfigXeq().
| int XrdFrmConfig::xcopy | ( | int & | TLim | ) | [private] |
References cFile, XrdOucStream::GetWord(), Say, and XrdOuca2x::a2tm().
| int XrdFrmConfig::xdpol | ( | ) | [private] |
References cFile, XrdOucStream::GetWord(), Say, XrdOuca2x::a2tm(), and dirHold.
Referenced by ConfigXeq().
| int XrdFrmConfig::xitm | ( | const char * | What, |
| int & | tDest | ||
| ) | [private] |
References cFile, XrdOucStream::GetWord(), Say, and XrdOuca2x::a2tm().
Referenced by ConfigXeq().
| int XrdFrmConfig::xmon | ( | ) | [private] |
References cFile, XrdOucStream::GetWord(), Say, XrdOuca2x::a2tm(), XrdOuca2x::a2sz(), XROOTD_MON_STAGE, index(), monStage, and XrdFrmMonitor::Defaults().
Referenced by ConfigXeq().
| int XrdFrmConfig::xnml | ( | ) | [private] |
References cFile, XrdOucStream::GetWord(), Say, N2N_Lib, XrdOucStream::GetRest(), and N2N_Parms.
Referenced by ConfigXeq().
| int XrdFrmConfig::xpol | ( | ) | [private] |
References dfltPolicy, XrdFrmConfig::Policy::minFree, XrdFrmConfig::Policy::maxFree, XrdFrmConfig::Policy::Hold, cFile, XrdOucStream::GetWord(), Say, xpolprog(), XrdOuca2x::a2sp(), XRDABS, getTime(), XrdOuca2x::a2i(), pProg, XrdFrmConfig::Policy::Sname, XrdFrmConfig::Policy::Next, and XrdFrmConfig::Policy::Ext.
Referenced by ConfigXeq().
| int XrdFrmConfig::xpolprog | ( | ) | [private] |
| int XrdFrmConfig::xqchk | ( | ) | [private] |
References cFile, XrdOucStream::GetWord(), Say, XrdOuca2x::a2tm(), WaitQChk, and QPath.
Referenced by ConfigXeq().
| int XrdFrmConfig::xspace | ( | int | isPrg = 0, |
| int | isXA = 1 |
||
| ) | [private] |
References stat(), cFile, XrdOucStream::GetWord(), Say, xspaceBuild(), opendir(), readdir(), and closedir().
Referenced by ConfigXeq().
| void XrdFrmConfig::xspaceBuild | ( | char * | grp, |
| char * | fn, | ||
| int | isxa | ||
| ) | [private] |
References VPList, XrdFrmConfig::VPInfo::Name, XrdFrmConfig::VPInfo::Next, XrdFrmConfig::VPInfo::Dir, XrdOucTList::text, XrdOucTList::next, and nonXA.
Referenced by xspace().
| int XrdFrmConfig::xxfr | ( | ) | [private] |
References cFile, XrdOucStream::GetWord(), XrdOuca2x::a2tm(), Say, and FailHold.
Referenced by ConfigXeq().
Referenced by XrdFrmConfig(), ConfigPaths(), and xapath().
| char* XrdFrmConfig::AdminPath |
Referenced by XrdFrmConfig(), ConfigPaths(), and xapath().
XrdOucStream* XrdFrmConfig::cFile [private] |
| char* XrdFrmConfig::CksAlg |
Referenced by XrdFrmConfig(), ConfigCks(), and xcks().
Referenced by XrdFrmConfig(), ConfigCks(), ConfigProc(), and xcks().
Referenced by XrdFrmConfig(), and ConfigCks().
const int XrdFrmConfig::cmdAlloc = 0x0001 [static] |
Referenced by xcopy().
| long long XrdFrmConfig::cmdFree |
Referenced by XrdFrmConfig(), and ConfigOTO().
Referenced by XrdFrmConfig(), and ConfigOTO().
const int XrdFrmConfig::cmdMDP = 0x0002 [static] |
Referenced by xcopy().
const int XrdFrmConfig::cmdStats = 0x0004 [static] |
Referenced by xcopy().
Referenced by XrdFrmConfig(), and ConfigPaths().
char* XrdFrmConfig::ConfigFN [private] |
Referenced by XrdFrmConfig(), Configure(), ConfigN2N(), and ConfigProc().
Referenced by xpol().
Referenced by XrdFrmConfig(), and xdpol().
Referenced by XrdFrmConfig(), and xxfr().
Referenced by XrdFrmConfig(), and Configure().
Referenced by ConfigXeq().
Referenced by XrdFrmConfig(), ConfigPaths(), and ConfigXeq().
Referenced by XrdFrmConfig(), and ConfigXeq().
Referenced by XrdFrmConfig(), Configure(), and ConfigXeq().
Referenced by XrdFrmConfig(), and Configure().
XrdOucName2Name* XrdFrmConfig::lcl_N2N [private] |
Referenced by XrdFrmConfig(), LocalPath(), LogicalPath(), and ConfigN2N().
char* XrdFrmConfig::LocalRoot [private] |
Referenced by XrdFrmConfig(), ConfigN2N(), and ConfigXeq().
| const char* XrdFrmConfig::lockFN |
Referenced by XrdFrmAdmin::mkFile(), and XrdFrmConfig().
Referenced by XrdFrmConfig(), ConfigXfr(), and xmon().
| char* XrdFrmConfig::MSSCmd |
Referenced by XrdFrmConfig(), and ConfigMss().
Referenced by ConfigMss().
| const char* XrdFrmConfig::myFrmid |
Referenced by XrdFrmConfig(), Configure(), and ConfigPaths().
| const char* XrdFrmConfig::myFrmID |
Referenced by XrdFrmConfig(), and Configure().
| gid_t XrdFrmConfig::myGid |
Referenced by XrdFrmConfig().
| const char* XrdFrmConfig::myInst |
Referenced by XrdFrmConfig(), Configure(), ConfigPaths(), and ConfigPF().
| char* XrdFrmConfig::myInstance |
Referenced by Configure(), and ConfigProc().
| const char* XrdFrmConfig::myName |
Referenced by Configure().
| const char* XrdFrmConfig::myProg |
Referenced by Configure(), and Usage().
| uid_t XrdFrmConfig::myUid |
Referenced by XrdFrmConfig().
char* XrdFrmConfig::N2N_Lib [private] |
Referenced by XrdFrmConfig(), ConfigN2N(), and xnml().
char* XrdFrmConfig::N2N_Parms [private] |
Referenced by XrdFrmConfig(), ConfigN2N(), and xnml().
Referenced by Configure(), and ConfigMP().
Referenced by XrdFrmConfig(), and xspaceBuild().
Referenced by Configure(), and ConfigMP().
Referenced by Configure().
char* XrdFrmConfig::ossLib [private] |
Referenced by XrdFrmConfig(), Configure(), and ConfigXeq().
Referenced by XrdFrmConfig(), ConfigMP(), and InsertXD().
const char* XrdFrmConfig::pfxDTS [private] |
Referenced by XrdFrmConfig(), and ConfigProc().
| char* XrdFrmConfig::PidPath |
Referenced by ConfigPF(), and ConfigXeq().
int XrdFrmConfig::plnDTS [private] |
Referenced by XrdFrmConfig(), and ConfigProc().
| char* XrdFrmConfig::pProg |
Referenced by XrdFrmConfig(), xpol(), and xpolprog().
| char XrdFrmConfig::pVec[pVecMax] |
Referenced by xpolprog().
const int XrdFrmConfig::pVecMax = 8 [static] |
Referenced by xpolprog().
Referenced by XrdFrmConfig(), and xpolprog().
| char* XrdFrmConfig::QPath |
Referenced by XrdFrmConfig(), ConfigPaths(), and xqchk().
char* XrdFrmConfig::RemoteRoot [private] |
Referenced by XrdFrmConfig(), ConfigN2N(), and ConfigXeq().
XrdOucName2Name* XrdFrmConfig::rmt_N2N [private] |
Referenced by XrdFrmConfig(), RemotePath(), and ConfigN2N().
Referenced by XrdFrmConfig(), and Configure().
Referenced by XrdFrmConfig(), and Configure().
Referenced by XrdFrmConfig(), and ConfigMP().
SubSys XrdFrmConfig::ssID [private] |
Referenced by XrdFrmConfig(), Configure(), ConfigProc(), and ConfigXeq().
| char* XrdFrmConfig::StopPurge |
Referenced by ConfigPaths().
Referenced by XrdFrmConfig(), and Configure().
Referenced by XrdFrmConfig(), and ConfigN2N().
const char* XrdFrmConfig::uInfo [private] |
Referenced by XrdFrmConfig(), and Usage().
| char** XrdFrmConfig::vectArg |
Referenced by Configure(), and ConfigMP().
Referenced by XrdFrmConfig(), and Configure().
const char* XrdFrmConfig::vOpts [private] |
Referenced by XrdFrmConfig(), and Configure().
| struct XrdFrmConfig::VPInfo * XrdFrmConfig::VPList |
Referenced by Space(), ConfigMP(), and xspaceBuild().
Referenced by XrdFrmConfig(), and ConfigXeq().
Referenced by XrdFrmConfig(), Configure(), and ConfigXeq().
Referenced by XrdFrmConfig(), and xqchk().
| struct XrdFrmConfig::Cmd XrdFrmConfig::xfrCmd[4] |
Referenced by XrdFrmConfig(), ConfigXfr(), and xcopy().
Referenced by XrdFrmConfig(), and ConfigXfr().
Referenced by XrdFrmConfig(), and xcmax().
Referenced by XrdFrmConfig(), and ConfigXfr().
1.7.5