1 <?xml version=
"1.0" encoding=
"UTF-8"?>
2 <!DOCTYPE plist PUBLIC
"-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
6 <string>com.Galaxy.KeepDisk1Spinning
</string>
7 <key>ProgramArguments
</key>
11 <string>while (sleep
7);do hexdump -n4095 -C /dev/disk1
>/dev/null;done
</string>
14 while (sleep 0.5);do /usr/local/sbin/smartctl --attributes disk1|egrep 'Cycle|Temperature_Celsius|Start_Stop_Count';date;done
15 while (sleep 7);do sudo hexdump -n4095 -C /dev/disk1|head;date;done
16 # No need to sudo as we are already root.
17 while (sleep 7);do hexdump -n4095 -C /dev/disk1 >/var/log/KeepDisk1Spinning.log;date >>/var/log/KeepDisk1Spinning.log;done
19 <key>StandardOutPath</key>
20 <string>/var/log/KeepDiskSpinning.log</string>
22 ### Put me in /Library/LaunchDaemons/ as it is "System-wide daemons provided by the administrator". Remember to "sudo chown root:wheel".
23 ### sudo launchctl load /Library/LaunchDaemons/com.Galaxy.KeepDisk1Spinning.plist
24 ### ll /var/log/KeepDisk* && tail -3 /var/log/KeepDisk1Spinning.log
26 # Even set to 5s, the real interval is 10s.
27 <key>StartInterval</key>