TS-3231: add the proxy.node.config.reconfigure_time metric
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/acaedefb Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/acaedefb Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/acaedefb Branch: refs/heads/master Commit: acaedefb41277dade3a01862b2cf0a6bf0916919 Parents: 0633f4d Author: James Peach <[email protected]> Authored: Mon Nov 17 10:04:50 2014 -0800 Committer: James Peach <[email protected]> Committed: Tue Dec 9 13:48:24 2014 -0800 ---------------------------------------------------------------------- cmd/traffic_manager/traffic_manager.cc | 2 ++ doc/reference/commands/traffic_line.en.rst | 4 ++++ mgmt/LocalManager.cc | 6 ------ mgmt/LocalManager.h | 1 - mgmt/api/CoreAPI.cc | 1 + 5 files changed, 7 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/acaedefb/cmd/traffic_manager/traffic_manager.cc ---------------------------------------------------------------------- diff --git a/cmd/traffic_manager/traffic_manager.cc b/cmd/traffic_manager/traffic_manager.cc index cfcb44d..9c35bad 100644 --- a/cmd/traffic_manager/traffic_manager.cc +++ b/cmd/traffic_manager/traffic_manager.cc @@ -685,6 +685,8 @@ main(int argc, char **argv) statProcessor = new StatProcessor(configFiles); + RecRegisterStatInt(RECT_NODE, "proxy.node.config.reconfigure_time", time(NULL), RECP_NON_PERSISTENT); + for (;;) { lmgmt->processEventQueue(); lmgmt->pollMgmtProcessServer(); http://git-wip-us.apache.org/repos/asf/trafficserver/blob/acaedefb/doc/reference/commands/traffic_line.en.rst ---------------------------------------------------------------------- diff --git a/doc/reference/commands/traffic_line.en.rst b/doc/reference/commands/traffic_line.en.rst index 2b6791e..f0bbd0a 100644 --- a/doc/reference/commands/traffic_line.en.rst +++ b/doc/reference/commands/traffic_line.en.rst @@ -110,6 +110,10 @@ Options command to update the running configuration after any configuration file modification. + The timestamp of the last reconfiguration event (in seconds + since epoch) is published in the `proxy.node.config.reconfigure_time` + metric. + .. option:: -Z, --zero_cluster Reset performance statistics to zero across the cluster. http://git-wip-us.apache.org/repos/asf/trafficserver/blob/acaedefb/mgmt/LocalManager.cc ---------------------------------------------------------------------- diff --git a/mgmt/LocalManager.cc b/mgmt/LocalManager.cc index 92b7890..4fbbc2b 100644 --- a/mgmt/LocalManager.cc +++ b/mgmt/LocalManager.cc @@ -38,12 +38,6 @@ #include <sys/capability.h> #endif -bool -LocalManager::SetForDup(void * /* hIOCPort ATS_UNUSED */, long /* lTProcId ATS_UNUSED */, void * /* hTh ATS_UNUSED */) -{ - return true; -} - void LocalManager::mgmtCleanup() { http://git-wip-us.apache.org/repos/asf/trafficserver/blob/acaedefb/mgmt/LocalManager.h ---------------------------------------------------------------------- diff --git a/mgmt/LocalManager.h b/mgmt/LocalManager.h index a001646..aaf6cad 100644 --- a/mgmt/LocalManager.h +++ b/mgmt/LocalManager.h @@ -81,7 +81,6 @@ public: bool processRunning(); bool clusterOk(); - bool SetForDup(void *hIOCPort, long lTProcId, void *hTh); void tick() { http://git-wip-us.apache.org/repos/asf/trafficserver/blob/acaedefb/mgmt/api/CoreAPI.cc ---------------------------------------------------------------------- diff --git a/mgmt/api/CoreAPI.cc b/mgmt/api/CoreAPI.cc index 5b61f3a..fe11cfc 100644 --- a/mgmt/api/CoreAPI.cc +++ b/mgmt/api/CoreAPI.cc @@ -412,6 +412,7 @@ Reconfigure() { configFiles->rereadConfig(); // TM rereads lmgmt->signalEvent(MGMT_EVENT_PLUGIN_CONFIG_UPDATE, "*"); // TS rereads + RecSetRecordInt("proxy.node.config.reconfigure_time", time(NULL)); return TS_ERR_OKAY; }
