11 November 2008

Reset bandwidth usage of user in DirectAdmin

To reset the monthly bandwidth usage of a user in DirectAdmin enter the following as root in a terminal:

echo 'action=reset&value=USERNAME&type=user' >> /usr/local/directadmin/data/task.queue
echo "" > /var/log/httpd/domains/DOMAIN.EXT.bytes
echo 'action=tally&value=all' >> /usr/local/directadmin/data/task.queue

The first line resets the bandwidth usage.
I'm not sure if the second line is necessarry, but it reset's the http bandwidth usage of said domain.
The last line recalculates the used bandwidth, shown in DirectAdmin.

No comments: