Back to Netdata

OS provided metrics (debugfs.plugin)

src/collectors/debugfs.plugin/README.md

2.10.34.0 KB
Original Source

OS provided metrics (debugfs.plugin)

debugfs.plugin gathers metrics from the /sys/kernel/debug folder on Linux systems. Debugfs exists as an easy way for kernel developers to make information available to user space.

This plugin is external, the netdata daemon spawns it as a long-running independent process.

In detail, it collects metrics from:

  • /sys/kernel/debug/extfrag (Memory fragmentation index for each order and zone).
  • /sys/kernel/debug/zswap (Zswap performance statistics).

Prerequisites

Permissions

No user action required.

The debugfs root directory is accessible only to the root user by default. Netdata uses Linux Capabilities to give the plugin access to debugfs. CAP_DAC_READ_SEARCH is added automatically during installation. This capability allows bypassing file read permission checks and directory read and execute permission checks. If file capabilities are not usable, then the plugin is instead installed with the SUID bit set in permissions so that it runs as root.

Metrics

MetricScopeDimensionsUnitsLabels
mem.fragmentation_index_dmanuma nodeorder0, order1, order2, order3, order4, order5, order6, order7, order8, order9, order10indexnuma_node
mem.fragmentation_index_dma32numa nodeorder0, order1, order2, order3, order4, order5, order6, order7, order8, order9, order10indexnuma_node
mem.fragmentation_index_normalnuma nodeorder0, order1, order2, order3, order4, order5, order6, order7, order8, order9, order10indexnuma_node
system.zswap_pool_compression_ratiocompression_ratioratio
system.zswap_pool_compressed_sizecompressed_sizebytes
system.zswap_pool_raw_sizeuncompressed_sizebytes
system.zswap_rejectionscompress_poor, kmemcache_fail, alloc_fail, reclaim_failrejections/s
system.zswap_pool_limit_hitlimitevents/s
system.zswap_written_back_raw_byteswritten_backbytes/s
system.zswap_same_filled_raw_sizesame_filledbytes
system.zswap_duplicate_entryentriesentries/s

Troubleshooting

To troubleshoot issues with the collector, run the debugfs.plugin in the terminal. The output should give you clues as to why the collector isn't working.

  • Navigate to the plugins.d directory, usually at /usr/libexec/netdata/plugins.d/. If that's not the case on your system, open netdata.conf and look for the plugins setting under [directories].

    bash
    cd /usr/libexec/netdata/plugins.d/
    
  • Switch to the netdata user.

    bash
    sudo -u netdata -s
    
  • Run the debugfs.plugin to debug the collector:

    bash
    ./debugfs.plugin