Bandwidth Problem Directadmin AWSTATS

swamigaurav90

New member
Joined
Jun 10, 2015
Messages
10
Hi ,


We are facing issue of bandwidth usage from 2 months ,

bandwidth usage shown in directadmin highly differs from bandwidth usage shown in awstats.


Advanced Search
Date Apache Email Ftp Pop Imap DirectAdmin Other Total Email Deliveries (Sent)
2015 06 01 4.78 GB 0.00 KB 131 KB 0.00 KB 0.00 KB 452 KB 0.00 KB 4.78 GB 0 (0)
2015 06 02 2.68 GB 0.00 KB 0.00 KB 0.00 KB 0.00 KB 0.00 KB 0.00 KB 2.68 GB 0 (0)
2015 06 03 3.12 GB 0.00 KB 0.915 MB 0.00 KB 0.00 KB 0.653 MB 0.00 KB 3.12 GB 0 (0)
2015 06 04 10.21 GB 0.00 KB 255 KB 0.00 KB 0.00 KB 104 KB 0.00 KB 10.21 GB 0 (0)
2015 06 05 3.43 GB 0.00 KB 0.00 KB 0.00 KB 0.00 KB 80.0 KB 0.00 KB 3.43 GB 0 (0)
2015 06 06 2.26 GB 0.00 KB 0.00 KB 0.00 KB 0.00 KB 0.00 KB 0.00 KB 2.26 GB 0 (0)
2015 06 07 3.21 GB 0.00 KB 0.507 MB 0.00 KB 0.00 KB 203 KB 0.00 KB 3.21 GB 0 (0)
2015 06 08 2.88 GB 0.00 KB 0.00 KB 0.00 KB 0.00 KB 13.5 MB 0.00 KB 2.90 GB 0 (0)
2015 06 09 811.1 MB 0.00 KB 0.00 KB 0.00 KB 0.00 KB 80.0 KB 0.00 KB 811.2 MB 0 (0)
total 33.37 GB 0.00 KB 1.80 MB 0.00 KB 0.00 KB 15.0 MB 0.00 KB 33.39 GB 0 (0)


While Bandwidth usage on awstats shows

Day Number of visits Pages Hits Bandwidth
01 Jun 2015 780 2654 40917 1.85 GB
02 Jun 2015 235 667 11326 521.32 MB
03 Jun 2015 777 2717 40336 1.77 GB
04 Jun 2015 1214 4276 75206 2.65 GB
05 Jun 2015 247 837 14431 546.47 MB
06 Jun 2015 548 1735 29254 1.10 GB
07 Jun 2015 272 947 15170 587.48 MB
08 Jun 2015 517 1655 27446 1.04 GB
09 Jun 2015 1241 3973 70492 2.69 GB
10 Jun 2015 58 175 3494 121.64 MB

I've seen older posts ,but they didn't helped much
Any help?
 
Hello,

What figures are more realistic in your case? Those in Directadmin or in Awstats? What webserver do you use: nginx, apache, nginx+apache, other?
 
As per my consideration awstats figure seems to be realistic as compared to directadmin.
we use apache as webserver.But there is 11 GB difference between bandwidth usage ,and I don't know whether awstat is miising bandwith or directadmin showing wrong calculation.
 
Directadmin shows bandwidth usage in total for domains on an account.
AwStats shows bandwidth usage per domain (without sub-domains).
 
Directadmin gets bandwidth from /var/log/httpd/domains/domain.com.bytes and it summarize both IN and OUT. You can check a previous day calculation by:

Code:
cat /var/log/httpd/domains/domain.com.bytes.1 | awk '{bytes+=$1+$2} END {print bytes/1024}'

and awstats gets data from logs (only OUT), previous day logs you can find in:

/home/username/domains/domain.com/logs/Jun-2015.tar.gz

To check a previous day calculation run this:



Code:
cd /home/username/domains/domain.com/logs/
tar -zxvf Jun-2015.tar.gz
cat domain.com | awk '{bytes+=$10} END {print bytes/1024}'

and compare values.
 
direct admin Output

[root@intl ~]# cat /var/log/httpd/domains/scmspune.ac.in.bytes |awk '{bytes+=$1+$2} END {print bytes/1024}'
544716
[root@intl ~]#


Awstats Logs output

[root@zimbra ~]# cat scmspune.ac.in.log |awk '{bytes+=$10} END {print bytes/1024}'
1.04887e+06 = 1048870
[root@zimbra ~]#

5444716 bytes will result in 531kb and 0.5MB and awstats data 1024.kb and 1.00028Mb
 
DA result

[root@intl ~]# cat /var/log/httpd/domains/scmspune.ac.in.bytes |awk '{bytes+=$1+$2} END {print bytes/1024}'
544716
[root@intl ~]#

AWSTATs result

[root@zimbra ~]# cat scmspune.ac.in.log |awk '{bytes+=$10} END {print bytes/1024/1024}'
1024.29
[root@zimbra ~]#
 
I see you check the current file with bytes: /var/log/httpd/domains/scmspune.ac.in.bytes
And for what day is that log: scmspune.ac.in.log ?
 
Back
Top