Re: accounting_onoff_query and acctsessiontime = 0

2008-05-18 Thread A . L . M . Buxey
hi,

CVS version (and hence 2.0.5 release) mysql/dialup.conf

  WHERE acctstoptime IS NULL


peter nixon , iirc, caught this one when the work
concerning 0 accounting session stop times was fixed up

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


Re: accounting_onoff_query and acctsessiontime = 0

2008-05-18 Thread Alan DeKok
Tuc at T-B-O-H.NET wrote:
>   I guess then I ask the powers to be to change the "dialup.conf"
> in the sql/mysql directory to use "IS NULL" for accounting_onoff_query
> and probably simul_count_query/simul_verify_query since it currently 
> (FR 2.0.4) says "= NULL" . :)

$ cvs log raddb/sql/mysql/dialup.conf
...

revision 1.8
date: 2008/05/03 17:16:07;  author: pnixon;  state: Exp;  lines: +4 -4
"WHERE acctstoptime = NULL" does NOT do what you think it does!
...

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


Re: accounting_onoff_query and acctsessiontime = 0

2008-05-18 Thread Tuc at T-B-O-H.NET
Hi,

I guess then I ask the powers to be to change the "dialup.conf"
in the sql/mysql directory to use "IS NULL" for accounting_onoff_query
and probably simul_count_query/simul_verify_query since it currently 
(FR 2.0.4) says "= NULL" . :)

Thanks, Tuc
> 
> I am still using the old schema (with AcctStopTime = 0 and usergroup, not
> radusergroup) but correct mysql syntax would be IS NULL.
> 
> http://dev.mysql.com/doc/refman/5.0/en/working-with-null.html
> 
> Ivan Kalik
> Kalik Informatika ISP
> 
> 
> Dana 18/5/2008, "Tuc at T-B-O-H.NET" <[EMAIL PROTECTED]> pi?e:
> 
> >Hi Ivan,
> >
> > Ok, thanks. I like the one that does for all packets, so I've
> >made that change.
> >
> > The other thing I'm finding is that the statement isn't getting
> >all the records anyway. I went into phpMyAdmin and tried to cut/paste
> >from sqltrace.sql, and no records were updated. I went into phpMyAdmin
> >and entered the (now) 3 search fields, and no records. It wasn't until
> >I change "acctstoptime  =  NULL" to "acctstoptime  IS  NULL"
> >did it find the records. (I'm running the 5.0.45-community-log from
> >RPM). I've changed my accounting_onoff_query to be the "IS". Should
> >FR as distributed be changed, or "IS" ( ;) ) there a problem with
> >my server?
> >
> > Thanks, Tuc
> >
> >>
> >> Yes. This query doesn't update sessions that have recieved accounting
> >> update packets but are left open when NAS rebooted. Query in 2.0.4 does
> >> it for those packets as well.
> >>
> >> Ivan Kalik
> >> Kalik Informatika ISP
> >>
> >>
> >> Dana 18/5/2008, "Tuc at T-B-O-H.NET" <[EMAIL PROTECTED]> pi?e:
> >>
> >> >>
> >> >> Hi,
> >> >>
> >> >> For the following :
> >> >>
> >> >> accounting_onoff_query = "\
> >> >>   UPDATE ${acct_table1} \
> >> >>   SET \
> >> >>  acctstoptime   =  '%S', \
> >> >>  acctsessiontime=  unix_timestamp('%S') - \
> >> >>unix_timestamp(acctstarttime), \
> >> >>  acctterminatecause =  '%{Acct-Terminate-Cause}', \
> >> >>  acctstopdelay  =  %{%{Acct-Delay-Time}:-0} \
> >> >>   WHERE acctsessiontime =  0 \
> >> >>   AND acctstoptime  =  NULL \
> >> >>   AND nasipaddress  =  '%{NAS-IP-Address}' \
> >> >>   AND acctstarttime <= '%S'"
> >> >>
> >> >>
> >> >> Why is "acctsessiontime =  0" ? If the unit has been rebooted,
> >> >> the sessions left hanging, why do you search only for zero'd
> >> >> acctsessiontime?
> >> >>
> >> >> Thanks, Tuc
> >> >Hi,
> >> >
> >> >  This changed between 2.0.3 and 2.0.4, didn't it?
> >> >
> >> >  Thanks, Tuc

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

Re: accounting_onoff_query and acctsessiontime = 0

2008-05-18 Thread Ivan Kalik
I am still using the old schema (with AcctStopTime = 0 and usergroup, not
radusergroup) but correct mysql syntax would be IS NULL.

http://dev.mysql.com/doc/refman/5.0/en/working-with-null.html

Ivan Kalik
Kalik Informatika ISP


Dana 18/5/2008, "Tuc at T-B-O-H.NET" <[EMAIL PROTECTED]> piše:

>Hi Ivan,
>
>   Ok, thanks. I like the one that does for all packets, so I've
>made that change.
>
>   The other thing I'm finding is that the statement isn't getting
>all the records anyway. I went into phpMyAdmin and tried to cut/paste
>from sqltrace.sql, and no records were updated. I went into phpMyAdmin
>and entered the (now) 3 search fields, and no records. It wasn't until
>I change "acctstoptime  =  NULL" to "acctstoptime  IS  NULL"
>did it find the records. (I'm running the 5.0.45-community-log from
>RPM). I've changed my accounting_onoff_query to be the "IS". Should
>FR as distributed be changed, or "IS" ( ;) ) there a problem with
>my server?
>
>   Thanks, Tuc
>
>>
>> Yes. This query doesn't update sessions that have recieved accounting
>> update packets but are left open when NAS rebooted. Query in 2.0.4 does
>> it for those packets as well.
>>
>> Ivan Kalik
>> Kalik Informatika ISP
>>
>>
>> Dana 18/5/2008, "Tuc at T-B-O-H.NET" <[EMAIL PROTECTED]> piše:
>>
>> >>
>> >> Hi,
>> >>
>> >>   For the following :
>> >>
>> >> accounting_onoff_query = "\
>> >>   UPDATE ${acct_table1} \
>> >>   SET \
>> >>  acctstoptime   =  '%S', \
>> >>  acctsessiontime=  unix_timestamp('%S') - \
>> >>unix_timestamp(acctstarttime), \
>> >>  acctterminatecause =  '%{Acct-Terminate-Cause}', \
>> >>  acctstopdelay  =  %{%{Acct-Delay-Time}:-0} \
>> >>   WHERE acctsessiontime =  0 \
>> >>   AND acctstoptime  =  NULL \
>> >>   AND nasipaddress  =  '%{NAS-IP-Address}' \
>> >>   AND acctstarttime <= '%S'"
>> >>
>> >>
>> >>   Why is "acctsessiontime =  0" ? If the unit has been rebooted,
>> >> the sessions left hanging, why do you search only for zero'd
>> >> acctsessiontime?
>> >>
>> >>   Thanks, Tuc
>> >Hi,
>> >
>> >This changed between 2.0.3 and 2.0.4, didn't it?
>> >
>> >Thanks, Tuc
>> >-
>> >List info/subscribe/unsubscribe? See 
>> >http://www.freeradius.org/list/usershtml
>> >
>> >
>>
>> -
>> 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: accounting_onoff_query and acctsessiontime = 0

2008-05-18 Thread Tuc at T-B-O-H.NET
Hi Ivan,

Ok, thanks. I like the one that does for all packets, so I've
made that change.

The other thing I'm finding is that the statement isn't getting
all the records anyway. I went into phpMyAdmin and tried to cut/paste
from sqltrace.sql, and no records were updated. I went into phpMyAdmin
and entered the (now) 3 search fields, and no records. It wasn't until
I change "acctstoptime  =  NULL" to "acctstoptime  IS  NULL"
did it find the records. (I'm running the 5.0.45-community-log from
RPM). I've changed my accounting_onoff_query to be the "IS". Should 
FR as distributed be changed, or "IS" ( ;) ) there a problem with 
my server?

Thanks, Tuc

> 
> Yes. This query doesn't update sessions that have recieved accounting
> update packets but are left open when NAS rebooted. Query in 2.0.4 does
> it for those packets as well.
> 
> Ivan Kalik
> Kalik Informatika ISP
> 
> 
> Dana 18/5/2008, "Tuc at T-B-O-H.NET" <[EMAIL PROTECTED]> pi?e:
> 
> >>
> >> Hi,
> >>
> >>For the following :
> >>
> >> accounting_onoff_query = "\
> >>   UPDATE ${acct_table1} \
> >>   SET \
> >>  acctstoptime   =  '%S', \
> >>  acctsessiontime=  unix_timestamp('%S') - \
> >>unix_timestamp(acctstarttime), \
> >>  acctterminatecause =  '%{Acct-Terminate-Cause}', \
> >>  acctstopdelay  =  %{%{Acct-Delay-Time}:-0} \
> >>   WHERE acctsessiontime =  0 \
> >>   AND acctstoptime  =  NULL \
> >>   AND nasipaddress  =  '%{NAS-IP-Address}' \
> >>   AND acctstarttime <= '%S'"
> >>
> >>
> >>Why is "acctsessiontime =  0" ? If the unit has been rebooted,
> >> the sessions left hanging, why do you search only for zero'd
> >> acctsessiontime?
> >>
> >>Thanks, Tuc
> >Hi,
> >
> > This changed between 2.0.3 and 2.0.4, didn't it?
> >
> > Thanks, Tuc
> >-
> >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: accounting_onoff_query and acctsessiontime = 0

2008-05-18 Thread Ivan Kalik
Yes. This query doesn't update sessions that have recieved accounting
update packets but are left open when NAS rebooted. Query in 2.0.4 does
it for those packets as well.

Ivan Kalik
Kalik Informatika ISP


Dana 18/5/2008, "Tuc at T-B-O-H.NET" <[EMAIL PROTECTED]> piše:

>>
>> Hi,
>>
>>  For the following :
>>
>> accounting_onoff_query = "\
>>   UPDATE ${acct_table1} \
>>   SET \
>>  acctstoptime   =  '%S', \
>>  acctsessiontime=  unix_timestamp('%S') - \
>>unix_timestamp(acctstarttime), \
>>  acctterminatecause =  '%{Acct-Terminate-Cause}', \
>>  acctstopdelay  =  %{%{Acct-Delay-Time}:-0} \
>>   WHERE acctsessiontime =  0 \
>>   AND acctstoptime  =  NULL \
>>   AND nasipaddress  =  '%{NAS-IP-Address}' \
>>   AND acctstarttime <= '%S'"
>>
>>
>>  Why is "acctsessiontime =  0" ? If the unit has been rebooted,
>> the sessions left hanging, why do you search only for zero'd
>> acctsessiontime?
>>
>>  Thanks, Tuc
>Hi,
>
>   This changed between 2.0.3 and 2.0.4, didn't it?
>
>   Thanks, Tuc
>-
>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: accounting_onoff_query and acctsessiontime = 0

2008-05-18 Thread Tuc at T-B-O-H.NET
> 
> Hi,
> 
>   For the following :
> 
> accounting_onoff_query = "\
>   UPDATE ${acct_table1} \
>   SET \
>  acctstoptime   =  '%S', \
>  acctsessiontime=  unix_timestamp('%S') - \
>unix_timestamp(acctstarttime), \
>  acctterminatecause =  '%{Acct-Terminate-Cause}', \
>  acctstopdelay  =  %{%{Acct-Delay-Time}:-0} \
>   WHERE acctsessiontime =  0 \
>   AND acctstoptime  =  NULL \
>   AND nasipaddress  =  '%{NAS-IP-Address}' \
>   AND acctstarttime <= '%S'"
> 
> 
>   Why is "acctsessiontime =  0" ? If the unit has been rebooted,
> the sessions left hanging, why do you search only for zero'd
> acctsessiontime?
> 
>   Thanks, Tuc
Hi,

This changed between 2.0.3 and 2.0.4, didn't it?

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


accounting_onoff_query and acctsessiontime = 0

2008-05-18 Thread Tuc at T-B-O-H.NET
Hi,

For the following :

accounting_onoff_query = "\
  UPDATE ${acct_table1} \
  SET \
 acctstoptime   =  '%S', \
 acctsessiontime=  unix_timestamp('%S') - \
   unix_timestamp(acctstarttime), \
 acctterminatecause =  '%{Acct-Terminate-Cause}', \
 acctstopdelay  =  %{%{Acct-Delay-Time}:-0} \
  WHERE acctsessiontime =  0 \
  AND acctstoptime  =  NULL \
  AND nasipaddress  =  '%{NAS-IP-Address}' \
  AND acctstarttime <= '%S'"


Why is "acctsessiontime =  0" ? If the unit has been rebooted,
the sessions left hanging, why do you search only for zero'd
acctsessiontime?

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