Wordpress Themes - Find jobs - Debt Consolidation - Jobs search - Debt Consolidation

PDA

View Full Version : Integrating with FreeRADIUS (MySQL)


Sam at DoorPI
Jul 23rd 2004, 1:12 pm
Just wondering if anyone has done this before. I'm trying to get Optigold to import usage stats from a server running the latest ver of FreeRadius and MySQL.

The date format doesn't seem to match up between the radacct table and Optigold's "SQL Statement to View Usage History"

I've been using PuTTY to login and run an SQL query to get usage info up to this point. (Serious pain in the neck)

digitalpoint
Jul 23rd 2004, 1:14 pm
What date format is it in on your end?

Sam at DoorPI
Jul 23rd 2004, 1:31 pm
Date example: 2004-03-30 13:15:09

Here's an SQL query I had tried for the monthly usage:
SELECT login,count(login),sum(seconds),sum(bandwidth) FROM usagetable WHERE date >= '<Y1>-<M1>-<D1>' AND date <= '<Y2>-<M2>-<D2>' GROUP BY login

I think the hh:mm:ss format is throwing it off.

digitalpoint
Jul 23rd 2004, 1:45 pm
If that's the case, you could hard code a time... like so:

SELECT login,count(login),sum(seconds),sum(bandwidth) FROM usagetable WHERE date >= '<Y1>-<M1>-<D1> 00:00:00' AND date <= '<Y2>-<M2>-<D2> 00:00:00' GROUP BY login