#include <XrdThrottleConfig.hh>
Definition at line 13 of file XrdThrottleConfig.hh.
◆ Configuration()
◆ Configure()
| int Configuration::Configure |
( |
const std::string & | config_file | ) |
|
Definition at line 17 of file XrdThrottleConfig.cc.
18{
19 XrdOucEnv myEnv;
20 XrdOucStream
Config(&m_log, getenv(
"XRDINSTANCE"), &myEnv,
"(Throttle Config)> ");
21 int cfgFD;
22 if (config_file.empty()) {
23 m_log.Say("No filename specified.");
24 return 1;
25 }
26 if ((cfgFD =
open(config_file.c_str(), O_RDONLY)) < 0) {
27 m_log.Emsg("Config", errno, "Unable to open configuration file", config_file.c_str());
28 return 1;
29 }
31 static const char *cvec[] = { "*** throttle (ofs) plugin config:", 0 };
33
34 char *var, *val;
35 int NoGo = 0;
36 while( (var =
Config.GetMyFirstWord()) )
37 {
38 if (!strcmp("throttle.fslib", var)) {
40 if (!val || !val[0]) {m_log.Emsg("Config", "fslib not specified."); continue;}
41 m_fslib = val;
42 }
43 TS_Xeq(
"throttle.max_open_files", xmaxopen);
44 TS_Xeq(
"throttle.max_active_connections", xmaxconn);
45 TS_Xeq(
"throttle.throttle", xthrottle);
46 TS_Xeq(
"throttle.loadshed", xloadshed);
47 TS_Xeq(
"throttle.max_wait_time", xmaxwait);
48 TS_Xeq(
"throttle.trace", xtrace);
49 if (NoGo)
50 {
51 m_log.Emsg("Config", "Throttle configuration failed.");
52 return 1;
53 }
54 }
55 return 0;
56}
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: