文档文档

Bcache 输入插件

此插件从 stats_total 目录和 dirty_data 文件收集 块层缓存的统计信息。

引入于: Telegraf v0.2.0 标签: system 操作系统支持: linux

全局配置选项

插件支持其他全局和插件配置设置,用于修改指标、标签和字段,创建别名以及配置插件顺序等任务。更多详情请参阅 CONFIGURATION.md

配置

# Read metrics of bcache from stats_total and dirty_data
# This plugin ONLY supports Linux
[[inputs.bcache]]
  ## Bcache sets path
  ## If not specified, then default is:
  bcachePath = "/sys/fs/bcache"

  ## By default, Telegraf gather stats for all bcache devices
  ## Setting devices will restrict the stats to the specified
  ## bcache devices.
  bcacheDevs = ["bcache0"]

Metrics

标签

  • backing_dev 由缓存支持的设备
  • bcache_dev 用于缓存的设备

字段

  • dirty_data: 缓存中此 backing device 的脏数据量。与缓存集版本相比,此项会持续更新,但可能略有偏差
  • bypassed: 绕过缓存的 IO 量(包括读取和写入)
  • cache_bypass_hits: 旨在绕过缓存的 IO 的命中次数
  • cache_bypass_misses: 旨在绕过缓存的 IO 的未命中次数
  • cache_hits: bcache 看到的单个 IO 的命中次数;部分命中被计为未命中。
  • cache_misses: bcache 看到的单个 IO 的未命中次数;部分命中被计为未命中。
  • cache_hit_ratio: 命中与未命中之比
  • cache_miss_collisions: 当数据本应由于未命中而插入缓存,但与写入操作发生竞争,且数据已存在的情况(通常为零,因为缓存未命中的同步机制已重写)
  • cache_readaheads: 预读发生的次数。

示例输出

bcache,backing_dev="md10",bcache_dev="bcache0" dirty_data=11639194i,bypassed=5167704440832i,cache_bypass_hits=146270986i,cache_bypass_misses=0i,cache_hit_ratio=90i,cache_hits=511941651i,cache_miss_collisions=157678i,cache_misses=50647396i,cache_readaheads=0i

此页面是否有帮助?

感谢您的反馈!


InfluxDB 3.8 新特性

InfluxDB 3.8 和 InfluxDB 3 Explorer 1.6 的主要增强功能。

查看博客文章

InfluxDB 3.8 现已适用于 Core 和 Enterprise 版本,同时发布了 InfluxDB 3 Explorer UI 的 1.6 版本。本次发布着重于操作成熟度,以及如何更轻松地部署、管理和可靠地运行 InfluxDB。

更多信息,请查看

InfluxDB Docker 的 latest 标签将指向 InfluxDB 3 Core

在 **2026 年 2 月 3 日**,InfluxDB Docker 镜像的 latest 标签将指向 InfluxDB 3 Core。为避免意外升级,请在您的 Docker 部署中使用特定的版本标签。

如果使用 Docker 来安装和运行 InfluxDB,latest 标签将指向 InfluxDB 3 Core。为避免意外升级,请在您的 Docker 部署中使用特定的版本标签。例如,如果使用 Docker 运行 InfluxDB v2,请将 latest 版本标签替换为 Docker pull 命令中的特定版本标签 — 例如

docker pull influxdb:2