This is an optional feature to reduce the CPU usage when monitoring the disk activities. The current bash implementation gives too many forks and use around 1% CPU times, which is also reported in #8, #10 and #34.
This PR replaces the bash version to a C++ version, and you need to do the following to enable it:
# compile the disk activities monitor
g++ -std=c++17 -O2 scripts/blink-disk.cpp -o ugreen-blink-disk
# copy the binary file (the path can be changed, see BLINK_MON_PATH in ugreen-leds.conf)
cp ugreen-blink-disk /usr/bin
# copy the new script and restart the service
cp scripts/ugreen-diskiomon /usr/bin
systemctl restart ugreen-diskiomon
See #34 for further discussions and a test of the performance.
This is an optional feature to reduce the CPU usage when monitoring the disk activities. The current bash implementation gives too many forks and use around 1% CPU times, which is also reported in #8, #10 and #34.
This PR replaces the bash version to a C++ version, and you need to do the following to enable it:
See #34 for further discussions and a test of the performance.