summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0a73779)
raw | patch | inline | side by side (parent: 0a73779)
author | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Fri, 2 Oct 2009 09:35:43 +0000 (11:35 +0200) | ||
committer | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Fri, 2 Oct 2009 09:35:43 +0000 (11:35 +0200) |
This option can be used to enable / disable inode statistics collection.
Defaults to "false" for now.
Defaults to "false" for now.
src/collectd.conf.pod | patch | blob | history | |
src/df.c | patch | blob | history |
diff --git a/src/collectd.conf.pod b/src/collectd.conf.pod
index 7a6418954e39e19688f277e6a6be6f95d581fcae..ae56da3da28ba5920d24b301b27c9b46607deab2 100644 (file)
--- a/src/collectd.conf.pod
+++ b/src/collectd.conf.pod
Enabling this option is recommended.
+=item B<ReportInodes> B<true>|B<false>
+
+Enables or disables reporting of free, reserved and used inodes. Defaults to
+inode collection being disabled.
+
+Enable this option if inodes are a scarce resource for you, usually because
+many small files are stored on the disk. This is a usual scenario for mail
+transfer agents and web caches.
+
=back
=head2 Plugin C<disk>
diff --git a/src/df.c b/src/df.c
index 66daab26fafbcdbb013c175aa5908e8c4132ea3f..62775fd286df0485c1fd0e23e25142a921e6a4c1 100644 (file)
--- a/src/df.c
+++ b/src/df.c
"FSType",
"IgnoreSelected",
"ReportByDevice",
- "ReportReserved"
+ "ReportReserved",
+ "ReportInodes"
};
static int config_keys_num = STATIC_ARRAY_SIZE (config_keys);
static _Bool by_device = false;
static _Bool report_reserved = false;
+static _Bool report_inodes = false;
static int df_init (void)
{
return (0);
}
+ else if (strcasecmp (key, "ReportInodes") == 0)
+ {
+ if (IS_TRUE (value))
+ report_inodes = true;
+ else
+ report_inodes = false;
+
+ return (0);
+ }
return (-1);
}
/* inode handling */
+ if (report_inodes)
{
uint64_t inode_free;
uint64_t inode_reserved;