HDD spindown info as normal user (script)
Hi all,
I'm trying to monitor my HDD spin state: are they running or idle. I have a build a small script using hdparm, but it needs to be run as root, wich is absolutely not an option. Does someone know how I could get this info a normal user? Some cat /proc/something? Thanks! Benjamin |
Did you have a look at /sys/block/sd?/device/?
state might be of interest to you. |
Thanks!
Thanks a lot, indeed it looks like what I'm looking for :)
Now I just need to find out what are the different states... |
Quote:
|
Well, I think I rejoyed too quickly... :(
root@raid:/home/benjalien# cat /sys/block/sdf/device/state running root@raid:/home/benjalien# hdparm -C /dev/sdf /dev/sdf: SG_IO: bad/missing sense data, sb[]: 70 00 05 00 00 00 00 0a 00 00 00 00 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 drive state is: standby One command is giving "standby" and the other "running" :'( |
All times are GMT -5. The time now is 06:36 PM. |