projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
34b093a
)
Fixed a problem with the `disk' plugin: Added a counter to check how often the values...
author
octo
<octo>
Tue, 20 Dec 2005 09:34:09 +0000
(09:34 +0000)
committer
octo
<octo>
Tue, 20 Dec 2005 09:34:09 +0000
(09:34 +0000)
src/disk.c
patch
|
blob
|
history
diff --git
a/src/disk.c
b/src/disk.c
index
4e53df0
..
ea49717
100644
(file)
--- a/
src/disk.c
+++ b/
src/disk.c
@@
-65,6
+65,9
@@
typedef struct diskstats
{
char *name;
+ /* This overflows in roughly 1361 year */
+ unsigned int poll_count;
+
unsigned int read_sectors;
unsigned int write_sectors;
@@
-300,6
+303,10
@@
static void disk_read (void)
read_bytes = ds->read_bytes;
write_bytes = ds->write_bytes;
+ /* Don't write to the RRDs if we've just started.. */
+ ds->poll_count++;
+ if (ds->poll_count <= 6)
+ continue;
if ((read_count == 0) && (write_count == 0))
continue;