Storage activity LED indicator

UUID: storage-act-led@mrbartblog
Last edited:
5 days ago 2026-02-26, 08:00
Last commit: [95723105] Hungarian translation update (#8380)

Emulates HDD/SDD activity LED indicator, for computers without one

README

Close

Mass Storage Activity LED Indicator

A Cinnamon desktop applet (Linux Mint) that adds a visual disk activity indicator (LED) directly to your system panel. This is a perfect solution for laptop users or PC cases that lack a physical HDD activity LED.

Description

The applet monitors system statistics and changes its icon color whenever a read or write operation is detected. This allows the user to see in real-time if the system is performing background I/O operations.

Technical Details (/proc/diskstats)

The applet works by parsing the /proc/diskstats file, which contains runtime block device statistics. It specifically tracks:

  • Field 4: Number of reads completed.
  • Field 8: Number of writes completed.

By comparing the current values with the previous ones every 100ms, the applet determines the current state:

  • Idle - (black circle) No changes in stats.
  • 🟢 Read - (green circle) Increase in read count.
  • 🔴 Write - (red circle) Increase in write count.
  • 🟤 Both - (brown circle) Simultaneous increase in both read and write counts.

The brown is chosen as halfway between red and green light

Requirements

  • System Emojis: This applet utilizes built-in system emoticons as colorful icons. Ensure your system has a font supporting color emojis installed (e.g., Noto Color Emoji).

Configuration

The applet works automatically for the main disk controller.

The refresh/measurement interval is set to 100ms. This value can be changed directly in the applet.js code. However, in the author's opinion, 100ms provides a very accurate representation of how a physical LED built into a computer would behave – longer would be too slow, and shorter would be hard for the human eye to track.

Source & License

This software is provided "as-is". For more details, refer to:

Log In To Comment!

4 Comments

tucsonst
tucsonst-2 weeks ago
Thank you for this, Mr. Bart. It is just what I was looking for. One observation for you to consider: The for loop in _get_disk_stats() appears to be summing the stats for the disks in addition to all their partitions. Would it be more accurate and efficient to only sum the major devices? This could be done with a simple change to the if statement within the for loop, such as: FROM if (parts.length >= 7) { TO if (parts.length >= 7 && parseInt(parts[1] == 0) { //Only count the major device, skipping partitions I haven't tested this or checked it for syntax. Just submitting for consideration. Thanks again for this simple and useful applet.
tucsonst
tucsonst-2 weeks ago
Fixed parenthesis: if (parts.length >= 7 && parseInt(parts[1]) == 0) { //Only count the major device, skipping partitions
tucsonst
tucsonst-1 week ago
Upon further research never mind. I was mistaken to assume that disks always have a 0 for the minor device number. That won't be true for multiple disks on the same driver.
claudiux
claudiux-1 month ago
Simple and effective. Thank you.