No thumbs up for a while
Currently DAdminUsage.bytes counting is a nightmare!
Se what i found today:
User have backup-Nov-9-2004-1.tar.gz file, it's size 25 Mb.
Now, let's see what we have in /var/log/directadmin/2004-Nov-09.log
===
09/11/2004:22:23:09 217.107.253.137 GET /CMD_FILE_MANAGER/backups/backup-Nov-9-2004-1.tar.gz HTTP/1.1 henshin
09/11/2004:22:23:16 217.107.253.137 GET /CMD_FILE_MANAGER/backups/backup-Nov-9-2004-1.tar.gz HTTP/1.1 henshin
09/11/2004:22:23:16 217.107.253.137 GET /CMD_FILE_MANAGER/backups/backup-Nov-9-2004-1.tar.gz HTTP/1.1 henshin
09/11/2004:22:23:16 217.107.253.137 GET /CMD_FILE_MANAGER/backups/backup-Nov-9-2004-1.tar.gz HTTP/1.1 henshin
09/11/2004:22:23:16 217.107.253.137 GET /CMD_FILE_MANAGER/backups/backup-Nov-9-2004-1.tar.gz HTTP/1.1 henshin
09/11/2004:22:26:28 217.107.253.230 GET /CMD_FILE_MANAGER/backups/backup-Nov-9-2004-1.tar.gz HTTP/1.1 henshin
09/11/2004:22:26:28 217.107.253.230 GET /CMD_FILE_MANAGER/backups/backup-Nov-9-2004-1.tar.gz HTTP/1.1 henshin
09/11/2004:22:27:13 217.107.253.230 GET /CMD_FILE_MANAGER/backups/backup-Nov-9-2004-1.tar.gz HTTP/1.1 henshin
===
So, we see 8 hits.
And for every hit DA adds line with complete size of file (26171301) in DAdminUsage.bytes.
Ho many times this file was downloaded actually? Nobody knows, but I'm sure - it was downloaded completely only once. But DA will rise BW usage value by 25*8=200 (!) Meg.
Just made an experimet - started downloading that file and cancelled download after 50 Kb. And yes, 26171301 value is added to DAdminUsage.bytes. BUT ACTUALLY I'M NOT WASTED SUCH AMOUNT OF BW!!!
Now wonder if backup file size will be over 200 or even 500 Mb...
I'm not experienced in http-server development so I don't know how hard to made correct BW counting (like it's done in Apache, for example), but that issue must be corrected, or we need an option to disable BW counting inside DA at all.
I'd rather give a piece of bandwidth to my customers for free than receive their complains about disappeared bandwidth.