X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fdf.c;h=62775fd286df0485c1fd0e23e25142a921e6a4c1;hb=af9b05b8c7651d01a46c5af9b9a56192e0f4adde;hp=66daab26fafbcdbb013c175aa5908e8c4132ea3f;hpb=0a73779531039d715e8ca405658c65ba03fad408;p=collectd.git diff --git a/src/df.c b/src/df.c index 66daab26..62775fd2 100644 --- a/src/df.c +++ b/src/df.c @@ -51,7 +51,8 @@ static const char *config_keys[] = "FSType", "IgnoreSelected", "ReportByDevice", - "ReportReserved" + "ReportReserved", + "ReportInodes" }; static int config_keys_num = STATIC_ARRAY_SIZE (config_keys); @@ -61,6 +62,7 @@ static ignorelist_t *il_fstype = NULL; static _Bool by_device = false; static _Bool report_reserved = false; +static _Bool report_inodes = false; static int df_init (void) { @@ -128,6 +130,15 @@ static int df_config (const char *key, const char *value) return (0); } + else if (strcasecmp (key, "ReportInodes") == 0) + { + if (IS_TRUE (value)) + report_inodes = true; + else + report_inodes = false; + + return (0); + } return (-1); @@ -292,6 +303,7 @@ static int df_read (void) } /* inode handling */ + if (report_inodes) { uint64_t inode_free; uint64_t inode_reserved;