Re: [SR-Users] flatstore.rotate not working

2013-12-15 Thread Abdelkader Allam
Hi Daniel I found the bug, On Wed, Dec 11, 2013 at 10:52 AM, Abdelkader Allam < abdelkader.al...@gmail.com> wrote: > Here is another try > > > I made a code change to see if the kamcmd has really an effect on the > module > > root@corex-mc1s:/usr/local/src/kamailio-4.1/kamailio# git diff > d

Re: [SR-Users] flatstore.rotate not working

2013-12-11 Thread Abdelkader Allam
Here is another try I made a code change to see if the kamcmd has really an effect on the module root@corex-mc1s:/usr/local/src/kamailio-4.1/kamailio# git diff diff --git a/modules/db_flatstore/flat_rpc.c b/modules/db_flatstore/flat_rpc.c index 2fe0d0f..9a51446 100644 --- a/modules/db_flatstore/

Re: [SR-Users] flatstore.rotate not working

2013-12-11 Thread Abdelkader Allam
Here is an example, today at 9:20 i did a rotate command, after renaming the files, you see that some files are not used so havent been changed since 9:20, but the remaining files are still used until now (10:06 AM). So basically the command had no effet (i launched the command two times -rw-r--r

Re: [SR-Users] flatstore.rotate not working

2013-12-11 Thread Daniel-Constantin Mierla
Hello, On 11/12/13 10:03, Abdelkader Allam wrote: Hello Daniel, I am using Debian Squeeze and I am moving the file before the rotate. Unfortunately i had not time to debug kamailio's code to find the issue, i read quickly some part of the db_flatstore module but i need to figure out how to d

Re: [SR-Users] flatstore.rotate not working

2013-12-11 Thread Abdelkader Allam
Hello Daniel, I am using Debian Squeeze and I am moving the file before the rotate. Unfortunately i had not time to debug kamailio's code to find the issue, i read quickly some part of the db_flatstore module but i need to figure out how to debug and understand how kamcmd passes commands to each

Re: [SR-Users] flatstore.rotate not working

2013-12-10 Thread Daniel-Constantin Mierla
Hello, what operating system are you using? Looking at the code, it closes the old fd and reopens the file by name. So that should do it ok. Are you moving the files before or after rotate command? Perhaps worth adding support for renaming the file inside kamailio rotate command. Cheers,

Re: [SR-Users] flatstore.rotate not working

2013-12-04 Thread Abdelkader Allam
Hello I am doing it manually with a script which does the renaming (basically it is a unix mv) from glob import glob from time import time,sleep kamcdrroot="/var/log/kamailio/" from datetime import datetime from os import system def mv(fname1,fname2): return system("mv %s %s" % (fname1,fname2

Re: [SR-Users] flatstore.rotate not working

2013-12-04 Thread Daniel-Constantin Mierla
Hello, how you do the files rotation? The readme is saying that has to be done via an external application. Nothing has change in this regard for many years. Cheers, Daniel On 12/4/13 2:31 PM, Abdelkader Allam wrote: Hello Guys, I am using Kamailio 4.1.0. I am trying to get Kamailio to rot

[SR-Users] flatstore.rotate not working

2013-12-04 Thread Abdelkader Allam
Hello Guys, I am using Kamailio 4.1.0. I am trying to get Kamailio to rotate the cdr log through command kamcmd flatstore.rotate but it keeps sending log to the renamed files, I use the following parameter (i tried to set flush to 1 and 0, same result, i have also tried in debug and normal mode