Bandwidth last month

Cyberboy

Verified User
Joined
May 16, 2004
Messages
29
I have a question about DirectAdmin. One of my resellers had used many bandwidth, but I don't know how much. Is there a log or something with the bandwidth stats from the last month? Or do I have to check ik every last day of the month at 11:59 PM?

Thanks in advance,
Rick
 
I don't believe DA (yet) saves previous month's statistics.

You could, though; it would be easy enough to create a script that would read the contents of the bandwidth.tally files for all the users, and send them to you in an email.

The bandwidth tally files are at:

/usr/local/directadmin/data/users/*/bandwidth.tally

Or you might want to keep them on the server; in which case you could create your own logrotate script (the system's logrotate wouldn't work, because it wouldn't do it at the right time).

If I were going to do that I'd probably run them at 23:55, though, to give the server enough time to finish even if it ran into some kind of delay issue.

And while you were at it, you could create a script to give you usage tallies as well.

Note that writing such scripts is NOT on my todo list, since I believe DA has said they'll eventually offer the functionality.

Jeff
 
Thank you very much for your reply and instructions, Jeff. I shall create a script for it.

Rick
 
Rick,

When you create your script don't forget that the last day of the month isn't easy to set up with cron.

If I were going to do it, I'd probably set it to run on the 28th, the 29th, the 30th, and the 31st, and then make sure the script had intelligence to only run on the last day of the month, otherwise to just exit.

Jeff
 
DirectAdmin does indeed keep a log of bandwidth and storage space used at the end of each month for a record.

Using the enhanced sking, Login to the user account, go to the Site Summary / Statistics / Logs page, then at the top left click on the "user history" link right under "Backed up Apache Logs"

It will dispaly the tally of bandwidth and storage space taken at the end of the month when it reset.

:D
 
Hey guys (and girls),

We got about the same problem. At the end of every month we save the bandwidth and disk usage.

Due to all kinds of things we simply forgot to do this last month. Now the disk usage ain't that much of a problem, because that is more of less the same then 3 day's ago I assume.

De bandwidth as you all know is another thing. It's reset to zero.

We got backups of every day, but we hope we don't have to replace the backup.

Mayby one of you have any idea how we can retrieve the data file containing the bandwidth usage, without having to replace the backup.

Many thanks in advance,

Frank
 
Please read my previous post;)

You can also access the history log for your applications in /usr/local/directadmin/data/users/username/user.history
Which contains the log in the format:
Code:
2004 07=bandwidth=200.5&quota=31.1

year month=bandwidth=bwusage&quota=quotausage

Note: the " are supposed to be & but it won't show together with letters like that :rolleyes:
 
Back
Top