summaryrefslogtreecommitdiffhomepage
path: root/response.cpp
diff options
context:
space:
mode:
authorRoland Reichwein <mail@reichwein.it>2020-04-30 12:25:29 +0200
committerRoland Reichwein <mail@reichwein.it>2020-04-30 12:25:29 +0200
commit292235b5c5ae25139d5945c2a298e13272a4f29b (patch)
tree40aeaa4fd3217e900787c9bd861aaf0f2f0d9319 /response.cpp
parent851f4d84d4b8dcff032f5304235917bc58e1e46e (diff)
Uptime in stats
Diffstat (limited to 'response.cpp')
-rw-r--r--response.cpp3
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)