0

I have an embedded x86 computer board which does not have any kind of I/O activity LED (e.g. HDD LED). I am not using SATA drives so the normal workaround of using SATA PIN 11 as an activity indicator is a no-go. I also cannot change the hardware design since it it out of my control.

Due to the lack of alternatives I want to create a software based busy indicator that basically draws and clears a red square on the framebuffer depending on disk I/O activity. Drawing on the framebuffer is no problem for me; that part is solved.

What are my options to get the Linux kernel to tell me that it is starting and stopping to perform disk I/O?

Is there a kernel interface that a userspace C program can subscribe to so that the kernel notifies/wakes it up when disk I/O operations start and stop?

I would like to avoid parsing strings like I/O counters in /proc/ or /sys/ and, if at all possible, any kind of loop/polling.

Ideally it would be great to limit notifications to a single block device but that's not a dealbreaker.

  • duplicate of https://unix.stackexchange.com/questions/55212/how-can-i-monitor-disk-io although this doesn't list very many graphical tools including toolbar indicators which exist. – user10489 Dec 30 '21 at 13:09

1 Answers1

0

Try gnome-shell extension / indicator Harddisk LED which seems to do exactly what you are looking for.

If you are not using gnome-shell, please add the name of your desktop environment to the question.

For raw data or stand alone disk monitors, multiple answers in How can I monitor disk io? are still valid.

user10489
  • 6,740