[Radiuscontext-discuss] Automation of monthly reports...
Sean Reifschneider
jafo@tummy.com
Thu, 2 May 2002 17:22:16 -0600
On Thu, May 02, 2002 at 12:32:50PM -0600, Mike Cisar wrote:
>/var/www/html/reports-04, reports-05, etc) with a SessionData file of
>SessionData-04, -05, etc. As it stands we have to manually change the
>cron job at the start of each month to reflect the new month number in
>the files, and of course since I'm not up at midnite to do this, we
My understanding is, you want to do something like:
raddetail -d SessionData-`date +%m` [...]
However, if you want it to work for more than the next 7 months without
intervention, you'll probably want to do:
raddetail -d SessionData-`date +%Y-%m` [...]
By way of explaining:
[2] guin:jafo$ echo SessionData-`date +%Y-%m`
SessionData-2002-05
You could also run something the first day of the month (via cron again),
which picked up the detail file for the previous month:
[2] guin:jafo$ echo SessionData-`date -d 'last week' +%Y-%m`
SessionData-2002-04
This latter one is an extension of gnu date, I believe. The former should
work with most dates...
>P.S. Also, any thoughts as to the best way of being able to send a
>report of their usage for a given time period to a customer?
There's no way in the report currently to restrict the data to a sub-set.
We're working on a from-scratch replacement which will have that
functionality plus new reports... I'm hoping we'll have a preview release
out which has some of that functionality in the next month, though the
final release is going to be inexpensive commercial software (if that's an
issue for you). Let me know if you want to be on the list to try out the
early versions.
If the time period you want to send the data for matches the month splits,
then it's easy enough just to pull their current data, of course. It
sounds like that's not what you're looking for though.
Sean
--
Peppermint Patty gets a DSL line in "YOU'D TELL ME IF YOU WERE IN A GERMAN
SCHEISSE VIDEO WOULDN'T YOU, CHARLIE BROWN"
Sean Reifschneider, Inimitably Superfluous <jafo@tummy.com>
tummy.com - Linux Consulting since 1995. Qmail, KRUD, Firewalls, Python