Daemon::Shutdown::Monitor::hdparm - a hdparm specific monitor
Monitor hard disk spindown state using hdparm
Tests the spin state of all the disks listed in "disks" every "loop_sleep". When all disks are in spun down state, the flag "trigger_pending" is set. If a further "trigger_time" seconds pass and all disks are still in a spun down state, the trigger is sent back to the parent process (return 1).
How long to sleep between each test
Default: 60 (1 minute)
An array of disks to be tested. e.g. /dev/sda
Default: [ '/dev/sda' ]
The time to wait after discovering that all disks are spun down before returning (trigger a shutdown).
Default: 3600 (1 hour)
Use sudo for hdparm
sudo hdparm -C /dev/sda
Default: 0
monitor: hdparm: trigger_time: 1800 loop_sleep: 1 use_sudo: 0 disks: - /dev/sdb - /dev/sdc - /dev/sdd
Run the hdparm spindown Monitor
Robin Clarke, perl at robinclarke.net
perl at robinclarke.net
Copyright 2015 Robin Clarke.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
To install Daemon::Shutdown, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Daemon::Shutdown
CPAN shell
perl -MCPAN -e shell install Daemon::Shutdown
For more information on module installation, please visit the detailed CPAN module installation guide.