Richard said:
the log's rotation compress (tar.gz) and put in /home/user/domains/logs/file.tar.gz
I know that but when it rotates bw counter is reset, and the rotate by time interval does NOT work. So this leaves 1 of 3 situations.
1 - Rotate manually by deliberatly setting the rotate size low at the end of the month to ensure user's domt get unfairly charged for bandwidth.
2 - Set the rotate size low permanatly but this would leave no active bandwidth measurement in place.
3 - Leave how it is and give all users unlimited traffic to compensate since the traffic measurement is effectively broken (not ideal).
I see this as a major problem that needs looking at, maybe it is linked to the exim logs not been rotated problem, but I am going to look at the directadmin method, further analysis I see how task.queue works, the file doesnt exist and when it is made it is processed the following minute after creation. There is the following crontab entries
* * * * * root /usr/local/directadmin/dataskq
2 0-23/6 * * * root echo 'action=vacation&value=all' >> /usr/local/directadmin/data/task.queue;
5 0 * * * root /usr/sbin/quotaoff -a >/dev/null 2>&1; /sbin/quotacheck -aug >/dev/null 2>&1; /usr/sbin/quotaon -a >/dev/null 2>&1;
30 0 * * * root echo 'action=tally&value=all' >> /usr/local/directadmin/data/task.queue
40 1 1 * * root echo 'action=reset&value=all' >> /usr/local/directadmin/data/task.queue
0 4 * * * root echo 'action=check&value=license' >> /usr/local/directadmin/data/task.queue
apperently 'echo "action=reset&value=all" >> /usr/local/directadmin/data/task.queue' resets the logs but when I run this command it fails.
since /usr/local/directadmin/dataskq is what processes task.queue then that file I must presume is broken. Am I on the right track here?