Hi,

Please find my radius -X output.

Now, for some reason. It give this error:

sqlcounter_expand:  'SELECT IFNULL(SUM(acctsessiontime -     GREATEST((0 - UNIX_TIMESTAMP(acctstarttime)), 0)),0)     FROM radacct WHERE username = '%{User-Name}' AND     UNIX_TIMESTAMP(acctstarttime) + acctsessiontime > '0''
(9) ERROR: noresetcounter : %{sql:SELECT IFNULL(SUM(acctsessiontime -     GREATEST((%b - UNIX_TIMESTAMP(acctstarttime)), 0)),0)     FROM radacct WHERE username = '%{%k}' AND     UNIX_TIMESTAMP(acctstarttime) + acctsessiontime > '%b'}SELECT IFNULL(SUM(acctsessiontime -     GREATEST((0 - UNIX_TIMESTAMP(acctstarttime)), 0)),0)     FROM radacct WHERE username = '%{User-Name}' AND     UNIX_TIMESTAMP(acctstarttime) + acctsessiontime > '0'}
(9) ERROR: noresetcounter :                                                         ^ Invalid variable expansion


This is my sqlcounter

sqlcounter noresetcounter {
        sql_module_instance = sql
        #dialect = ${sql_module_instance}.dialect
        dialect = mysql
        counter_name = Daily-Session-Time
        check_name = Max-Daily-Session
        reply_name = Session-Timeout
        key = User-Name
        reset = never
query = "SELECT IFNULL(SUM(acctsessiontime - \
    GREATEST((%b - UNIX_TIMESTAMP(acctstarttime)), 0)),0) \
    FROM radacct WHERE username = '%{%k}' AND \
    UNIX_TIMESTAMP(acctstarttime) + acctsessiontime > '%b'"
}




On Mon, May 12, 2014 at 8:21 PM, Alan DeKok <aland@deployingradius.com> wrote:
* wrote:
>
> Thank you for your reply.
>
> Here is my radius -X

  No, it's not.  You need to post ALL of it.

  And don't add extra blank lines.  Or ">" quote markers.  It's
annoying.  Just attach a text file.  If it's too big for the list (100K)
gzip it, and then attach it.

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