package/collectd: add option to enable UBI counters
authorThomas De Schampheleire <thomas.de_schampheleire@nokia.com>
Wed, 27 Jan 2021 09:16:59 +0000 (10:16 +0100)
committerYann E. MORIN <yann.morin.1998@free.fr>
Wed, 27 Jan 2021 21:54:01 +0000 (22:54 +0100)
The 'ubi' collectd plugin was added in 5.11.0.
Add options in Buildroot to enable it.

Based on code by Bart De Vos.

Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
package/collectd/Config.in
package/collectd/collectd.mk

index 3e854ba51809535b17e2b6bf1e3f3f966845b1d3..f02cedda495d99efc2ff632092394622cd8b1ce0 100644 (file)
@@ -525,6 +525,16 @@ config BR2_PACKAGE_COLLECTD_THERMAL
        help
          Reads ACPI thermal zone information.
 
+config BR2_PACKAGE_COLLECTD_UBI
+       bool "ubi"
+       help
+         UBI (Unsorted Block Images) is an erase block management layer
+         for flash memory devices. UBI serves two purposes, tracking
+         NAND flash bad blocks and providing wear leveling.
+         This plugin collects some stats about UBI devices:
+          * bad physical underlying blocks (bad_peb_count)
+          * max erase counter value (max_ec)
+
 config BR2_PACKAGE_COLLECTD_UPTIME
        bool "uptime"
        help
index 8fa278df7e77d95e029011f0467dfe58e603237f..ccca9bf388d9dc3a98b1262352545280dd16eb78 100644 (file)
@@ -137,6 +137,7 @@ COLLECTD_CONF_OPTS += \
        $(if $(BR2_PACKAGE_COLLECTD_THERMAL),--enable-thermal,--disable-thermal) \
        $(if $(BR2_PACKAGE_COLLECTD_THRESHOLD),--enable-threshold,--disable-threshold) \
        $(if $(BR2_PACKAGE_COLLECTD_TIMEDIFF),--enable-match_timediff,--disable-match_timediff) \
+       $(if $(BR2_PACKAGE_COLLECTD_UBI),--enable-ubi,--disable-ubi) \
        $(if $(BR2_PACKAGE_COLLECTD_UNIXSOCK),--enable-unixsock,--disable-unixsock) \
        $(if $(BR2_PACKAGE_COLLECTD_UPTIME),--enable-uptime,--disable-uptime) \
        $(if $(BR2_PACKAGE_COLLECTD_USERS),--enable-users,--disable-users) \