Difference between revisions of "Freeside:1.7:Documentation:Developer/bin/freeside-sqlradius-radacctd"

From Freeside
Jump to: navigation, search
(import from POD)
 
m (Edit via perl MediaWiki framework (1.13))
 
Line 7: Line 7:
 
</code>
 
</code>
 
==DESCRIPTION==
 
==DESCRIPTION==
Imports records from an the SQL radacct tables of all sqlradius, sqlradius_withdomain and radiator exports (except those with the ignore_accounting flag) and updates the svc_acct.seconds for each account. Runs as a daemon and updates the database in real-time.
+
Imports records from an the SQL radacct tables of all sqlradius, sqlradius_withdomain and radiator exports (except those with the ignore_accounting flag) and updates the following fields in svc_acct (see [[Freeside:1.7:Documentation:Developer/FS/svc acct|FS::svc_acct]]) for each account: last_login, last_logout, seconds, upbytes, downbytes, totalbytes. Runs as a daemon and updates the database in real-time.
  
 
'''username''' is a username added by freeside-adduser.
 
'''username''' is a username added by freeside-adduser.
  
 
==RADIUS DATABASE CHANGES==
 
==RADIUS DATABASE CHANGES==
 +
In 1.7.4+, freeside-upgrade should have taken care of these changes already.
 +
 
ALTER TABLE radacct ADD COLUMN FreesideStatus varchar(32) NULL;
 
ALTER TABLE radacct ADD COLUMN FreesideStatus varchar(32) NULL;
  

Latest revision as of 13:07, 23 July 2009

NAME

freeside-sqlradius-radacctd - Real-time radacct import daemon

SYNOPSIS

 freeside-sqlradius-radacctd username

DESCRIPTION

Imports records from an the SQL radacct tables of all sqlradius, sqlradius_withdomain and radiator exports (except those with the ignore_accounting flag) and updates the following fields in svc_acct (see FS::svc_acct) for each account: last_login, last_logout, seconds, upbytes, downbytes, totalbytes. Runs as a daemon and updates the database in real-time.

username is a username added by freeside-adduser.

RADIUS DATABASE CHANGES

In 1.7.4+, freeside-upgrade should have taken care of these changes already.

ALTER TABLE radacct ADD COLUMN FreesideStatus varchar(32) NULL;

If you want to ignore the existing accountg records, also do:

UPDATE radacct SET FreesideStatus = 'done' WHERE FreesideStatus IS NULL;

SEE ALSO