summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index 41b300f..70cf579 100644
--- a/src/main.c
+++ b/src/main.c
@@ -22,6 +22,7 @@
#include "meminfo.h"
#include "netinfo.h"
#include "cpuinfo.h"
+#include "diskinfo.h"
#include "proc.h"
int main(int argc, char* argv[]) {
@@ -52,6 +53,12 @@ int main(int argc, char* argv[]) {
// Store number of processors to make load values more useful
status.nprocs = get_nprocs();
+ // Store disk io metrics
+ char* diskdev = "sda";
+ if(getenv("CMON_DISKDEV") != NULL)
+ diskdev = getenv("CMON_DISKDEV");
+ disk_io_kb(diskdev, &status.diskreadkb, &status.diskwritekb);
+
// Store number of processors to make load values more useful
char* netdev = "wlan0";
if(getenv("CMON_NETDEV") != NULL)

Generated by cgit