Counters reset period
Hey, I've defined a quarterly reset period counter (reset=3m), and when logging-in the %b and %e (beginning of counter and ending of counter periods) I am getting values for beginning which are equal to the 1st of December and ending which is equal to the beginning of March. Meaning, the quarter begins with 1st of December while I would expect it to begin at the 1st of January (being a calendar quarter). Could someone please explain this behavior? Thanks, Liran.
It seems that the counting period is X months until the current month. So if reset=3m is specified and it's now February it will count 3 months earlier (thus, december, january and february). I'm wondering if anybody has some insight regarding yearly recurring quarterly periods (months:1-3,4-6,7-9,10-12). Regards, Liran. On Mon, Feb 15, 2010 at 1:58 PM, liran tal <liransgarage@gmail.com> wrote:
Hey,
I've defined a quarterly reset period counter (reset=3m), and when logging-in the %b and %e (beginning of counter and ending of counter periods) I am getting values for beginning which are equal to the 1st of December and ending which is equal to the beginning of March. Meaning, the quarter begins with 1st of December while I would expect it to begin at the 1st of January (being a calendar quarter).
Could someone please explain this behavior?
Thanks, Liran.
liran tal wrote:
It seems that the counting period is X months until the current month. So if reset=3m is specified and it's now February it will count 3 months earlier (thus, december, january and february).
I'm wondering if anybody has some insight regarding yearly recurring quarterly periods (months:1-3,4-6,7-9,10-12).
Use a cron job && SQL statements. Alan DeKok.
On Mon, Feb 15, 2010 at 5:21 PM, Alan DeKok <aland@deployingradius.com>wrote:
liran tal wrote:
It seems that the counting period is X months until the current month. So if reset=3m is specified and it's now February it will count 3 months earlier (thus, december, january and february).
I'm wondering if anybody has some insight regarding yearly recurring quarterly periods (months:1-3,4-6,7-9,10-12).
Use a cron job && SQL statements.
Alan, could you explain? Since the '3m' reset period didn't work as I expected I patched the rlm_sqlcounter.c to reset counters on a quarterly cycle. Though I'd appreciate to hear from you another approach to this. Regards, Liran Tal.
liran tal wrote:
Use a cron job && SQL statements.
Alan, could you explain?
The counters are stored in a DB. You can reset them any time you want by just editing the DB.
Since the '3m' reset period didn't work as I expected I patched the rlm_sqlcounter.c to reset counters on a quarterly cycle. Though I'd appreciate to hear from you another approach to this.
If it works, fine. Alan DeKok.
On Mon, Feb 15, 2010 at 9:52 PM, Alan DeKok <aland@deployingradius.com>wrote:
liran tal wrote:
Use a cron job && SQL statements.
Alan, could you explain?
The counters are stored in a DB. You can reset them any time you want by just editing the DB.
Which table are we talking about? or are you referring to the detail files? Regards, Liran Tal.
participants (2)
-
Alan DeKok -
liran tal