Save the bandwidth breakdown for previous months (User History).

Version 1.42


Since we already have the bandwidth.tally.cache file, just before the monthly reset, save a copy of this file for future viewing. This will allow comparisons between past months. Will have a new folder: /usr/local/directadmin/data/users/username/history and each file would be called: 2012-09.log for example. Note that the creation of this log is not merely a file copy. Instead it's a smart merge, in case the reset is run many times. Only the last months data will be set there. For the current month, use the normal "Details" button on your stats page. To view these history files, they'll be under the "User History" button, which already exists. If more than 0 files exist in the "history" directory, a new "Details" column will be added to the User History page, where a JS popup will show the previous months. No skin changes are needed, as it uses existing code. CMD_API_BANDWIDTH_BREAKDOWN will be able to use this as well. Just add year=2012&month=9 to the end of your call (either the ?user=user method, or the "self" method with no "user")

Interested to try DirectAdmin? Get a 30-day Free Trial!