summaryrefslogtreecommitdiffstats
path: root/src/Common/SystemBackend.h
diff options
context:
space:
mode:
authorMatthias Schiffer <matthias@gamezock.de>2008-09-20 11:59:36 +0200
committerMatthias Schiffer <matthias@gamezock.de>2008-09-20 11:59:36 +0200
commit89551ddfc2879530981eba3db9ab857b88409ad8 (patch)
treeb0fa2c3d84201a3bce8d46c002a2e506a95f1c24 /src/Common/SystemBackend.h
parent5286ffcb30e3005569199c45bca38dfbf346cec3 (diff)
downloadmad-89551ddfc2879530981eba3db9ab857b88409ad8.tar
mad-89551ddfc2879530981eba3db9ab857b88409ad8.zip
Lese /proc/loadavg f?r weitere Statusinformationen aus
Diffstat (limited to 'src/Common/SystemBackend.h')
-rw-r--r--src/Common/SystemBackend.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/Common/SystemBackend.h b/src/Common/SystemBackend.h
index 9157e07..8ba1e7d 100644
--- a/src/Common/SystemBackend.h
+++ b/src/Common/SystemBackend.h
@@ -21,6 +21,7 @@
#define MAD_COMMON_SYSTEMBACKEND_H_
#include <stdint.h>
+#include <string>
#include <memory>
namespace Mad {
@@ -50,6 +51,14 @@ class SystemBackend {
unsigned long freeSwap;
};
+ struct LoadInfo {
+ unsigned long currentLoad;
+ unsigned long nProcesses;
+ float loadAvg1;
+ float loadAvg5;
+ float loadAvg15;
+ };
+
virtual ~SystemBackend() {}
virtual UptimeInfo getUptimeInfo() {
@@ -62,6 +71,11 @@ class SystemBackend {
return ret;
}
+ virtual LoadInfo getLoadInfo() {
+ LoadInfo ret = {0, 0, 0, 0, 0};
+ return ret;
+ }
+
static SystemBackend *getBackend() {
return backend.get();
}