Kea 2.7.6
|
The following methods are used to handle commands:
|
static |
Handles statistic-get-all command.
This method handles statistic-get-all command, which returns values of all statistics. Params parameter is ignored.
name | name of the command (ignored, should be "statistic-get-all") |
params | ignored |
Definition at line 434 of file lib/stats/stats_mgr.cc.
References isc::config::CONTROL_RESULT_SUCCESS, isc::config::createAnswer(), isc::stats::StatsMgr::getAll(), and isc::stats::StatsMgr::instance().
Referenced by isc::dhcp::ControlledDhcpv4Srv::ControlledDhcpv4Srv(), isc::dhcp::ControlledDhcpv6Srv::ControlledDhcpv6Srv(), and isc::d2::D2Controller::registerCommands().
|
static |
Handles statistic-get command.
This method handles statistic-get command, which returns value of a given statistic). It expects one parameter stored in params map: name: name of the statistic
Example params structure: { "name": "packets-received" }
name | name of the command (ignored, should be "statistic-get") |
params | structure containing a map that contains "name" |
Definition at line 381 of file lib/stats/stats_mgr.cc.
References isc::config::CONTROL_RESULT_ERROR, isc::config::CONTROL_RESULT_SUCCESS, isc::config::createAnswer(), isc::stats::StatsMgr::get(), and isc::stats::StatsMgr::instance().
Referenced by isc::dhcp::ControlledDhcpv4Srv::ControlledDhcpv4Srv(), isc::dhcp::ControlledDhcpv6Srv::ControlledDhcpv6Srv(), and isc::d2::D2Controller::registerCommands().
|
static |
Handles statistic-remove-all command.
This method handles statistic-remove-all command, which removes all statistics. Params parameter is ignored.
name | name of the command (ignored, should be "statistic-remove-all") |
params | ignored |
Definition at line 425 of file lib/stats/stats_mgr.cc.
References isc::config::CONTROL_RESULT_SUCCESS, isc::config::createAnswer(), isc::stats::StatsMgr::instance(), and isc::stats::StatsMgr::removeAll().
Referenced by isc::dhcp::ControlledDhcpv4Srv::ControlledDhcpv4Srv(), and isc::dhcp::ControlledDhcpv6Srv::ControlledDhcpv6Srv().
|
static |
Handles statistic-remove command.
This method handles statistic-reset command, which removes a given statistic completely. It expects one parameter stored in params map: name: name of the statistic
Example params structure: { "name": "packets-received" }
name | name of the command (ignored, should be "statistic-remove") |
params | structure containing a map that contains "name" element |
Definition at line 408 of file lib/stats/stats_mgr.cc.
References isc::config::CONTROL_RESULT_ERROR, isc::config::CONTROL_RESULT_SUCCESS, isc::config::createAnswer(), isc::stats::StatsMgr::del(), and isc::stats::StatsMgr::instance().
Referenced by isc::dhcp::ControlledDhcpv4Srv::ControlledDhcpv4Srv(), and isc::dhcp::ControlledDhcpv6Srv::ControlledDhcpv6Srv().
|
static |
Handles statistic-reset-all command.
This method handles statistic-reset-all command, which sets values of all statistics back to zero. Params parameter is ignored.
name | name of the command (ignored, should be "statistic-reset-all") |
params | ignored |
Definition at line 441 of file lib/stats/stats_mgr.cc.
References isc::config::CONTROL_RESULT_SUCCESS, isc::config::createAnswer(), isc::stats::StatsMgr::instance(), and isc::stats::StatsMgr::resetAll().
Referenced by isc::dhcp::ControlledDhcpv4Srv::ControlledDhcpv4Srv(), isc::dhcp::ControlledDhcpv6Srv::ControlledDhcpv6Srv(), and isc::d2::D2Controller::registerCommands().
|
static |
Handles statistic-reset command.
This method handles statistic-reset command, which resets value of a given statistic. It expects one parameter stored in params map: name: name of the statistic
Example params structure: { "name": "packets-received" }
name | name of the command (ignored, should be "statistic-reset") |
params | structure containing a map that contains "name" |
Definition at line 392 of file lib/stats/stats_mgr.cc.
References isc::config::CONTROL_RESULT_ERROR, isc::config::CONTROL_RESULT_SUCCESS, isc::config::createAnswer(), isc::stats::StatsMgr::instance(), and isc::stats::StatsMgr::reset().
Referenced by isc::dhcp::ControlledDhcpv4Srv::ControlledDhcpv4Srv(), isc::dhcp::ControlledDhcpv6Srv::ControlledDhcpv6Srv(), and isc::d2::D2Controller::registerCommands().
ConstElementPtr isc::stats::StatsMgr::statisticSetMaxSampleAgeAllHandler | ( | const isc::data::ConstElementPtr & | params | ) |
Handles statistic-sample-age-set-all command.
This method handles statistic-sample-age-set-all command, which sets max_sample_age_ limit to all statistics and the default. It expects one parameter stored in params map: duration: limit expressed as a number of seconds
Example params structure: { "duration": 1245 }
params | structure containing a map that contains "duration" |
Definition at line 449 of file lib/stats/stats_mgr.cc.
References isc::config::CONTROL_RESULT_ERROR, isc::config::CONTROL_RESULT_SUCCESS, isc::config::createAnswer(), and isc::stats::StatsMgr::instance().
|
static |
Handles statistic-sample-age-set command.
This method handles statistic-sample-age-set command, which sets max_sample_age_ limit of a given statistic and leaves max_sample_count_ disabled. It expects two parameters stored in params map: name: name of the statistic duration: time limit expressed as a number of seconds
Example params structure: { "name": "packets-received", "duration": 1245 }
name | name of the command (ignored, should be "statistic-sample-age-set") |
params | structure containing a map that contains "name" and "duration" |
Definition at line 341 of file lib/stats/stats_mgr.cc.
References isc::config::CONTROL_RESULT_ERROR, isc::config::CONTROL_RESULT_SUCCESS, isc::config::createAnswer(), isc::stats::StatsMgr::instance(), and isc::stats::StatsMgr::setMaxSampleAge().
Referenced by isc::dhcp::ControlledDhcpv4Srv::ControlledDhcpv4Srv(), and isc::dhcp::ControlledDhcpv6Srv::ControlledDhcpv6Srv().
ConstElementPtr isc::stats::StatsMgr::statisticSetMaxSampleCountAllHandler | ( | const isc::data::ConstElementPtr & | params | ) |
Handles statistic-sample-count-set-all command.
This method handles statistic-sample-count-set-all command, which sets max_sample_count_ limit of all statistics and the default. It expects one parameter stored in params map: max-samples: count limit The value 0 is out of range.
Example params structure: { "max-samples": 15 }
params | structure containing a map that contains "max-samples" |
Definition at line 464 of file lib/stats/stats_mgr.cc.
References isc::config::CONTROL_RESULT_ERROR, isc::config::CONTROL_RESULT_SUCCESS, isc::config::createAnswer(), and isc::stats::StatsMgr::instance().
|
static |
Handles statistic-sample-count-set command.
This method handles statistic-sample-count-set command, which sets max_sample_count_ limit of a given statistic and leaves max_sample_age_ disabled. It expects two parameters stored in params map: name: name of the statistic max-samples: count limit
Example params structure: { "name": "packets-received", "max-samples": 15 }
name | name of the command (ignored, should be "statistic-sample-count-set") |
params | structure containing a map that contains "name" and "max-samples" |
Definition at line 361 of file lib/stats/stats_mgr.cc.
References isc::config::CONTROL_RESULT_ERROR, isc::config::CONTROL_RESULT_SUCCESS, isc::config::createAnswer(), isc::stats::StatsMgr::instance(), and isc::stats::StatsMgr::setMaxSampleCount().
Referenced by isc::dhcp::ControlledDhcpv4Srv::ControlledDhcpv4Srv(), and isc::dhcp::ControlledDhcpv6Srv::ControlledDhcpv6Srv().