How does DA calculate bandwith?

chielsen

Verified User
Joined
Jul 26, 2004
Messages
62
Hi,

I wanna know how ma calculates the bandwith usage. There is a site on my server which isn't actively used and show huge bandwith usage. I looked and searched everwywhere but no log can tell me anything (all almost empty logs).
Now the statics of my dc say there is indeed an increase of bandwithusage (seems mostly inbound..).

Now how can i check which files are generation the bandwith usage (DA says it's apache usage).
The strange thing is that it is inbound, maybe an upload script or something??
 
Hi! I'm interest too.

I have big difference on DA bandwidth statistics and my Data centre statistics.
For exemple, in DA i see bandwith nearly 600Gb in this mounth, but in the Data centre statistic i see totally more than 1Tb !!!
I investigated this problem using slurm, and i see that Data centre statistic is right!

FreeBSD 6.1-RELEASE-p10
DA 1.28
30 * * * * root echo 'action=tally&value=all' >> /usr/local/directadmin/data/task.queue

ps. sorry for my engl
 
Hello,

If you have a new version of DA, there should be a "Details" button beside the total bandwidth usage in a the User's info page. It will show you the breakdown.

For apache, you can compare to webalizer, note that you must also count the subdomains for webalizer as they're sperate, but not in DA's total.

Also, DA does not count every aspect of everything, it only counts the things were it knows which user did it. Example, apache, ftp, and da usage is known, but anything done "behind the scenes" that have no logs, like wget, or all the icmp usage dont count. Also inbound email is not counted, but outbound is. (possibly a good place to look, eg spam). If you have any rsync data being transferred nightly, that's not counted. Pop/imap traffic is also not counted.

With all that info, DA will be expected to always use less data than the datacenter will show, thus you should factor this into your pricing.

John
 
Usage Stats

John, how do the Usage Stats for eth0 in the Server Stats compare themselves with the data of the datacenter?
 
The Tx and Rx values in the ifconfig output? (which DA uses in the "complete usage stats" page for the eth0 device).... I'd say they're fairly unreliable for long term usage. The device only counts so high, then it start back at 0 again. Mrtg uses this info, but processes it smartly by scanning the values all the time. If it goes back to 0, then it adds the new number to the last largest known value and continues up. DA just shows you the numbers that ifconfig is showing. (really only useful for short term stats).

If computed correctly (like mrtg), it should be fairly close to your datacenter's numbers.

John
 
DirectAdmin Support said:

Also, DA does not count every aspect of everything, it only counts the things were it knows which user did it. Example, apache, ftp, and da usage is known, but anything done "behind the scenes" that have no logs, like wget, or all the icmp usage dont count. Also inbound email is not counted, but outbound is. (possibly a good place to look, eg spam). If you have any rsync data being transferred nightly, that's not counted. Pop/imap traffic is also not counted.

With all that info, DA will be expected to always use less data than the datacenter will show, thus you should factor this into your pricing.

John

Okay, thank you.
Just my datacenter shows nearly 1.6Tb, slurm running on my server, shows this to.
DA shows only 660Gb this month, i'm confused.
So, i have nearly 90% outbound ftp traffic, other is outbound www.
Wget, scp, mail, spam, etc is extremely small compare with 150Gb daily traffic :)

I can suggest that DA don't count correctly large ftp traffic.

Thank you for your time!
 
Last edited:
Hello,

It's possible. Check your /var/log/proftpd/1.2.3.4.bytes logs to see if there are any entries there. The data in those logs should be rotated nightly, so after the tally, they *should* be empty.

John
 
The thing is, DA shows it as apache usage (in the details overview) but i can't find any apache logs which explains it. Webalizer also is useless.

My thought's were that that is teh case because the site is accessed by http://ip/~user

So i see some weird usage by apache, i can't see what is causing it (no logs), but i do see the usage is really there when i check the dc stats..
 
DirectAdmin Support said:
Hello,

It's possible. Check your /var/log/proftpd/1.2.3.4.bytes logs to see if there are any entries there. The data in those logs should be rotated nightly, so after the tally, they *should* be empty.

John

Thank you! This is very important moment!
So, i seem found the reason of the problem!

By default tally script runs once per day, but i ran it per hour for more often updated statistics.

After the tally script 1.2.3.4.bytes log is flushed but current uploads are not logged !!! Only new connections will be logged!!!
So, the lion's share of ftp traffic is not counted by DA

ps. sorry for my engl
 
Last edited:
So... to get back to the original problems..

How can we rightly bill the client for their used bandwith ?
And how can we prove it, as they see their "used bandwith" in DA too...

Every month Im paying a bandwith bill to the datacentre, without being able to bill my clients... -_-;


I'm not intersting in any calculating theories, I'll leave those in a black box to the DA-experts.
I would just like, as my clients would ask me, to see the numbers.
At this moment, the auto-emailing and auto-suspending when a user is going over his bandwith, is incompetent. =(
 
Last edited:
Back
Top