[¿BUG?] Bandwidth Details showing only one day

IPaddress

Verified User
Joined
Feb 21, 2004
Messages
86
Hi.
Im running Directadmin 1.33.7 on a CentOS 5 Final.
Since last update, i've notice that when i want to check the Bandwith details from any Domain, it only shows me the last day. Fro example, today (13-07-2009) its showing me:
Date: 2009 07 12
Apache:4.24 MB
EMail: 0.00 KB
FTP: 0.00 KB
Directadmin: 0.00 KB
Other: 0.00 KB
Total: 4.24 MB
Sent EMails: 0

As you can see, the details are correct and from the last day (Bugfix: http://www.directadmin.com/features.php?id=976). However, i dont want to see only the last day. I want to see the details of all the days of the month.
I've search in the KnowledgeBase, in the Forum and in Google but i couldnt be able to do this.
Does anyone know how can i do it?


Thanks in advance.

Bye.

PD: Sorry for my poor English.
 
I got bit by this bug as well, investigated half of my systems without a solution :( and at last checked here :)

So we have to wait a little longer I guess...
 
Hello,

It is already available as a pre-release binary pack if you want it now.

https://www.directadmin.com/clients

Login, click your license, and follow the pre-release instructions.
It will show 1.33.7 on installed, but has most of the features from 1.34.0 despite the version numbering.

Regarding this fix, wait for the next tally to run before the bandwidth breakdown is updated correctly, after upgrading to these binaries.

John
 
The new version 1.34 seems to bring back the breakout in days. But the last day is always behind with "other" and "emails". I checked this over multiple servers. The next day the listing is correct, no data is lost; it just is behind.

Any idea how to fix this?
 

Attachments

  • Picture 13.png
    Picture 13.png
    44.9 KB · Views: 153
Hello,

DA only knows that the next day happens if the "time" variable is included with the bytes line. The email bytes files don't have this variable.. and I'm assuming the "other" lines being added are not containing it either. The entries for the daily tallies do have the time variable, which is the point where DA flips the day, so we just need to have each entry know when it happened, then DA will know.

For the email, you can get exim to add the time variable to the bytes line which would then put the emails on the correct day.

Edit your /etc/exim.pl and find the "sub log_bandwidth" function.
Find this section:
Code:
        open (BYTES, ">>/etc/virtual/usage/$name.bytes");
        print BYTES "$bytes=$data\n";
        close(BYTES);
        chmod (0660, "/etc/virtual/usage/$name.bytes");
and change it to look like this:
Code:
        open (BYTES, ">>/etc/virtual/usage/$name.bytes");
        print BYTES "$bytes=$data&time=";
        print BYTES time();
        print BYTES "\n";
        close(BYTES);
        chmod (0660, "/etc/virtual/usage/$name.bytes");
then restart exim.

John
 
Back
Top