X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fswap.c;h=b7fc7ed00091eddb9f4625e52b148ecf7aa0ed00;hb=fea7eeb543d7bbdb4bbc95dffc9f69154da6f15d;hp=9667b583859b55ed7ed3c2e73e5119b8b8ea6162;hpb=9ac8dcf06e686456ed893acedf5f0ba68e3e3c97;p=collectd.git diff --git a/src/swap.c b/src/swap.c index 9667b583..b7fc7ed0 100644 --- a/src/swap.c +++ b/src/swap.c @@ -1,6 +1,6 @@ /** * collectd - src/swap.c - * Copyright (C) 2005 Florian octo Forster + * Copyright (C) 2005,2006 Florian octo Forster * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -44,10 +44,10 @@ static char *swap_file = "swap.rrd"; /* 1099511627776 == 1TB ought to be enough for anyone ;) */ static char *ds_def[] = { - "DS:used:GAUGE:25:0:1099511627776", - "DS:free:GAUGE:25:0:1099511627776", - "DS:cached:GAUGE:25:0:1099511627776", - "DS:resv:GAUGE:25:0:1099511627776", + "DS:used:GAUGE:"COLLECTD_HEARTBEAT":0:1099511627776", + "DS:free:GAUGE:"COLLECTD_HEARTBEAT":0:1099511627776", + "DS:cached:GAUGE:"COLLECTD_HEARTBEAT":0:1099511627776", + "DS:resv:GAUGE:"COLLECTD_HEARTBEAT":0:1099511627776", NULL }; static int ds_num = 4; @@ -74,6 +74,7 @@ static void swap_write (char *host, char *inst, char *val) rrd_update_file (host, swap_file, val, ds_def, ds_num); } +#if SWAP_HAVE_READ static void swap_submit (unsigned long long swap_used, unsigned long long swap_free, unsigned long long swap_cached, @@ -88,7 +89,6 @@ static void swap_submit (unsigned long long swap_used, plugin_submit (MODULE_NAME, "-", buffer); } -#if SWAP_HAVE_READ static void swap_read (void) { #ifdef KERNEL_LINUX