[collectd] [PATCH] src/memory.c: libstatgrab's variable is "cache", not "cached"

Michael Stapelberg michael at stapelberg.de
Sat Aug 9 14:46:57 CEST 2008


Hi,

At least in libstatgrab 0.16, the variable cached doesn't exist, it's cache.
Patch attached.

Best regards,
Michael
-------------- next part --------------
From e208be1218976cfc48480b4e7f918fdc226ba93b Mon Sep 17 00:00:00 2001
From: Michael Stapelberg <michael+git at stapelberg.de>
Date: Sat, 9 Aug 2008 14:42:24 +0200
Subject: [PATCH] The variable is named cache, not cached, at least on libstatgrab >= 0.16

---
 src/memory.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/memory.c b/src/memory.c
index c1564c8..c31b30e 100644
--- a/src/memory.c
+++ b/src/memory.c
@@ -319,7 +319,7 @@ static int memory_read (void)
 	if ((ios = sg_get_mem_stats ()) != NULL)
 	{
 		memory_submit ("used",   ios->used);
-		memory_submit ("cached", ios->cached);
+		memory_submit ("cached", ios->cache);
 		memory_submit ("free",   ios->free);
 	}
 #endif /* HAVE_LIBSTATGRAB */
-- 
1.5.2.4

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mailman.verplant.org/pipermail/collectd/attachments/20080809/8ff99586/attachment.pgp 


More information about the collectd mailing list