Documentation

Slab Input Plugin

This plugin collects details on memory consumption of Slab cache entries by parsing the /proc/slabinfo file respecting the HOST_PROC environment variable.

This plugin requires /proc/slabinfo to be readable by the Telegraf user.

Introduced in: Telegraf v1.23.0 Tags: system OS support: linux

Global configuration options

In addition to the plugin-specific configuration settings, plugins support additional global and plugin configuration settings. These settings are used to modify metrics, tags, and field or create aliases and configure ordering, etc. See the CONFIGURATION.md for more details.

Configuration

# Get slab statistics from procfs
# This plugin ONLY supports Linux
[[inputs.slab]]
  # no configuration - please see the plugin's README for steps to configure
  # sudo properly

Sudo configuration

Since the slabinfo file is only readable by root, the plugin runs sudo /bin/cat to read the file.

Sudo can be configured to allow telegraf to run just the command needed to read the slabinfo file. For example, if telegraf is running as the user telegraf and HOST_PROC is not used, add this to the sudoers file

telegraf ALL = (root) NOPASSWD: /bin/cat /proc/slabinfo

Metrics

Metrics include generic ones such as kmalloc_* as well as those of kernel subsystems and drivers used by the system such as xfs_inode. Each field with _size suffix indicates memory consumption in bytes.

  • mem
    • tags:
    • fields:
      • kmalloc_8_size (integer)
      • kmalloc_16_size (integer)
      • kmalloc_32_size (integer)
      • kmalloc_64_size (integer)
      • kmalloc_96_size (integer)
      • kmalloc_128_size (integer)
      • kmalloc_256_size (integer)
      • kmalloc_512_size (integer)
      • xfs_ili_size (integer)
      • xfs_inode_size (integer)

Example Output

slab kmalloc_1024_size=239927296i,kmalloc_512_size=5582848i 1651049129000000000

Was this page helpful?

Thank you for your feedback!


New in InfluxDB 3.6

Key enhancements in InfluxDB 3.6 and the InfluxDB 3 Explorer 1.4.

See the Blog Post

InfluxDB 3.6 is now available for both Core and Enterprise. This release introduces the 1.4 update to InfluxDB 3 Explorer, featuring the beta launch of Ask AI, along with new capabilities for simple startup and expanded functionality in the Processing Engine.

For more information, check out:

InfluxDB Docker latest tag changing to InfluxDB 3 Core

On February 3, 2026, the latest tag for InfluxDB Docker images will point to InfluxDB 3 Core. To avoid unexpected upgrades, use specific version tags in your Docker deployments.

If using Docker to install and run InfluxDB, the latest tag will point to InfluxDB 3 Core. To avoid unexpected upgrades, use specific version tags in your Docker deployments. For example, if using Docker to run InfluxDB v2, replace the latest version tag with a specific version tag in your Docker pull command–for example:

docker pull influxdb:2