Hi, Is there a procedure to follow to ask for a new feature to be added? I seem to have some sort of anomoly that sqltrace is active in my server even though its not in debug mode. Thats not a big deal. What I would like, though, is in src/modules/rlm_sql/sql.c for a timestamp to prepend the sql output. I'm trying to track down the last time a specific unit sent an accounting record, and I'd like to track it down to a time. Unfortunately, the sql statement is : UPDATE radacct SET framedipaddress = '192.168.182.2', acctsessiontime = '4032', acctinputoctets = '0' << 32 | '4028824', acctoutputoctets = '0' << 32 | '2535198' WHERE acctsessionid = '481f035100000001' AND username = 'gasmac6' AND nasipaddress = '192.168.50.35'; I realize I could add acctsessiontime to the original : INSERT INTO radacct (acctsessionid, acctuniqueid, username, realm, nasipaddress, nasportid, nasporttype, acctstarttime, acctstoptime, acctsessiontime, acctauthentic, connectinfo_start, connectinfo_stop, acctinputoctets, acctoutputoctets, calledstationid, callingstationid, acctterminatecause, servicetype, framedprotocol, framedipaddress, acctstartdelay, acctstopdelay, xascendsessionsvrkey) VALUES ('481f035100000001', 'dbbf6395a6c658d9', 'gasmac6', '', '192.168.50.35', '1', 'Wireless-802.11', '2008-05-05 13:11:36', NULL, '0', '', '', '', '0', '0', '00-16-01-D2-AE-F8', '00-13-02-B5-79-7C', '', '', '', '192.168.182.2', '0', '0', ''); and come up with the time... But I'd prefer to have confirmation it was 4032 later in reality. Thanks, Tuc
Hi,
Is there a procedure to follow to ask for a new feature to be added?
ask here.... :-)
I seem to have some sort of anomoly that sqltrace is active in my server even though its not in debug mode. Thats not a big deal.
no. that'll be right. sqltrace is nothing directly to do with server debug mode - its a debug mode of the sql module - its enabled and disabled in sql.conf alan
I seem to have some sort of anomoly that sqltrace is active in my server even though its not in debug mode. Thats not a big deal.
no. that'll be right. sqltrace is nothing directly to do with server debug mode - its a debug mode of the sql module - its enabled and disabled in sql.conf
But the comments are : # Print all SQL statements when in debug mode (-x) sqltrace = yes sqltracefile = ${logdir}/sqltrace.sql I'm not in "-x" mode : [root@ports raddb]# ps ax|grep rad|grep -v gre 29294 ? Ssl 0:00 /usr/local/sbin/radiusd Its not that I *DONT* want it, I really do want it. Its just that the comments led me to believe otherwise. Thanks, Tuc
Tuc at T-B-O-H.NET wrote:
I seem to have some sort of anomoly that sqltrace is active in my server even though its not in debug mode. Thats not a big deal. no. that'll be right. sqltrace is nothing directly to do with server debug mode - its a debug mode of the sql module - its enabled and disabled in sql.conf
But the comments are :
# Print all SQL statements when in debug mode (-x) sqltrace = yes sqltracefile = ${logdir}/sqltrace.sql
That comment is wrong. sqltrace is independent of debug mode of the daemon.
Tuc at T-B-O-H.NET wrote:
I seem to have some sort of anomoly that sqltrace is active in my server even though its not in debug mode. Thats not a big deal. no. that'll be right. sqltrace is nothing directly to do with server debug mode - its a debug mode of the sql module - its enabled and disabled in sql.conf
But the comments are :
# Print all SQL statements when in debug mode (-x) sqltrace = yes sqltracefile = ${logdir}/sqltrace.sql
That comment is wrong. sqltrace is independent of debug mode of the daemon.
And its behaving independent too, which is a good thing to me. :) WHILE ON THE SUBJECT, it looks like it opens the file, writes, and closes it. Does this mean I can move the file nightly without sending radius any signals, and the next time it goes to write to it it'll create a new file? Thanks, Tuc
"Tuc at T-B-O-H.NET" <ml@t-b-o-h.net> writes:
Is there a procedure to follow to ask for a new feature to be added?
AFAIK: - develop a patch - create a bug report requesting the new feature - attach the patch to the report
I seem to have some sort of anomoly that sqltrace is active in my server even though its not in debug mode. Thats not a big deal.
What I would like, though, is in src/modules/rlm_sql/sql.c for a timestamp to prepend the sql output. I'm trying to track down the last time a specific unit sent an accounting record, and I'd like to track it down to a time. Unfortunately, the sql statement is :
UPDATE radacct SET framedipaddress = '192.168.182.2', acctsessiontime = '4032', acctinputoctets = '0' << 32 | '4028824', acctoutputoctets = '0' << 32 | '2535198' WHERE acctsessionid = '481f035100000001' AND username = 'gasmac6' AND nasipaddress = '192.168.50.35';
I realize I could add acctsessiontime to the original :
INSERT INTO radacct (acctsessionid, acctuniqueid, username, realm, nasipaddress, nasportid, nasporttype, acctstarttime, acctstoptime, acctsessiontime, acctauthentic, connectinfo_start, connectinfo_stop, acctinputoctets, acctoutputoctets, calledstationid, callingstationid, acctterminatecause, servicetype, framedprotocol, framedipaddress, acctstartdelay, acctstopdelay, xascendsessionsvrkey) VALUES ('481f035100000001', 'dbbf6395a6c658d9', 'gasmac6', '', '192.168.50.35', '1', 'Wireless-802.11', '2008-05-05 13:11:36', NULL, '0', '', '', '', '0', '0', '00-16-01-D2-AE-F8', '00-13-02-B5-79-7C', '', '', '', '192.168.182.2', '0', '0', '');
and come up with the time... But I'd prefer to have confirmation it was 4032 later in reality.
I'm not sure if I understand exactly what you want to do, but if the only thing you need is a modification timestamp, and you are using MySQL, then you can make MySQL do this for you: Just add a "timestamp" type column to the radacct table. MySQL will automatically update it whenever an entry is modified. See http://dev.mysql.com/doc/refman/5.0/en/timestamp.html Bjørn
"Tuc at T-B-O-H.NET" <ml@t-b-o-h.net> writes:
Is there a procedure to follow to ask for a new feature to be added?
AFAIK: - develop a patch - create a bug report requesting the new feature - attach the patch to the report
Only issue with that is sql.c is written in, well, C. Unfortunately, sans one module I wrote in C for AT&T in the 90's (To make a Telephone Switch act like a web server) I don't program C. If you want it in perlized, just change : fputs(querystr, sqlfile); to fputs(time." - ".querystr, sqlfile); and it'd work for me. I can run Date::Manip to translate to a proper format.
I'm not sure if I understand exactly what you want to do, but if the only thing you need is a modification timestamp, and you are using MySQL, then you can make MySQL do this for you: Just add a "timestamp" type column to the radacct table. MySQL will automatically update it whenever an entry is modified. See http://dev.mysql.com/doc/refman/5.0/en/timestamp.html
I'm planning to do that already... But I also need to see in the sqltrace file the timestamp it claims the command was done too. The "timestamp" column would only be able to tell me the last time it happened. I need to see the interim ones which sqltrace would show me, and the time it actually did it. Right now the "querystr" doesn't have the time it actually occurs. Thanks, Tuc
participants (5)
-
A.L.M.Buxey@lboro.ac.uk -
Alan DeKok -
Bjørn Mork -
Phil Mayers -
Tuc at T-B-O-H.NET