Not real account stop records ,
Hi All Any one have an Idea about this problem , I changed the account priodic update in my NASes to be 25 Min , and all works good except when a session starts , I found in Acc Start time : 2008-09-28 03:58:56 and Acc Stopt time : 0000-00-00 00:00:00 And this is good , After a period I found the below Acc Start time : 2008-09-28 03:58:56 and Acc Stopt time : 2008-09-28 03:58:56 although the customer is connected and the accounts work good , This is what appears on the radius radaccount txt files , Sun Sep 28 03:58:56 2008 Acct-Session-Id = "000008C7" Framed-Protocol = PPP Acct-Authentic = RADIUS User-Name = "testuser" Acct-Status-Type = Start NAS-Port-Type = Virtual NAS-Port = 0 Service-Type = Framed-User NAS-IP-Address = 10.1.1.158 Acct-Delay-Time = 0 Client-IP-Address = 10.1.1.158 Acct-Unique-Session-Id = "5fe4d7463e8b93f8" Timestamp = 1222567136 Sun Sep 28 04:23:24 2008 Acct-Session-Id = "000008C7" Framed-Protocol = PPP Framed-IP-Address =62.139.42.151 Acct-Session-Time = 1468 Acct-Input-Octets = 23642 Acct-Output-Octets = 18730 Acct-Input-Packets = 536 Acct-Output-Packets = 367 Acct-Authentic = RADIUS User-Name = "0402882105-assas" Acct-Status-Type = Interim-Update NAS-Port-Type = Virtual NAS-Port = 0 Service-Type = Framed-User NAS-IP-Address = 10.1.1.158 Acct-Delay-Time = 0 Client-IP-Address = 10.1.1.158 Acct-Unique-Session-Id = "5fe4d7463e8b93f8" Timestamp = 1222568604 Notice : I didn't make any changes in radacct table as the default value for all accstart time and accstop time is 0000-00-00 00:00:00 AcctStartTime datetime No 0000-00-00 00:00:00 <http://tbl_alter.php?db=radius&table=radacct&token=e6bf77f29ce5708c69a2619802fdb7b5&goto=tbl_structure.php&back=tbl_structure.php&field=AcctStartTime> AcctStopTime datetime No 0000-00-00 00:00:00 Waiting your reply as soon as possible , Regards
On Mon, 2008-09-29 at 05:49 +0200, AHMED KHIDR wrote:
Hi All
Any one have an Idea about this problem ,
I changed the account priodic update in my NASes to be 25 Min , and all works good except
when a session starts , I found in Acc Start time : 2008-09-28 03:58:56 and Acc Stopt time : 0000-00-00 00:00:00
And this is good ,
After a period I found the below
Acc Start time : 2008-09-28 03:58:56 and Acc Stopt time : 2008-09-28 03:58:56
although the customer is connected and the accounts work good ,
What is the problem? You have enabled Periodic (interim) updates from your NAS to be sent to you every 25 minutes - and its trying to do that. It saves the latest value (from an SQL point of view) in the Acct Stop record, along with the current Bytes-in, Bytes-out - etc. In my system - I have a variable in my DB called "AcctLastSeen" - which is defined the same as "AcctStop" - and have the following in my sql.conf file:- accounting_update_query = "UPDATE ${acct_table1} \ SET FramedIPAddress = '%{Framed-IP-Address}', \ AcctSessionTime = '%{Acct-Session-Time}', \ AcctInputOctets = '%{Acct-Input-Gigawords:-0}' << 32 | '%{Acct-Input-Octets:-0}', \ AcctOutputOctets = '%{Acct-Output-Gigawords:-0}' << 32 | '%{Acct-Output-Octets:-0}', \ AcctLastSeen = current_timestamp, \ flag = 'C' \ WHERE AcctSessionId = '%{Acct-Session-Id}' \ AND UserName = '%{SQL-User-Name}' \ AND NASIPAddress= '%{NAS-IP-Address}'" ...thus keeping the Start, Stop and Interim values separated. Initially, AcctStop will be blank and AcctStart and AcctLastSeen have the same value. Then, about once an hour (my Update Interval), AcctLastSeen will increase - until there is a STOP record - when AcctLastSeen will be the same as AcctStop. (My "flag-'C'" is to indicate there has been an Update on this record - so I can check whether this ADSL customer has reached their cap or not.)
This is what appears on the radius radaccount txt files ,
Sun Sep 28 03:58:56 2008 Acct-Session-Id = "000008C7" Framed-Protocol = PPP Acct-Authentic = RADIUS User-Name = "testuser" Acct-Status-Type = Start NAS-Port-Type = Virtual NAS-Port = 0 Service-Type = Framed-User NAS-IP-Address = 10.1.1.158 Acct-Delay-Time = 0 Client-IP-Address = 10.1.1.158 Acct-Unique-Session-Id = "5fe4d7463e8b93f8" Timestamp = 1222567136
Sun Sep 28 04:23:24 2008 Acct-Session-Id = "000008C7" Framed-Protocol = PPP Framed-IP-Address =62.139.42.151 Acct-Session-Time = 1468 Acct-Input-Octets = 23642 Acct-Output-Octets = 18730 Acct-Input-Packets = 536 Acct-Output-Packets = 367 Acct-Authentic = RADIUS User-Name = "0402882105-assas" Acct-Status-Type = Interim-Update NAS-Port-Type = Virtual NAS-Port = 0 Service-Type = Framed-User NAS-IP-Address = 10.1.1.158 Acct-Delay-Time = 0 Client-IP-Address = 10.1.1.158 Acct-Unique-Session-Id = "5fe4d7463e8b93f8" Timestamp = 1222568604
Notice : I didn't make any changes in radacct table as the default value for all accstart time and accstop time is 0000-00-00 00:00:00
AcctStartTime datetime
No 0000-00-00 00:00:00
AcctStopTime datetime
No 0000-00-00 00:00:00
Waiting your reply as soon as possible ,
Regards
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html -- . . ___. .__ Posix Systems - Sth Africa. e.164 VOIP ready /| /| / /__ mje@posix.co.za - Mark J Elkins, Cisco CCIE / |/ |ARK \_/ /__ LKINS Tel: +27 12 807 0590 Cell: +27 82 601 0496
participants (3)
-
AHMED KHIDR -
Alan DeKok -
Mark Elkins