Skip to content

feature: Send the disk activity — bytes and operations #43

Closed

Description

@nabil1440

Blocker: no. This can wait until the agent stack is merged. It goes on top of the pressure fields in the same stack.

Part of contract v0.4.0, section "2026-09-24 — Peaks, pressure and disk activity": "Disk activity". After this issue, the agent conforms to contract v0.4.0.

Defect

  • The agent sends how full the disk is. It does not send how busy the disk is.

Cost

  • A backup, a database dump or a plugin that writes all the time slows each site. No chart shows it.
  • A cloud disk has a limit of operations and of bytes each second. A person cannot see when a server is near the limit.

Benefit of the fix

  • Each sample carries the bytes and the operations of the minute, and the peaks of the minute (the peak IOPS).

Fix

  1. At each reading, read /proc/diskstats.
  2. Count each whole disk that has a hardware device (/sys/block/<name>/device). Do not count partitions, loop devices, ram, zram, dm-* and md*.
  3. Count all such disks, not only the disk that holds /.
  4. Add the disks that both readings of a window have.
  5. Operations are columns 4 and 8. Bytes are columns 6 and 10, times 512.
  6. Add the optional fields disk_read_bytes, disk_write_bytes, disk_read_ops, disk_write_ops, and the four peaks disk_read_max_bytes_per_second, disk_write_max_bytes_per_second, disk_read_max_ops_per_second, disk_write_max_ops_per_second.
  7. Send null when there is no usable previous reading, when a counter went back, or when no disk has a hardware device.
  8. Change the pin line in the README to contract v0.4.0.

Completion checks

  • A partition, a loop device and a device mapper disk are not counted.
  • A disk that appears or goes away makes no spike.
  • The eight fields are null in the first sample and when no disk has a hardware device.
  • disk_read_bytes ≤ 60 × disk_read_max_bytes_per_second, and the same for the other three pairs.
  • The README states contract v0.4.0.

Activity

  1. self-assigned this
    on Sep 24, 2026
  2. added a commit that references this issue on Sep 28, 2026
    8f55a1c
  3. changed the title [-]Send the disk activity: bytes and operations[/-] [+]feature: Send the disk activity: bytes and operations[/+] on Oct 1, 2026
  4. changed the title [-]feature: Send the disk activity: bytes and operations[/-] [+]feature: Send the disk activity — bytes and operations[/+] on Oct 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions