Discussion:
Interim-Updates
Irina
2007-07-11 18:41:23 UTC
Permalink
Hello all,

We enabled Cisco NAS to send Interim-Updates to the radius server, once an
hour. Everything is great except for the following.

There are users that use a lot of bandwidth. Seems, NAS wraps
Acct-Input-Octets and Acct-Output-Octets at 4 GB. We have few users that
may have their bandwidth reset to 0 within hour. When next Interim-Updates
is sent, we don't have a proper number.

Do I miss something in Radius configuration?

Or is something that has to be handled by NAS?

Any help is appreciated. Thank you.
Irina


-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Stephan Kirsten
2007-07-11 18:55:35 UTC
Permalink
Hello Irina,

please look at this site, it will solve your problem.
http://www.netexpertise.eu/en/FreeRadius/DailyAcct.html

ciao

Stephan
Post by Irina
Hello all,
We enabled Cisco NAS to send Interim-Updates to the radius server, once an
hour. Everything is great except for the following.
There are users that use a lot of bandwidth. Seems, NAS wraps
Acct-Input-Octets and Acct-Output-Octets at 4 GB. We have few users that
may have their bandwidth reset to 0 within hour. When next Interim-Updates
is sent, we don't have a proper number.
Do I miss something in Radius configuration?
Or is something that has to be handled by NAS?
Any help is appreciated. Thank you.
Irina
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Irina
2007-07-11 20:29:30 UTC
Permalink
Thank you very much for quick replies. Our NAS does send Gigawords, great.

I am reading the link Stephan pointed out.

I need to apply it on a live radius server. Just to be safe, I will ask few
questions, if you don't mind.

1. Can I issue mysql queries while radius is running?

2. Can I issue PROCEDURE queries at MYSQL prompt (including comments?), or
should I save it to a file fist then run like
mysql -uroot -prootpass radius < sql.file

3. In the document
Note Don't forget to redefine the delimiter before and after the
procedure or you'll get an error!
is it part of PROCEDURE sql statements. Or... not sure what it means
"to redefine the delimiter"

4. Do I replace only accounting_update_query
Why asking? There are other _alt queries. I don't need to touch them, do
I?


Thanks again.
Irina
==================


----- Original Message -----
From: "Stephan Kirsten" <***@mail.inf.tu-dresden.de>
To: "FreeRadius users mailing list" <freeradius-***@lists.freeradius.org>
Sent: Wednesday, July 11, 2007 2:55 PM
Subject: Re: Interim-Updates
Post by Irina
-
List info/subscribe/unsubscribe? See
http://www.freeradius.org/list/users.html

-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Irina
2007-07-12 20:04:47 UTC
Permalink
I need to apply it according to this document
http://www.netexpertise.eu/en/FreeRadius/DailyAcct.html

Could someone reply with simple yes/no answers? I am going to do it on a
life server. Please.

1. Can I issue mysql queries while radius is running?

2. Can I issue PROCEDURE queries at MYSQL prompt (including comments?), or
should I save it to a file fist then run like
mysql -uroot -prootpass radius < sql.file

3. In the document
"Note Don't forget to redefine the delimiter before and after the
procedure or you'll get an error!"
Is it part of PROCEDURE sql statements. Or... not sure what it means
"to redefine the delimiter"

4. In sql.conf file, do I replace only accounting_update_query
Why asking? There are other "_alt" queries. I don't need to touch them, do
I?


Thank you for your help in advance.
Irina
===================



----- Original Message -----
From: "Irina" <***@nas.net>
To: "FreeRadius users mailing list" <freeradius-***@lists.freeradius.org>
Sent: Wednesday, July 11, 2007 4:29 PM
Subject: Re: Interim-Updates
Post by Irina
Thank you very much for quick replies. Our NAS does send Gigawords, great.
I am reading the link Stephan pointed out.
I need to apply it on a live radius server. Just to be safe, I will ask few
questions, if you don't mind.
1. Can I issue mysql queries while radius is running?
2. Can I issue PROCEDURE queries at MYSQL prompt (including comments?), or
should I save it to a file fist then run like
mysql -uroot -prootpass radius < sql.file
3. In the document
Note Don't forget to redefine the delimiter before and after the
procedure or you'll get an error!
is it part of PROCEDURE sql statements. Or... not sure what it means
"to redefine the delimiter"
4. Do I replace only accounting_update_query
Why asking? There are other _alt queries. I don't need to touch them, do
I?
Thanks again.
Irina
==================
----- Original Message -----
To: "FreeRadius users mailing list"
Sent: Wednesday, July 11, 2007 2:55 PM
Subject: Re: Interim-Updates
Post by Irina
-
List info/subscribe/unsubscribe? See
http://www.freeradius.org/list/users.html
-
List info/subscribe/unsubscribe? See
http://www.freeradius.org/list/users.html
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Hugh Messenger
2007-07-12 20:44:34 UTC
Permalink
Irina said
Post by Irina
I need to apply it according to this document
http://www.netexpertise.eu/en/FreeRadius/DailyAcct.html
Could someone reply with simple yes/no answers? I am going to do it on a
life server. Please.
Firstly, I strongly recommend you set up a test copy of FR with its own test
db, and work on that with a test client, before laying hands on your live
server. Just my $0.02, but you could avoid a lot of pain and heartache that
way. Might take an hour or so to set up, but worth the effort.
Post by Irina
1. Can I issue mysql queries while radius is running?
Yes.
Post by Irina
2. Can I issue PROCEDURE queries at MYSQL prompt (including comments?), or
should I save it to a file fist then run like
mysql -uroot -prootpass radius < sql.file
Either.
Post by Irina
3. In the document
"Note Don't forget to redefine the delimiter before and after the
procedure or you'll get an error!"
Is it part of PROCEDURE sql statements. Or... not sure what it means
"to redefine the delimiter"
The normal SQL command delimiter is the ;, but the stored procedures you
will be defining use ; as an end of line delimiter. So before you enter the
procedures, you have to tell MySQL to use something else as the command
delimiter:

mysql> delimiter ^
mysql> show tables^
+------------------+
| Tables_in_radius |

... then switch it back to ; when you are done. If you cat the commands
from a file (as per your Q2), you'll need to add the delimiter command to
the start of the file.
Post by Irina
4. In sql.conf file, do I replace only accounting_update_query
Why asking? There are other "_alt" queries. I don't need to touch them, do
I?
Nope.
Post by Irina
Thank you for your help in advance.
Irina
-- hugh


-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Irina
2007-07-12 21:04:11 UTC
Permalink
Thank you very much for your clarifications. I will think how to set up a
test environment.

Thanks again.
Irina
==============


----- Original Message -----
From: "Hugh Messenger" <***@alaweb.com>
To: "'FreeRadius users mailing list'"
<freeradius-***@lists.freeradius.org>
Sent: Thursday, July 12, 2007 4:44 PM
Subject: RE: Interim-Updates
Post by Hugh Messenger
Irina said
Post by Irina
I need to apply it according to this document
http://www.netexpertise.eu/en/FreeRadius/DailyAcct.html
Could someone reply with simple yes/no answers? I am going to do it on a
life server. Please.
Firstly, I strongly recommend you set up a test copy of FR with its own test
db, and work on that with a test client, before laying hands on your live
server. Just my $0.02, but you could avoid a lot of pain and heartache that
way. Might take an hour or so to set up, but worth the effort.
Post by Irina
1. Can I issue mysql queries while radius is running?
Yes.
Post by Irina
2. Can I issue PROCEDURE queries at MYSQL prompt (including comments?), or
should I save it to a file fist then run like
mysql -uroot -prootpass radius < sql.file
Either.
Post by Irina
3. In the document
"Note Don't forget to redefine the delimiter before and after the
procedure or you'll get an error!"
Is it part of PROCEDURE sql statements. Or... not sure what it means
"to redefine the delimiter"
The normal SQL command delimiter is the ;, but the stored procedures you
will be defining use ; as an end of line delimiter. So before you enter the
procedures, you have to tell MySQL to use something else as the command
mysql> delimiter ^
mysql> show tables^
+------------------+
| Tables_in_radius |
... then switch it back to ; when you are done. If you cat the commands
from a file (as per your Q2), you'll need to add the delimiter command to
the start of the file.
Post by Irina
4. In sql.conf file, do I replace only accounting_update_query
Why asking? There are other "_alt" queries. I don't need to touch
them,
Post by Hugh Messenger
Post by Irina
do
I?
Nope.
Post by Irina
Thank you for your help in advance.
Irina
-- hugh
-
List info/subscribe/unsubscribe? See
http://www.freeradius.org/list/users.html
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Peter Nixon
2007-07-12 22:02:09 UTC
Permalink
Post by Irina
I need to apply it according to this document
http://www.netexpertise.eu/en/FreeRadius/DailyAcct.html
Hi Irina

Please note that that document describes several things that you can do,
including ONE way to fix your problem. There is and easier and more correct
way to fix your problem simply by fixing the mysql query to work the same
way the existing postgresql query does. The next version of FreeRADIUS will
have this _bug_ fixed.

Regards
--
Peter Nixon
http://peternixon.net/
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Hugh Messenger
2007-07-13 03:06:53 UTC
Permalink
Post by Peter Nixon
There is and easier and more correct
way to fix your problem simply by fixing the mysql query to work the same
way the existing postgresql query does. The next version of FreeRADIUS
will have this _bug_ fixed.
So I presume all we need to do to the 1.1.x MySQL is the "shift gigawords
left and OR it with the octets" thing ...

AcctInputOctets = '%{Acct-Input-Gigawords:-0}' << 32 |
'%{Acct-Input-Octets:-0}', \
AcctOutputOctets = '%{Acct-Output-Gigawords:-0}' << 32 |
'%{Acct-Output-Octets:-0}' \

... in:

accounting_update_query
accounting_update_query_alt
accounting_stop_query
accounting_stop_query_alt
Post by Peter Nixon
Peter Nixon
-- hugh


-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Peter Nixon
2007-07-13 05:17:43 UTC
Permalink
Post by Hugh Messenger
Post by Peter Nixon
There is and easier and more correct
way to fix your problem simply by fixing the mysql query to work the
same way the existing postgresql query does. The next version of
FreeRADIUS will have this _bug_ fixed.
So I presume all we need to do to the 1.1.x MySQL is the "shift gigawords
left and OR it with the octets" thing ...
AcctInputOctets = '%{Acct-Input-Gigawords:-0}' << 32 |
'%{Acct-Input-Octets:-0}', \
AcctOutputOctets = '%{Acct-Output-Gigawords:-0}' << 32 |
'%{Acct-Output-Octets:-0}' \
accounting_update_query
accounting_update_query_alt
accounting_stop_query
accounting_stop_query_alt
Exactly. Although of course your DB columns need to be able to hold the large
numbers as well so they should be of type BIGINT like:

AcctInputOctets bigint(20) default NULL,
AcctOutputOctets bigint(20) default NULL,

I updated the MySQL schema a couple of days ago to reflect this, but have not
updated the default queries yet as I haven't had time to test them. (MySQL
doesn't always accept "standard" SQL and I didnt want to break anything)

If someone has time to test this before I do, please shoot me a mail with
tested working queries for MySQL...

Cheers
--
Peter Nixon
http://peternixon.net/
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Stefan Winter
2007-07-13 06:10:21 UTC
Permalink
Post by Peter Nixon
Exactly. Although of course your DB columns need to be able to hold the
AcctInputOctets bigint(20) default NULL,
AcctOutputOctets bigint(20) default NULL,
I updated the MySQL schema a couple of days ago to reflect this, but have
not updated the default queries yet as I haven't had time to test them.
(MySQL doesn't always accept "standard" SQL and I didnt want to break
anything)
If someone has time to test this before I do, please shoot me a mail with
tested working queries for MySQL...
Hm, Alan commited my fix for this very problem to the HEAD CVS already. I
assume you backported it to 1.1.x? Or did you re-do it? In any case, my fixes
to the queries and schema are tested, running in our production environment
for quite a while.

BTW, that link from the OP on the netexperise.eu web site
(http://www.netexpertise.eu/en/FreeRadius/DailyAcct.html) should really be
amended with the proper instructions to put gigawords into older versions of
FreeRADIUS (adding these extra columns to hold the gigawords and even more
going to the lengths of introducing stored procedures is _really_ hacky). A
set of instructions is in the FreeRADIUS Wiki already:

http://wiki.freeradius.org/FAQ#How_do_I_enable_logging_of_64_bit_counters.2C_a.k.a._Acct-.7BInput.7COutput.7D-Gigawords.3F

Greetings,

Stefan Winter
--
Stefan WINTER

Stiftung RESTENA - Réseau Téléinformatique de l'Education Nationale et de
la Recherche
Ingenieur Forschung & Entwicklung

6, rue Richard Coudenhove-Kalergi
L-1359 Luxembourg
E-Mail: ***@restena.lu     Tel.:    +352 424409-1
http://www.restena.lu               Fax:      +352 422473
Peter Nixon
2007-07-13 07:13:53 UTC
Permalink
Post by Stefan Winter
Post by Peter Nixon
Exactly. Although of course your DB columns need to be able to hold the
AcctInputOctets bigint(20) default NULL,
AcctOutputOctets bigint(20) default NULL,
I updated the MySQL schema a couple of days ago to reflect this, but
have not updated the default queries yet as I haven't had time to test
them. (MySQL doesn't always accept "standard" SQL and I didnt want to
break anything)
If someone has time to test this before I do, please shoot me a mail
with tested working queries for MySQL...
Hm, Alan commited my fix for this very problem to the HEAD CVS already. I
assume you backported it to 1.1.x?
Yes. I thought it had been committed to 1.1.x but couldn't see it and didn't
have time to check. You are correct, it is in CVS head, but I will backport
it to 1.1.x today.
Post by Stefan Winter
Or did you re-do it? In any case, my
fixes to the queries and schema are tested, running in our production
environment for quite a while.
Great.
Post by Stefan Winter
BTW, that link from the OP on the netexperise.eu web site
(http://www.netexpertise.eu/en/FreeRadius/DailyAcct.html) should really be
amended with the proper instructions to put gigawords into older versions
of FreeRADIUS (adding these extra columns to hold the gigawords and even
more going to the lengths of introducing stored procedures is _really_
Yes. You are correct, it IS a hack, and the _wrong_ way to solve the problem.
The information about how to configure ciscos to send gigawords is usefully,
but the other stuff about stored procedures needs fixing.

Stephan, we appreciate you efforts, and we always need more people writing
documentation, but if you could update that page we would appreciate it.
(There are way to many recommendations about FreeRADIUS scattered all over
google which list bad ways to configure things.. Hopefully the wiki is
helping to solve it but it will take time.)
Post by Stefan Winter
http://wiki.freeradius.org/FAQ#How_do_I_enable_logging_of_64_bit_counters.
2C_a.k.a._Acct-.7BInput.7COutput.7D-Gigawords.3F
:-)
--
Peter Nixon
http://peternixon.net/
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Stefan Winter
2007-07-13 07:25:16 UTC
Permalink
Post by Peter Nixon
Stephan, we appreciate you efforts, and we always need more people writing
documentation, but if you could update that page we would appreciate it.
Well, the page isn't a wiki and I am in no way affiliated with the site ops. I
cc'ed their contact address in my previous mail and the registrant of the
domain in this mail, hoping that they'll pick up the advice, but that's about
the only thing I can do.

Greetings,

Stefan
--
Stefan WINTER

Stiftung RESTENA - Réseau Téléinformatique de l'Education Nationale et de
la Recherche
Ingenieur Forschung & Entwicklung

6, rue Richard Coudenhove-Kalergi
L-1359 Luxembourg
E-Mail: ***@restena.lu     Tel.:    +352 424409-1
http://www.restena.lu               Fax:      +352 422473
Peter Nixon
2007-07-13 08:45:38 UTC
Permalink
Post by Stefan Winter
Post by Peter Nixon
Stephan, we appreciate you efforts, and we always need more people
writing documentation, but if you could update that page we would
appreciate it.
Well, the page isn't a wiki and I am in no way affiliated with the site
ops. I cc'ed their contact address in my previous mail and the registrant
of the domain in this mail, hoping that they'll pick up the advice, but
that's about the only thing I can do.
Yep. I was actually referring to Stephan Kirsten who posted the initial
link, not to Stefan Winter :-)

Cheers
--
Peter Nixon
http://peternixon.net/
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Stefan Winter
2007-07-13 08:51:54 UTC
Permalink
Hi,
Post by Peter Nixon
Yep. I was actually referring to Stephan Kirsten who posted the initial
link, not to Stefan Winter :-)
Ah :-) I'm so used to people misspelling my name (the French spelling with ph
is a lot more popular here in Luxembourg), I'm doing an auto s/ph/f/ in my
mind. Sorry about that.

Stefan
--
Stefan WINTER

Stiftung RESTENA - Réseau Téléinformatique de l'Education Nationale et de
la Recherche
Ingenieur Forschung & Entwicklung

6, rue Richard Coudenhove-Kalergi
L-1359 Luxembourg
E-Mail: ***@restena.lu     Tel.:    +352 424409-1
http://www.restena.lu               Fax:      +352 422473
David Roze
2007-07-17 20:56:57 UTC
Permalink
Hi Peter and Stephan,

I will update the page when I get a chance. It isn't the best way to
proceed, you're right...
One thing though, there's confusing between 2 pages with 2 different
problems:

Support for Gigawords in Mysql: I'm not using stored procedures, but adding
an extra field for the Gigawords value. This will be changed with your
solution.

Daily accounting: This gives the ability to create a new record everytime an
interim-update is sent so people can check accounting more frequently and do
not need to wait the session disconnects. Previous values need to be taken
off the new received value to keep total accounting accurate (that's for
Hugh's comment :)
I use a stored procedure and I don't think I have another option to achieve
this !??

David
----
http://www.netexpertise.eu


-----Original Message-----
From: Stefan Winter [mailto:***@restena.lu]
Sent: 13 July 2007 09:25
To: FreeRadius users mailing list
Cc: ***@freesurf.fr
Subject: Re: Interim-Updates
Post by Peter Nixon
Stephan, we appreciate you efforts, and we always need more people writing
documentation, but if you could update that page we would appreciate it.
Well, the page isn't a wiki and I am in no way affiliated with the site ops.
I
cc'ed their contact address in my previous mail and the registrant of the
domain in this mail, hoping that they'll pick up the advice, but that's
about
the only thing I can do.

Greetings,

Stefan
--
Stefan WINTER

Stiftung RESTENA - Réseau Téléinformatique de l'Education Nationale et de
la Recherche
Ingenieur Forschung & Entwicklung

6, rue Richard Coudenhove-Kalergi
L-1359 Luxembourg
E-Mail: ***@restena.lu     Tel.:    +352 424409-1
http://www.restena.lu               Fax:      +352 422473


-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Peter Nixon
2007-07-17 21:11:14 UTC
Permalink
Post by David Roze
Hi Peter and Stephan,
I will update the page when I get a chance. It isn't the best way to
proceed, you're right...
One thing though, there's confusing between 2 pages with 2 different
Support for Gigawords in Mysql: I'm not using stored procedures, but
adding an extra field for the Gigawords value. This will be changed with
your solution.
Great. Thats the main thing I wanted to see fixed.
Post by David Roze
Daily accounting: This gives the ability to create a new record everytime
an interim-update is sent so people can check accounting more frequently
and do not need to wait the session disconnects. Previous values need to
be taken off the new received value to keep total accounting accurate
(that's for Hugh's comment :)
I use a stored procedure and I don't think I have another option to
achieve this !??
Yes. I did read through this and see that you were doing something else also.
I think you should be able to do it with a sub select in Postgresql, and
AFAIK MySQL recently added support for them also. I could be wrong though,
and I have nothing against stored procedures. (I use them extensively myself
on postgres)

I think you solution is usefull, but I would like to see you explain that we
consider the lack of MySQL Gigaword support in FreeRADIUS < 1.1.7 to be a
bug which has been fixed :-)

You may even wish to link to:

http://wiki.freeradius.org/FAQ#Why_do_Acct-Input-Octets_and_Acct-Output-Octets_wrap_at_4_GB

I realise that you have your own site and content is a hard thing to come by,
but if you like we would love to have any tips or tricks like this in the
official FreeRADIUS wiki. Failing that, please feel free to add links to
your articles at appropriate places in the wiki..

Regards
--
Peter Nixon
http://peternixon.net/
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
David Roze
2007-07-17 21:33:30 UTC
Permalink
Thanks Peter, really appreciate it
I will add the links to the wiki on the pages as per your suggestion.
However, I wouldn't add them to the wiki as that's only tricks and tips as
you're mentionning, and they're not really part of the development.
It needs to be kept separated for maintenance and bug fixes

Thanks,
David

-----Original Message-----
From: Peter Nixon [mailto:***@peternixon.net]
Sent: 17 July 2007 23:11
To: FreeRadius users mailing list; David Roze
Subject: Re: Interim-Updates
Post by David Roze
Hi Peter and Stephan,
I will update the page when I get a chance. It isn't the best way to
proceed, you're right...
One thing though, there's confusing between 2 pages with 2 different
Support for Gigawords in Mysql: I'm not using stored procedures, but
adding an extra field for the Gigawords value. This will be changed with
your solution.
Great. Thats the main thing I wanted to see fixed.
Post by David Roze
Daily accounting: This gives the ability to create a new record everytime
an interim-update is sent so people can check accounting more frequently
and do not need to wait the session disconnects. Previous values need to
be taken off the new received value to keep total accounting accurate
(that's for Hugh's comment :)
I use a stored procedure and I don't think I have another option to
achieve this !??
Yes. I did read through this and see that you were doing something else
also.
I think you should be able to do it with a sub select in Postgresql, and
AFAIK MySQL recently added support for them also. I could be wrong though,
and I have nothing against stored procedures. (I use them extensively myself

on postgres)

I think you solution is usefull, but I would like to see you explain that we

consider the lack of MySQL Gigaword support in FreeRADIUS < 1.1.7 to be a
bug which has been fixed :-)

You may even wish to link to:

http://wiki.freeradius.org/FAQ#Why_do_Acct-Input-Octets_and_Acct-Output-Octe
ts_wrap_at_4_GB

I realise that you have your own site and content is a hard thing to come
by,
but if you like we would love to have any tips or tricks like this in the
official FreeRADIUS wiki. Failing that, please feel free to add links to
your articles at appropriate places in the wiki..

Regards
--
Peter Nixon
http://peternixon.net/

-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Peter Nixon
2007-07-13 07:31:12 UTC
Permalink
Post by Stefan Winter
Post by Peter Nixon
Exactly. Although of course your DB columns need to be able to hold the
AcctInputOctets bigint(20) default NULL,
AcctOutputOctets bigint(20) default NULL,
I updated the MySQL schema a couple of days ago to reflect this, but
have not updated the default queries yet as I haven't had time to test
them. (MySQL doesn't always accept "standard" SQL and I didnt want to
break anything)
If someone has time to test this before I do, please shoot me a mail
with tested working queries for MySQL...
Hm, Alan commited my fix for this very problem to the HEAD CVS already. I
assume you backported it to 1.1.x? Or did you re-do it? In any case, my
fixes to the queries and schema are tested, running in our production
environment for quite a while.
BTW, that link from the OP on the netexperise.eu web site
(http://www.netexpertise.eu/en/FreeRadius/DailyAcct.html) should really be
amended with the proper instructions to put gigawords into older versions
of FreeRADIUS (adding these extra columns to hold the gigawords and even
more going to the lengths of introducing stored procedures is _really_
http://wiki.freeradius.org/FAQ#How_do_I_enable_logging_of_64_bit_counters.
2C_a.k.a._Acct-.7BInput.7COutput.7D-Gigawords.3F
I have also changed the FAQ around a little. That section now lives at:

http://wiki.freeradius.org/FAQ#Why_do_Acct-Input-Octets_and_Acct-Output-Octets_wrap_at_4_GB.3F

I think it better describes the symptom (which is what people reading FAQs
are searching for) rather then the problem. I have linked the old section to
the new section so no links go missing.

Cheers
--
Peter Nixon
http://peternixon.net/
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Stefan Winter
2007-07-13 07:44:23 UTC
Permalink
Post by Peter Nixon
http://wiki.freeradius.org/FAQ#Why_do_Acct-Input-Octets_and_Acct-Output-Oct
ets_wrap_at_4_GB.3F
I think it better describes the symptom (which is what people reading FAQs
are searching for) rather then the problem. I have linked the old section
to the new section so no links go missing.
Ah, great. I've just amended it: include the case where the NAS is to blame.
It's not like these wraps are always FRs fault :-)

Stefan
--
Stefan WINTER

Stiftung RESTENA - Réseau Téléinformatique de l'Education Nationale et de
la Recherche
Ingenieur Forschung & Entwicklung

6, rue Richard Coudenhove-Kalergi
L-1359 Luxembourg
E-Mail: ***@restena.lu     Tel.:    +352 424409-1
http://www.restena.lu               Fax:      +352 422473
Hugh Messenger
2007-07-13 15:58:18 UTC
Permalink
Post by Peter Nixon
If someone has time to test this before I do, please shoot me a mail with
tested working queries for MySQL...
I'm testing today, I'll get back to you.

BTW, one thing that always confused me about the stored procure hack was
that it sums the values from the update with previous values in the db from
that session. But I always thought interim updates were cumulative, i.e.
the values are the totals since the start of that session, NOT since the
last update. So I could never quite understood why the stored procedures
needed to bother about previous values from the session.

Not an issue as I'm not using that hack. But confusing none the less.
Post by Peter Nixon
Peter Nixon
-- hugh


-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Peter Nixon
2007-07-13 16:32:31 UTC
Permalink
Post by Hugh Messenger
Post by Peter Nixon
If someone has time to test this before I do, please shoot me a mail
with tested working queries for MySQL...
I'm testing today, I'll get back to you.
Well, check the code I committed 5min ago to cvs AND 1.1.x branch. I had a
stab at it myself as Alan wants to release 1.1.7 on Monday and I wanted to
have it in. I hope it works. Positive (or negative) reports before Monday
would be great :-)
Post by Hugh Messenger
BTW, one thing that always confused me about the stored procure hack was
that it sums the values from the update with previous values in the db
from that session. But I always thought interim updates were cumulative,
i.e. the values are the totals since the start of that session, NOT since
the last update. So I could never quite understood why the stored
procedures needed to bother about previous values from the session.
Not an issue as I'm not using that hack. But confusing none the less.
Yeah. I never bothered to use it. It was much easier just to fix the
queries...
--
Peter Nixon
http://peternixon.net/
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Hugh Messenger
2007-07-11 18:58:51 UTC
Permalink
Post by Irina
There are users that use a lot of bandwidth. Seems, NAS wraps
Acct-Input-Octets and Acct-Output-Octets at 4 GB. We have few users that
may have their bandwidth reset to 0 within hour. When next Interim-
Updates
is sent, we don't have a proper number.
Do I miss something in Radius configuration?
Or is something that has to be handled by NAS?
The NAS should also send Acct-Input-Gigawords and Acct-Output-Gigawords as
well, if it has had to wrap the octets attributes.
Post by Irina
Irina
-- hugh


-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Peter Nixon
2007-07-11 19:32:58 UTC
Permalink
Post by Irina
Hello all,
We enabled Cisco NAS to send Interim-Updates to the radius server, once
an hour. Everything is great except for the following.
There are users that use a lot of bandwidth. Seems, NAS wraps
Acct-Input-Octets and Acct-Output-Octets at 4 GB. We have few users that
may have their bandwidth reset to 0 within hour. When next
Interim-Updates is sent, we don't have a proper number.
Do I miss something in Radius configuration?
Or is something that has to be handled by NAS?
Any help is appreciated. Thank you.
Hi Irina

Please check your accounting detail file. If the records have
Acct-Input-Gigawords and Acct-Output-Gigawords in them, then your NAS is
sending you the extra information you need when the 32bit counts wrap but
you are not logging that info to your sql database.

The default postgresql configuration has handled Acct-*-Gigawords correctly
for several years, but we only recently updates the MySQL configuration to
do so. The next release 1.1.7 (and/or 2.0) will have the correct support by
default for mysql, but in the mean time you should replace your sql.conf (I
am assuming that you are using mysql) with the one from current cvs

Regards
--
Peter Nixon
http://peternixon.net/
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Loading...