Cron Jobs for Disk and Bandwidth Usage


#1

Does anyone know how to create a Cron Job on the DH Web panel to monitor disk space and bandwidth usage for all domains under the specified user? TIA.


#2

/usr/bin/du -sh . | tail -1

This will email the recipient the total disk usage in their home directory.

No such luck on bandwidth, as it’s not something that’ll show up in a shell command. But there’s an API for many of the panel functions:
http://wiki.dreamhost.com/Api


#3

wow thanks sdayman! I was about to PM you after I saw the other thread. Thanks for the script.