<div dir="ltr">Hi,<div><br></div><div><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jun 5, 2013 at 7:43 AM, Miha <span dir="ltr"><<a href="mailto:miha@softnet.si" target="_blank">miha@softnet.si</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hi,<br>
<br>
how does freeradius calculate duration time? </blockquote><div><font face="verdana, sans-serif"><br></font></div><div style><font face="verdana, sans-serif">MySQL query grabs the information from "radacct" </font></div>
<div style><font face="verdana, sans-serif"><br></font></div><div style><font face="verdana, sans-serif">i.e. </font></div><div style><font face="verdana, sans-serif"><br></font></div><div style><span style="font-family:verdana,sans-serif">sqlcounter forevertimecounter {</span><br>
</div><div style><div><font face="verdana, sans-serif"> counter-name = "Max-All-Session-Time"</font></div><div><font face="verdana, sans-serif"> check-name = "Max-All-Session"</font></div>
<div><font face="verdana, sans-serif"> count-attribute = "Acct-Session-Time"</font></div><div><font face="verdana, sans-serif"> reply-name = "Session-Timeout"</font></div>
<div><font face="verdana, sans-serif"> sqlmod-inst = "sql"</font></div><div><font face="verdana, sans-serif"> key = "User-Name"</font></div><div><font face="verdana, sans-serif"> reset = "never"</font></div>
<div><font face="verdana, sans-serif"> cache-size = "5000"</font></div><div><font face="verdana, sans-serif"> <font color="#ff00ff">query = "SELECT IFNULL(SUM(AcctSessionTime),0) FROM radacct WHERE UserName='%{%k}'"</font></font></div>
<div>}</div></div><div> </div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">My NAS sends start and stop packet. In mysql table I can see accstarttime and accstoptime. Is the duration time automaticly created from start time and stop time or should NAS also send duration time?<br>
</blockquote><div><br></div><div style><font face="verdana, sans-serif">No. Value is stored in "radacct"; rlm_sqlcounter sum the total time. </font></div><div> </div><div style><font face="verdana, sans-serif">hope this helps !</font></div>
<div style><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
In other words is it possbile that freeradius automaticly calculate duration from start and stop packet:)?<br>
<br>
tnx!<span class=""><font color="#888888"><br>
<br>
miha<br>
-<br>
List info/subscribe/unsubscribe? See <a href="http://www.freeradius.org/list/users.html" target="_blank">http://www.freeradius.org/<u></u>list/users.html</a><br>
</font></span></blockquote></div><br></div></div></div>