NAME
SDD::Monitor::hdparm - a hdparm specific monitor
VERSION
Version 0.04
SYNOPSIS
Monitor hard disk spindown state using hdparm
DESCRIPTION
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).
METHODS
new
- loop_sleep <Int>
-
How long to sleep between each test Default: 60 (1 minute)
- disks <ArrayRef>
-
An array of disks to be tested. e.g. /dev/sda Default: [ '/dev/sda' ]
- trigger_time <Int>
-
The time to wait after discovering that all disks are spun down before returning (trigger a shutdown). Default: 3600 (1 hour)
- use_sudo 1|0
-
Use sudo for hdparm
sudo hdparm -C /dev/sda
Default: 0
Example configuration
monitor:
hdparm:
trigger_time: 1800
loop_sleep: 1
use_sudo: 0
disks:
- /dev/sdb
- /dev/sdc
- /dev/sdd
run
Run the hdparm spindown Monitor
AUTHOR
Robin Clarke, <perl at robinclarke.net>
LICENSE AND COPYRIGHT
Copyright 2011 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.