adding a stop packet

Jonathan De Graeve Jonathan.De.Graeve at imelda.be
Tue Oct 25 21:11:35 CEST 2005


I use automatic timestamps on update /default and run a script every
minute to check if there are some records which hasn't been updated for
15minutes or more

J.

--
Jonathan De Graeve
Network/System Administrator
Imelda vzw
Informatica Dienst
015/50.52.98
Jonathan.de.graeve at imelda.be

-----Oorspronkelijk bericht-----
Van: freeradius-users-bounces at lists.freeradius.org
[mailto:freeradius-users-bounces at lists.freeradius.org] Namens Michael
Markstaller
Verzonden: dinsdag 25 oktober 2005 20:58
Aan: FreeRadius users mailing list
Onderwerp: RE: adding a stop packet

I'm running something like this from crontab:

UPDATE radacct SET AcctStopTime =
FROM_UNIXTIME(unix_timestamp(AcctStartTime) + AcctSessionTime),
AcctTerminateCause = 'NoStopRecv', AcctStopDelay =
(unix_timestamp(now()) - (unix_timestamp(AcctStartTime) +
AcctSessionTime)), AcctSessionTime = AcctSessionTime + 300 WHERE
AcctStopTime = '' AND (unix_timestamp(now()) -
(unix_timestamp(AcctStartTime) + AcctSessionTime)) > 3660 AND
AcctSessiontime > 0 ;
UPDATE radacct SET AcctStopTime = AcctStartTime, AcctTerminateCause =
'NoStop-AliveRecv', AcctStopDelay = (unix_timestamp(now()) -
(unix_timestamp(AcctStartTime))) WHERE AcctStopTime = '' AND
AcctSessionTime = 0 AND (unix_timestamp(now()) -
unix_timestamp(AcctStartTime)) > 86400 ;

/* Purge failed attempts */
DELETE FROM radacct WHERE AcctStopTime > 0 AND AcctSessionTime = 0 AND
AcctStopTime <= DATE_SUB(CURDATE(),INTERVAL 7 DAY);
 
Michael

> -----Original Message-----
> From: freeradius-users-bounces at lists.freeradius.org 
> [mailto:freeradius-users-bounces at lists.freeradius.org] On 
> Behalf Of Chuck
> Sent: Tuesday, October 25, 2005 8:30 PM
> To: freeradius-users at lists.freeradius.org
> Subject: adding a stop packet
> 
> 
> We are using freeradius with mysql. Is there some kind of 
> script to easily add 
> a fake stop date/time to a user when one gets missed? 
> Currently I am looking 
> them up in the accounting table and manually editing the 
> entry. Would like to 
> find something that just takes username as input and creates 
> a stop based on 
> current date/time. We don't use the accounting for anything 
> other than 
> getting usage reports so if a few users are incorrect , no matter.
> 
> This happens frequently ( several times a week) that we don't 
> get stop packets 
> from our upstream. Then when users attempt a login, 
> simultaneous use check 
> item kicks in and denies them. They claim there is nothing 
> they can do about 
> it.
> 
> -- 
> 
> Chuck
> 
> - 
> List info/subscribe/unsubscribe? See 
> http://www.freeradius.org/list/users.html
> 

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







More information about the Freeradius-Users mailing list