Re: Acct-Session-Time inside interim-updates, its ok?

2012-04-15 Thread Alan DeKok
Luis Diaz wrote:
> Hello, im debugging a problem in a Freeradius/Mikrotik setup with 3 NAS
> and 1 Freeradius setup, ~ 3K users onlineand getting Stale Sessions,
> after a lot of googling and digging i found something curious...
> Accounting requests Packets do include the Acct-Session-Time attribute,
> which the RFC says should only go only if Acct-Status-Type is a STOP one
> Am I missing something here?

  No.  It's fine.

> How does freeradius act on this case?

  It logs the session time.

> Also, Timestamp is UTC, while mysql shows local timeis this ok?

  Yes.

  Alan DeKok.
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


RE: Interim-Updates

2007-07-17 Thread David Roze
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:[EMAIL PROTECTED] 
Sent: 17 July 2007 23:11
To: FreeRadius users mailing list; David Roze
Subject: Re: Interim-Updates

On Tue 17 Jul 2007, David Roze wrote:
> 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.

Great. Thats the main thing I wanted to see fixed.

> 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


Re: Interim-Updates

2007-07-17 Thread Peter Nixon
On Tue 17 Jul 2007, David Roze wrote:
> 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.

Great. Thats the main thing I wanted to see fixed.

> 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


RE: Interim-Updates

2007-07-17 Thread 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
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:[EMAIL PROTECTED] 
Sent: 13 July 2007 09:25
To: FreeRadius users mailing list
Cc: [EMAIL PROTECTED]
Subject: Re: Interim-Updates

> 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: [EMAIL PROTECTED]     Tel.:     +352 424409-1
http://www.restena.lu                Fax:      +352 422473


- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


Re: Interim-Updates

2007-07-13 Thread Peter Nixon
On Fri 13 Jul 2007, Hugh Messenger wrote:
> Peter Nixon said:
> > On Fri 13 Jul 2007, Hugh Messenger wrote:
> > 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 :-)

> 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


RE: Interim-Updates

2007-07-13 Thread Hugh Messenger
Peter Nixon said:
> On Fri 13 Jul 2007, Hugh Messenger wrote:
> 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.

> Peter Nixon

   -- hugh


- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


Re: Interim-Updates

2007-07-13 Thread Stefan Winter
Hi,

> 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: [EMAIL PROTECTED]     Tel.:     +352 424409-1
http://www.restena.lu                Fax:      +352 422473


signature.asc
Description: This is a digitally signed message part.
- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Re: Interim-Updates

2007-07-13 Thread Peter Nixon
On Fri 13 Jul 2007, Stefan Winter wrote:
> > 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


Re: Interim-Updates

2007-07-13 Thread Stefan Winter
> 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-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: [EMAIL PROTECTED]     Tel.:     +352 424409-1
http://www.restena.lu                Fax:      +352 422473


signature.asc
Description: This is a digitally signed message part.
- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Re: Interim-Updates

2007-07-13 Thread Peter Nixon
On Fri 13 Jul 2007, Stefan Winter wrote:
> > 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...
>
> 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

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


Re: Interim-Updates

2007-07-13 Thread Stefan Winter
> 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: [EMAIL PROTECTED]     Tel.:     +352 424409-1
http://www.restena.lu                Fax:      +352 422473


signature.asc
Description: This is a digitally signed message part.
- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Re: Interim-Updates

2007-07-13 Thread Peter Nixon
On Fri 13 Jul 2007, Stefan Winter wrote:
> > 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...
>
> 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.

> 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.

> 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:

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.)

> 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


Re: Interim-Updates

2007-07-12 Thread Stefan Winter
> 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...

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: [EMAIL PROTECTED]     Tel.:     +352 424409-1
http://www.restena.lu                Fax:      +352 422473


signature.asc
Description: This is a digitally signed message part.
- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Re: Interim-Updates

2007-07-12 Thread Peter Nixon
On Fri 13 Jul 2007, Hugh Messenger wrote:
> > 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

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


RE: Interim-Updates

2007-07-12 Thread Hugh Messenger
> 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

> Peter Nixon

   -- hugh


- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


Re: Interim-Updates

2007-07-12 Thread Peter Nixon
On Thu 12 Jul 2007, Irina wrote:
> 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


Re: Interim-Updates

2007-07-12 Thread Irina
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" <[EMAIL PROTECTED]>
To: "'FreeRadius users mailing list'"

Sent: Thursday, July 12, 2007 4:44 PM
Subject: RE: Interim-Updates


> Irina said
> > 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.
>
> > 1.  Can I issue mysql queries while radius is running?
>
> Yes.
>
> > 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.
>
> > 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.
>
> > 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.
>
> > 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


RE: Interim-Updates

2007-07-12 Thread Hugh Messenger
Irina said
> 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.

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

Yes.
 
> 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.

> 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.
 
> 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.

> Thank you for your help in advance.
> Irina

   -- hugh


- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


Re: Interim-Updates

2007-07-12 Thread 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.

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" <[EMAIL PROTECTED]>
To: "FreeRadius users mailing list" 
Sent: Wednesday, July 11, 2007 4:29 PM
Subject: Re: Interim-Updates


> 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" <[EMAIL PROTECTED]>
> To: "FreeRadius users mailing list"

> Sent: Wednesday, July 11, 2007 2:55 PM
> Subject: Re: Interim-Updates
>
>
> > -
> > 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


Re: Interim-Updates

2007-07-11 Thread 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 - 
From: "Stephan Kirsten" <[EMAIL PROTECTED]>
To: "FreeRadius users mailing list" 
Sent: Wednesday, July 11, 2007 2:55 PM
Subject: Re: Interim-Updates


> -
> List info/subscribe/unsubscribe? See
http://www.freeradius.org/list/users.html

- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


Re: Interim-Updates

2007-07-11 Thread Peter Nixon
On Wed 11 Jul 2007, Irina wrote:
> 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


RE: Interim-Updates

2007-07-11 Thread Hugh Messenger
Irina said:
> 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.

> Irina

   -- hugh


- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


Re: Interim-Updates

2007-07-11 Thread Stephan Kirsten
Hello Irina,

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

ciao

Stephan

Irina schrieb:
> 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
>   


smime.p7s
Description: S/MIME Cryptographic Signature
- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Interim-Updates

2007-07-11 Thread 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