solaris-fixes branch: Applied the swap-patch by Christophe Kalt.
[collectd.git] / src / tape.c
index 0fc8f2c..b13cdbd 100644 (file)
@@ -1,6 +1,6 @@
 /**
  * collectd - src/tape.c
- * Copyright (C) 2005  Scott Garrett
+ * Copyright (C) 2005,2006  Scott Garrett
  *
  * 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
@@ -37,14 +37,14 @@ static char *tape_filename_template = "tape-%s.rrd";
 /* 104857600 == 100 MB */
 static char *tape_ds_def[] =
 {
-       "DS:rcount:COUNTER:25:0:U",
-       "DS:rmerged:COUNTER:25:0:U",
-       "DS:rbytes:COUNTER:25:0:U",
-       "DS:rtime:COUNTER:25:0:U",
-       "DS:wcount:COUNTER:25:0:U",
-       "DS:wmerged:COUNTER:25:0:U",
-       "DS:wbytes:COUNTER:25:0:U",
-       "DS:wtime:COUNTER:25:0:U",
+       "DS:rcount:COUNTER:"COLLECTD_HEARTBEAT":0:U",
+       "DS:rmerged:COUNTER:"COLLECTD_HEARTBEAT":0:U",
+       "DS:rbytes:COUNTER:"COLLECTD_HEARTBEAT":0:U",
+       "DS:rtime:COUNTER:"COLLECTD_HEARTBEAT":0:U",
+       "DS:wcount:COUNTER:"COLLECTD_HEARTBEAT":0:U",
+       "DS:wmerged:COUNTER:"COLLECTD_HEARTBEAT":0:U",
+       "DS:wbytes:COUNTER:"COLLECTD_HEARTBEAT":0:U",
+       "DS:wtime:COUNTER:"COLLECTD_HEARTBEAT":0:U",
        NULL
 };
 static int tape_ds_num = 8;
@@ -96,6 +96,7 @@ static void tape_write (char *host, char *inst, char *val)
 }
 
 
+#if TAPE_HAVE_READ
 #define BUFSIZE 512
 static void tape_submit (char *tape_name,
                unsigned long long read_count,
@@ -122,7 +123,6 @@ static void tape_submit (char *tape_name,
 
 #undef BUFSIZE
 
-#if TAPE_HAVE_READ
 static void tape_read (void)
 {