summaryrefslogtreecommitdiffstats
path: root/src/Core
diff options
context:
space:
mode:
authorMatthias Schiffer <matthias@gamezock.de>2008-09-12 00:40:06 +0200
committerMatthias Schiffer <matthias@gamezock.de>2008-09-12 00:40:06 +0200
commitb0ca04e1baf9a3405bfb50d7c3d95e8e425f4c3e (patch)
treeadf91aa4677d508ffe3ad1a6500ec03e8bc8c11e /src/Core
parent668437afdfb8d8a6bdaaaba6225177295e49982a (diff)
downloadmad-b0ca04e1baf9a3405bfb50d7c3d95e8e425f4c3e.tar
mad-b0ca04e1baf9a3405bfb50d7c3d95e8e425f4c3e.zip
Serverstatus zeigt die Speicherauslastung an
Diffstat (limited to 'src/Core')
-rw-r--r--src/Core/Makefile.in2
-rw-r--r--src/Core/RequestHandler/CoreStatusRequestHandler.h8
-rw-r--r--src/Core/RequestHandler/Makefile.in2
3 files changed, 10 insertions, 2 deletions
diff --git a/src/Core/Makefile.in b/src/Core/Makefile.in
index 3590c7f..98a97e0 100644
--- a/src/Core/Makefile.in
+++ b/src/Core/Makefile.in
@@ -129,6 +129,8 @@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PCRECPP_CFLAGS = @PCRECPP_CFLAGS@
+PCRECPP_LIBS = @PCRECPP_LIBS@
PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
SED = @SED@
diff --git a/src/Core/RequestHandler/CoreStatusRequestHandler.h b/src/Core/RequestHandler/CoreStatusRequestHandler.h
index eec0154..ec94bb5 100644
--- a/src/Core/RequestHandler/CoreStatusRequestHandler.h
+++ b/src/Core/RequestHandler/CoreStatusRequestHandler.h
@@ -44,9 +44,13 @@ class CoreStatusRequestHandler : public Common::RequestHandler {
if(packet.getType() != Net::Packet::TYPE_CORE_STATUS)
return false; // TODO Logging
- Common::SystemBackend::Uptime uptime = Common::SystemBackend::getBackend()->getUptime();
+ // TODO Require authentication
- if(!connection->send(Net::Packets::CoreStatusPacket(Net::Packet::TYPE_OK, packet.getRequestId(), uptime.uptime, uptime.idleTime)))
+ Common::SystemBackend::UptimeInfo uptimeInfo = Common::SystemBackend::getBackend()->getUptimeInfo();
+ Common::SystemBackend::MemoryInfo memInfo = Common::SystemBackend::getBackend()->getMemoryInfo();
+
+ if(!connection->send(Net::Packets::CoreStatusPacket(Net::Packet::TYPE_OK, packet.getRequestId(), uptimeInfo.uptime, uptimeInfo.idleTime,
+ memInfo.totalMem, memInfo.freeMem, memInfo.totalSwap, memInfo.freeSwap)))
return false;
setFinished();
diff --git a/src/Core/RequestHandler/Makefile.in b/src/Core/RequestHandler/Makefile.in
index bea3870..2d1cbee 100644
--- a/src/Core/RequestHandler/Makefile.in
+++ b/src/Core/RequestHandler/Makefile.in
@@ -102,6 +102,8 @@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PCRECPP_CFLAGS = @PCRECPP_CFLAGS@
+PCRECPP_LIBS = @PCRECPP_LIBS@
PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
SED = @SED@