From 89551ddfc2879530981eba3db9ab857b88409ad8 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Sat, 20 Sep 2008 11:59:36 +0200 Subject: Lese /proc/loadavg f?r weitere Statusinformationen aus --- src/Common/SystemBackend.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/Common/SystemBackend.h') 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 +#include #include 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(); } -- cgit v1.2.3