Re: Accounting and power cycles.

'Most Excellent' Eric Mehlhaff (mehlhaff@crl.com)
Fri, 17 Nov 1995 14:05:25 -0800

Victor Muslin <vmuslin@wp.prodigy.com> recently wrote:

>> I'm working on a new Radius daemon, and as I read and reread the
>> accounting draft, the following scene keeps slapping me in the face.
>>
>> a) Customer with a pay-by-hour account signs on.
>>
>> b) Radacct starts an invoice for the customer session.
>>
>> c) PortMaster freezes for some reason. (All non-trivial systems
>> contain bugs after all.)
>>
>> d) Shop lacky power-cycles PM.
>>
>> e) Invoice is never brought to a close and session billing skyrockets.
>> customers, and ISP loses significant revenue.
>>
>> Is it just me, or do people think the PM should send some unforgeable
>> message on each power cycle. I have suggested a protocol, however I
>> never received a reply from Livingston. What is the appropriate manner
>> for suggesting additiond to the RADIUS Accounting draft?
>>
>In one of the previous messages syslog was mentioned. While this may
>work with Livingston portmaster, it is by no means certain that every
>NAS writes to syslog. This is a PROTOCOL issue.
>

Sounds to me like maybe you solve the problem by having the portmaster
regularly send in an accounting packet of current connections, sort of
like a 'STOP' record, but more of a 'checkpoint' record. The accounting
daemon remembers those, and discards them if it gets a valid STOP record, but
if it instead gets a 'portmaster reboot' record, treats the last received
'checkpoint' for any connections on that portmaster as if it were a STOP
record. The only billable time you'd lose is the time between last checkpoint
and the reboot.

Of course, then you'd have the accounting server bogged down with lots of
regularly reported checkpoint records. You'd almost have to make the
checkpoint frequency configurable.

Eric Mehlhaff, mehlhaff@crl.com