<html><body><div style="color:#000; background-color:#fff; font-family:verdana, helvetica, sans-serif;font-size:10pt"><div style="font-family: verdana, helvetica, sans-serif; font-size: 10pt; "><span>My current sql.conf looks like below and it does not have accounting sections at all.</span></div><div style="font-family: verdana, helvetica, sans-serif; font-size: 10pt; "><span><br></span></div><div style="font-family: verdana, helvetica, sans-serif; font-size: 10pt; "><span>=========================================================</span></div><div style="font-family: verdana, helvetica, sans-serif; font-size: 10pt; "><span><br></span></div><div><span><font class="Apple-style-span" size="2"><div>[root@br-radius01 raddb]# cat sql.conf</div><div># -*- text -*-</div><div>##</div><div>## sql.conf -- SQL modules</div><div>##</div><div>##
$Id$</div><div><br></div><div>######################################################################</div><div>#</div><div># Configuration for the SQL module</div><div>#</div><div># The database schemas and queries are located in subdirectories:</div><div>#</div><div># sql/DB/schema.sql Schema</div><div># sql/DB/dialup.conf Basic dialup (including policy) queries</div><div># sql/DB/counter.conf counter</div><div># sql/DB/ippool.conf IP Pools in SQL</div><div># sql/DB/ippool.sql schema for IP pools.</div><div>#</div><div># Where "DB" is mysql, mssql, oracle, or postgresql.</div><div>#</div><div><br></div><div>sql {</div><div> #</div><div> # Set the database to one
of:</div><div> #</div><div> # mysql, mssql, oracle, postgresql</div><div> #</div><div> database = "mysql"</div><div><br></div><div> #</div><div> # Which FreeRADIUS driver to use.</div><div> #</div><div> driver = "rlm_sql_${database}"</div><div><br></div><div> # Connection info:</div><div> server = "localhost"</div><div> #port = 3306</div><div> login = "radius"</div><div> password = "radpass"</div><div><br></div><div> # Database table configuration for everything except Oracle</div><div> radius_db = "radius"</div><div>
# If you are using Oracle then use this instead</div><div> # radius_db = "(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521))(CONNECT_DATA=(SID=your_sid)))"</div><div><br></div><div> # If you want both stop and start records logged to the</div><div> # same SQL table, leave this as is. If you want them in</div><div> # different tables, put the start table in acct_table1</div><div> # and stop table in acct_table2</div><div> acct_table1 = "radacct"</div><div> acct_table2 = "radacct"</div><div><br></div><div> # Allow for storing data after authentication</div><div> postauth_table = "radpostauth"</div><div><br></div><div> authcheck_table =
"radcheck"</div><div> authreply_table = "radreply"</div><div><br></div><div> groupcheck_table = "radgroupcheck"</div><div> groupreply_table = "radgroupreply"</div><div><br></div><div> # Table to keep group info</div><div> usergroup_table = "radusergroup"</div><div><br></div><div> # If set to 'yes' (default) we read the group tables</div><div> # If set to 'no' the user MUST have Fall-Through = Yes in the radreply table</div><div> # read_groups = yes</div><div><br></div><div> # Remove stale session if checkrad does not see a double login</div><div> deletestalesessions = yes</div><div><br></div><div> # Print all SQL statements when in debug mode
(-x)</div><div> sqltrace = no</div><div> sqltracefile = ${logdir}/sqltrace.sql</div><div><br></div><div> # number of sql connections to make to server</div><div> num_sql_socks = 5</div><div><br></div><div> # number of seconds to dely retrying on a failed database</div><div> # connection (per_socket)</div><div> connect_failure_retry_delay = 60</div><div><br></div><div> # lifetime of an SQL socket. If you are having network issues</div><div> # such as TCP sessions expiring, you may need to set the socket</div><div> # lifetime. If set to non-zero, any open connections will be</div><div> # closed "lifetime" seconds after they were first
opened.</div><div> lifetime = 0</div><div><br></div><div> # Maximum number of queries used by an SQL socket. If you are</div><div> # having issues with SQL sockets lasting "too long", you can</div><div> # limit the number of queries performed over one socket. After</div><div> # "max_qeuries", the socket will be closed. Use 0 for "no limit".</div><div> max_queries = 0</div><div><br></div><div> # Set to 'yes' to read radius clients from the database ('nas' table)</div><div> # Clients will ONLY be read on server startup. For performance</div><div> # and security reasons, finding clients via SQL queries CANNOT</div><div> # be done "live" while the server is
running.</div><div> #</div><div> #readclients = yes</div><div><br></div><div> # Table to keep radius client info</div><div> nas_table = "nas"</div><div><br></div><div> # Read driver-specific configuration</div><div> $INCLUDE sql/${database}/dialup.conf</div><div>}</div><div><br></div><div>================================================</div><div><br></div><div>Thanks</div></font></span></div><div style="font-family: verdana, helvetica, sans-serif; font-size: 10pt; "> </div><div style="font-family: verdana, helvetica, sans-serif; font-size: 10pt; "><span style="font-family: garamond, 'new york', times, serif; "><font size="3"><span style="color:rgb(0, 0, 255);font-weight:bold;">Hitesh Vinzoda</span><br><span style="font-weight:bold;color:rgb(0, 0, 0);">Network Administrator</span><br
style="font-weight:bold;color:rgb(0, 0, 0);"><span style="font-weight:bold;color:rgb(0, 0, 0);">+91-9924117399<br><span style="color:rgb(0, 0, 255);text-decoration:underline;">www.vinzoda.in</span><br></span><br>"There are 10 types of people in this world.<br>One who can understand binary and other's can't."</font><br><br><br></span><br></div> <div style="font-size: 10pt; font-family: verdana, helvetica, sans-serif; "> <div style="font-size: 12pt; font-family: 'times new roman', 'new york', times, serif; "> <font size="2" face="Arial"> <hr size="1"> <b><span style="font-weight:bold;">From:</span></b> Hitesh Vinzoda <hiteshvinzoda@yahoo.com><br> <b><span style="font-weight: bold;">To:</span></b> FreeRadius users mailing list <freeradius-users@lists.freeradius.org> <br> <b><span style="font-weight: bold;">Sent:</span></b> Friday, 2 December 2011 9:57 PM<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: Radacct update at 3
hours<br> </font> <br><div id="yiv1775120823"><div><div style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); font-size: 10pt; font-family: verdana, helvetica, sans-serif; "><div><span>Hi,</span></div><div><span><br></span></div><div><span>Thanks for your prompt response. Could you please let me know where to include in sql.conf file to call the procedures.</span></div><div><span><br></span></div><div><span>P.S. : we are using freeradius 2.1.10</span></div><div><span><br></span></div><div><span>Thanks</span></div><div> </div><div><span style="font-family: garamond, times, serif; "><font size="3"><span style="color:rgb(0, 0, 255);font-weight:bold;">Hitesh Vinzoda</span><br><span style="font-weight:bold;color:rgb(0, 0, 0);">Network Administrator</span><br style="font-weight:bold;color:rgb(0, 0, 0);"><span style="font-weight:bold;color:rgb(0, 0, 0);">+91-9924117399<br><span style="color:rgb(0, 0,
255);text-decoration:underline;">www.vinzoda.in</span><br></span><br>"There are 10 types of people
in this world.<br>One who can understand binary and other's can't."</font><br><br><br></span><br></div> <div style="font-size: 10pt; font-family: verdana, helvetica, sans-serif; "> <div style="font-size: 12pt; font-family: times, serif; "> <font size="2" face="Arial"> <hr size="1"> <b><span style="font-weight:bold;">From:</span></b> Francois Gaudreault <fgaudreault@inverse.ca><br> <b><span style="font-weight:bold;">To:</span></b> freeradius-users@lists.freeradius.org <br> <b><span style="font-weight:bold;">Sent:</span></b> Friday, 2 December 2011 9:32 PM<br> <b><span style="font-weight:bold;">Subject:</span></b> Re: Radacct update at 3 hours<br> </font> <br><div id="yiv1775120823">
<div>
Maybe my way of doing things is not the right one, but I had to
solve the same issue a while ago. What I did is I changed the
simple update in sql.conf to a stored procedure call, and in my
stored proc, I update the radacct entry, but I also insert another
record into a "log" table. That way I can do my stats easily.<br>
<br>
I am sure there is an easiest way of doing it.<br>
<br>
On 11-12-02 10:22 AM, Hitesh Vinzoda wrote:
<blockquote type="cite">
<div style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); font-size: 10pt; font-family: verdana, helvetica, sans-serif; ">
<div><span>Hi,</span></div>
<div><span><br>
</span></div>
<div><span>We want to have accounting records created every 3
hours in case the users are not disconnected to create
daily/weekly/monthly report.</span></div>
<div><span><br>
</span></div>
<div><span>I have gone through all the steps involved till
modifying the accounting queries in sql.conf, i realized
that my sql.conf is different from one listed at </span><a rel="nofollow" target="_blank" href="http://freeradius.org/radiusd/raddb/sql.conf">http://freeradius.org/radiusd/raddb/sql.conf</a></div>
<div><br>
</div>
<div>Now i stalled that whether to modify. I am using FR 2.1.10.</div>
<div><br>
</div>
<div>LNS is setup to send periodic updates every 3 hours and FR
is updating the records but the acctstarttime is unchanged and
acctstoptime is set to "null" but i can see that the
acctinoctets and output octets are updated. We need to have
separate record created in MYSQL radacct table once received
update from the LNS.</div>
<div><br>
</div>
<div>Any help on this would be appreciated.</div>
<div><br>
</div>
<div>Thanks in advance</div>
<div> </div>
<div><span style="font-family: garamond, times, serif; "><font size="3"><span style="color:rgb(0, 0, 255);font-weight:bold;">Hitesh Vinzoda</span><br>
<span style="font-weight:bold;color:rgb(0, 0, 0);">Network
Administrator</span><br style="font-weight:bold;color:rgb(0, 0, 0);">
<span style="font-weight:bold;color:rgb(0, 0, 0);">+91-9924117399<br>
<span style="color:rgb(0, 0, 255);text-decoration:underline;"><a rel="nofollow" class="yiv1775120823moz-txt-link-abbreviated" target="_blank" href="http://www.vinzoda.in">www.vinzoda.in</a></span><br>
</span><br>
"There are 10 types of people in this world.<br>
One who can understand binary and other's can't."</font><br>
<br>
<br>
</span></div>
</div>
<pre><fieldset class="yiv1775120823mimeAttachmentHeader"></fieldset>
-
List info/subscribe/unsubscribe? See <a rel="nofollow" class="yiv1775120823moz-txt-link-freetext" target="_blank" href="http://www.freeradius.org/list/users.html">http://www.freeradius.org/list/users.html</a>
</pre>
</blockquote>
<br>
<br>
<pre class="yiv1775120823moz-signature">--
Francois Gaudreault, ing. jr
<a rel="nofollow" class="yiv1775120823moz-txt-link-abbreviated" ymailto="mailto:fgaudreault@inverse.ca" target="_blank" href="mailto:fgaudreault@inverse.ca">fgaudreault@inverse.ca</a> :: +1.514.447.4918 (x130) :: <a rel="nofollow" class="yiv1775120823moz-txt-link-abbreviated" target="_blank" href="http://www.inverse.ca">www.inverse.ca</a>
Inverse inc. :: Leaders behind SOGo (<a rel="nofollow" class="yiv1775120823moz-txt-link-abbreviated" target="_blank" href="http://www.sogo.nu">www.sogo.nu</a>) and PacketFence (<a rel="nofollow" class="yiv1775120823moz-txt-link-abbreviated" target="_blank" href="http://www.packetfence.org">www.packetfence.org</a>) </pre>
</div>
</div><br>-<br>List info/subscribe/unsubscribe? See <a rel="nofollow" target="_blank" href="http://www.freeradius.org/list/users.html">http://www.freeradius.org/list/users.html</a><br><br><br> </div> </div> </div></div></div><br>-<br>List info/subscribe/unsubscribe? See <a href="http://www.freeradius.org/list/users.html" target="_blank">http://www.freeradius.org/list/users.html</a><br><br><br> </div> </div> </div></body></html>