bergware / dynamix

51 stars 38 forks source link

System Stats on Unraid 6.12 displays the reads as writes and displays zero for reads #85

Closed cassiusdrow closed 8 months ago

cassiusdrow commented 8 months ago

The system stats plugin on Unraid 6.12 displays the disk reads as disk writes and always displays zero for disk reads. It works properly using plugin version 2023.02.14 on Unraid 6.11.5 but is does not work on Unraid 6.12.6. A user on the plugin support thread reports that it did not work as far back as Unraid 6.12.0-rc6. I tried upgrading the sysstat package from 12.7.2 to 12.7.5 but the plugin still does not work properly.

It appears that the output of sar and sadf has changed. This pull request corrects the issue for me.

Relevant comments from the plugin support thread:

https://forums.unraid.net/topic/34889-dynamix-v6-plugins/page/151/#comment-1269924 https://forums.unraid.net/topic/34889-dynamix-v6-plugins/page/155/#comment-1299842 https://forums.unraid.net/topic/34889-dynamix-v6-plugins/page/156/#comment-1315284 https://forums.unraid.net/topic/34889-dynamix-v6-plugins/page/156/#comment-1325259 https://forums.unraid.net/topic/34889-dynamix-v6-plugins/page/157/#comment-1335182

cassiusdrow commented 8 months ago

After further research, I found that the output of the sar and sadf commands were changed to include columns for "discard I/O statistics" in sysstat 12.1.2, which shifted the reads and writes one column.

Unraid 6.11.0+ includes sysstat 12.6.0, Unraid 6.11.4+ includes sysstat 12.7.1, and Unraid 6.12.0+ includes sysstat 12.7.2, all of which include discard I/O statistics. But the system stats plugin installs sysstat 12.0.2 (does not include discard I/O statistics) on Unraid 6.11 and earlier, so the plugin works properly on those Unraid versions.

Some options to handle the sysstat output format differences:

  1. Make the plugin install sysstat 12.0.2 for all Unraid versions and ignore this pull request.
  2. Set the minimum unraid version to 6.11.0, stop installing sysstat 12.0.2, and apply this pull request.
  3. Only install sysstat 12.0.2 for Unraid 6.10.* and earlier and modify the plugin to handle both sysstat formats.
  4. Install sysstat 12.1.2+ for Unraid 6.10.* and earlier and apply this pull request.
bergware commented 8 months ago

Thank you for your research and solution. I'll merge your PR and make an update (likely with minimum Unraid 6.11 version set)