Show the spinning state of a disk #2027
Replies: 2 comments
-
The status can not be retrieve with non-root account:
So it can not be included directly in Glances (because Glances should not be ran as root for security reason): One workaround will be to use an Glances AMP by creating a system script returning the disk status: Ex: /usr/local/bin/disk_state_sda.sh
Configure the sudoers file to allow your current user to execute the hdparm software without using a password.
Then add the following line in the Glances configuration file (use glances -V to display the log path and serach for the configuration file path):
Then run Glances: |
Beta Was this translation helpful? Give feedback.
-
Thanks, great suggestion. I am running glances in a docker container on unraid, where hdparm is not available unfortunately(it also seems to not log the config folder) |
Beta Was this translation helpful? Give feedback.
-
Is your feature request related to a problem? Please describe.
My disks are spinning up regularly for some reason and I would like to monitor when this happens. Therefore it would be cool if the state of the disks would be available as well(I would like to integrate that into Home Assistant to show a proper timeline, so the values need to be exported as well)
Describe the solution you'd like
According to https://superuser.com/questions/173622/hdparm-checking-if-a-drive-is-spun-down/176079 it is possible to get the state of a disk by running the hdparm command. If that is added as a plugin, the state could be monitored over time.
Describe alternatives you've considered
No idea
Beta Was this translation helpful? Give feedback.
All reactions