Hi, together,
as it seems as if this a request raised every now and then: Maybe following script can be handy. It monitors the ZFS pool and shuts down the system if a predefined number of seconds no IO activity is detected.
Actually, it's more a one-liner ;-)
---
#!/bin/bash
# Desired idle interval in seconds
interval=240
while [ true ]; do
if zpool iostat $interval 2 | tail +1 |tail +`zpool iostat |wc -l|sed "s/ *//;"`|grep -q "0 *0 *0 *$"; then
shutdown -p now
fi
done
---
Comments appreciated.
Bye Wilko
as it seems as if this a request raised every now and then: Maybe following script can be handy. It monitors the ZFS pool and shuts down the system if a predefined number of seconds no IO activity is detected.
Actually, it's more a one-liner ;-)
---
#!/bin/bash
# Desired idle interval in seconds
interval=240
while [ true ]; do
if zpool iostat $interval 2 | tail +1 |tail +`zpool iostat |wc -l|sed "s/ *//;"`|grep -q "0 *0 *0 *$"; then
shutdown -p now
fi
done
---
Comments appreciated.
Bye Wilko