diff options
author | Roland Reichwein <mail@reichwein.it> | 2020-04-30 12:25:29 +0200 |
---|---|---|
committer | Roland Reichwein <mail@reichwein.it> | 2020-04-30 12:25:29 +0200 |
commit | 292235b5c5ae25139d5945c2a298e13272a4f29b (patch) | |
tree | 40aeaa4fd3217e900787c9bd861aaf0f2f0d9319 /response.cpp | |
parent | 851f4d84d4b8dcff032f5304235917bc58e1e46e (diff) |
Uptime in stats
Diffstat (limited to 'response.cpp')
-rw-r--r-- | response.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/response.cpp b/response.cpp index 9eda5ff..1752466 100644 --- a/response.cpp +++ b/response.cpp @@ -3,6 +3,7 @@ #include "auth.h" #include "base64.h" #include "file.h" +#include "os.h" #include <boost/algorithm/string/predicate.hpp> @@ -85,6 +86,8 @@ std::unordered_map<std::string, std::function<std::string(Server&)>> GetServerPa {"port", [](Server& server) { return server.GetSocket().port; }}, {"statistics", [](Server& server) { return server.GetStatistics().getValues(); }}, {"version", [](Server& server) { return Server::VersionString; }}, + {"uptime_host", [](Server& server) { return OS::uptime_host(); }}, + {"uptime_webserver", [](Server& server) { return OS::uptime_process(); }}, }; std::string GetServerParam(const std::string& key, Server& server) |