This option can be used to enable / disable inode statistics collection.
Defaults to "false" for now.
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>
"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;