#include <XrdThrottleConfig.hh>
Definition at line 37 of file XrdThrottleConfig.hh.
◆ Configuration()
◆ Configure()
| int Configuration::Configure |
( |
const std::string & | config_file | ) |
|
Definition at line 41 of file XrdThrottleConfig.cc.
42{
43 XrdOucEnv myEnv;
44 XrdOucStream
Config(&m_log, getenv(
"XRDINSTANCE"), &myEnv,
"(Throttle Config)> ");
45 int cfgFD;
46 if (config_file.empty()) {
47 m_log.Say("No filename specified.");
48 return 1;
49 }
50 if ((cfgFD =
open(config_file.c_str(), O_RDONLY)) < 0) {
51 m_log.Emsg("Config", errno, "Unable to open configuration file", config_file.c_str());
52 return 1;
53 }
55 static const char *cvec[] = { "*** throttle (ofs) plugin config:", 0 };
57
58 char *var, *val;
59 int NoGo = 0;
60 while( (var =
Config.GetMyFirstWord()) )
61 {
62 if (!strcmp("throttle.fslib", var)) {
64 if (!val || !val[0]) {m_log.Emsg("Config", "fslib not specified."); continue;}
65 m_fslib = val;
66 }
67 TS_Xeq(
"throttle.max_open_files", xmaxopen);
68 TS_Xeq(
"throttle.max_active_connections", xmaxconn);
69 TS_Xeq(
"throttle.throttle", xthrottle);
70 TS_Xeq(
"throttle.loadshed", xloadshed);
71 TS_Xeq(
"throttle.max_wait_time", xmaxwait);
72 TS_Xeq(
"throttle.trace", xtrace);
73 if (NoGo)
74 {
75 m_log.Emsg("Config", "Throttle configuration failed.");
76 return 1;
77 }
78 }
79 return 0;
80}
References open, and TS_Xeq.
◆ GetFileSystemLibrary()
| const std::string & XrdThrottle::Configuration::GetFileSystemLibrary |
( |
| ) |
const |
|
inline |
◆ GetLoadshedFreq()
| long long XrdThrottle::Configuration::GetLoadshedFreq |
( |
| ) |
const |
|
inline |
◆ GetLoadshedHost()
| const std::string & XrdThrottle::Configuration::GetLoadshedHost |
( |
| ) |
const |
|
inline |
◆ GetLoadshedPort()
| long long XrdThrottle::Configuration::GetLoadshedPort |
( |
| ) |
const |
|
inline |
◆ GetMaxConn()
| long long XrdThrottle::Configuration::GetMaxConn |
( |
| ) |
const |
|
inline |
◆ GetMaxOpen()
| long long XrdThrottle::Configuration::GetMaxOpen |
( |
| ) |
const |
|
inline |
◆ GetMaxWait()
| long long XrdThrottle::Configuration::GetMaxWait |
( |
| ) |
const |
|
inline |
◆ GetThrottleConcurrency()
| long long XrdThrottle::Configuration::GetThrottleConcurrency |
( |
| ) |
const |
|
inline |
◆ GetThrottleDataRate()
| long long XrdThrottle::Configuration::GetThrottleDataRate |
( |
| ) |
const |
|
inline |
◆ GetThrottleIOPSRate()
| long long XrdThrottle::Configuration::GetThrottleIOPSRate |
( |
| ) |
const |
|
inline |
◆ GetThrottleRecomputeIntervalMS()
| long long XrdThrottle::Configuration::GetThrottleRecomputeIntervalMS |
( |
| ) |
const |
|
inline |
◆ GetTraceLevels()
| int XrdThrottle::Configuration::GetTraceLevels |
( |
| ) |
const |
|
inline |
The documentation for this class was generated from the following files: