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/flat_rpc.c
+++ b/modules/db_flatstore/flat_rpc.c
@@ -32,6 +32,8 @@
#include "flat_rpc.h"
#include "flatstore_mod.h"
+#include "../../dprint.h"
+
#include <time.h>
@@ -44,6 +46,8 @@
static void rotate(rpc_t* rpc, void* c)
{
*flat_rotate = time(0);
+ LOG(L_WARN, "WARNING: flat_rotate CHANGED \n");
+
}
I changed the name of the file with mv command as usual and then launched the rotate command and saw that it is actually taken into account and logged:
root@corex-mc1s:/usr/local/src/kamailio-4.1/kamailio# cat /var/log/syslog|grep rotate
Dec 11 10:46:53 corex-mc1s /usr/local/sbin/kamailio[4497]: WARNING: db_flatstore [flat_rpc.c:49]: rotate(): WARNING: flat_rotate CHANGED
But it had effect on only one of the process. Why aren't all processes of kamailio logging the message (here only process 4497 got the command)? It looks like only one of the process gets the command.
root@corex-mc1s:/usr/local/src/kamailio-4.1/kamailio# ps auxf|grep kamailio
root 4784 0.0 0.0 8052 860 pts/7 S+ 10:51 0:00 | \_ grep kamailio
root 4473 0.0 0.0 186708 7164 ? S 10:44 0:00 /usr/local/sbin/kamailio -f /usr/local/etc/kamailio/kamailio.cfg -P /var/run/kamailio/kamailio.pid -m 64 -M 4 -u root -g kamailio
root 4474 0.0 0.0 186712 8440 ? S 10:44 0:00 \_ /usr/local/sbin/kamailio -f /usr/local/etc/kamailio/kamailio.cfg -P /var/run/kamailio/kamailio.pid -m 64 -M 4 -u root -g kamailio
root 4475 0.0 0.0 186712 8376 ? S 10:44 0:00 \_ /usr/local/sbin/kamailio -f /usr/local/etc/kamailio/kamailio.cfg -P /var/run/kamailio/kamailio.pid -m 64 -M 4 -u root -g kamailio
root 4476 0.0 0.0 186712 8356 ? S 10:44 0:00 \_ /usr/local/sbin/kamailio -f /usr/local/etc/kamailio/kamailio.cfg -P /var/run/kamailio/kamailio.pid -m 64 -M 4 -u root -g kamailio
root 4477 0.0 0.0 186712 8332 ? S 10:44 0:00 \_ /usr/local/sbin/kamailio -f /usr/local/etc/kamailio/kamailio.cfg -P /var/run/kamailio/kamailio.pid -m 64 -M 4 -u root -g kamailio
root 4478 0.0 0.0 186712 5768 ? S 10:44 0:00 \_ /usr/local/sbin/kamailio -f /usr/local/etc/kamailio/kamailio.cfg -P /var/run/kamailio/kamailio.pid -m 64 -M 4 -u root -g kamailio
root 4479 0.0 0.0 186712 5652 ? S 10:44 0:00 \_ /usr/local/sbin/kamailio -f /usr/local/etc/kamailio/kamailio.cfg -P /var/run/kamailio/kamailio.pid -m 64 -M 4 -u root -g kamailio
root 4480 0.0 0.0 186712 5604 ? S 10:44 0:00 \_ /usr/local/sbin/kamailio -f /usr/local/etc/kamailio/kamailio.cfg -P /var/run/kamailio/kamailio.pid -m 64 -M 4 -u root -g kamailio
root 4481 0.0 0.0 186712 5672 ? S 10:44 0:00 \_ /usr/local/sbin/kamailio -f /usr/local/etc/kamailio/kamailio.cfg -P /var/run/kamailio/kamailio.pid -m 64 -M 4 -u root -g kamailio
root 4482 0.0 0.0 186708 3576 ? S 10:44 0:00 \_ /usr/local/sbin/kamailio -f /usr/local/etc/kamailio/kamailio.cfg -P /var/run/kamailio/kamailio.pid -m 64 -M 4 -u root -g kamailio
root 4483 0.0 0.0 186708 3576 ? S 10:44 0:00 \_ /usr/local/sbin/kamailio -f /usr/local/etc/kamailio/kamailio.cfg -P /var/run/kamailio/kamailio.pid -m 64 -M 4 -u root -g kamailio
root 4484 0.0 0.0 186708 3576 ? S 10:44 0:00 \_ /usr/local/sbin/kamailio -f /usr/local/etc/kamailio/kamailio.cfg -P /var/run/kamailio/kamailio.pid -m 64 -M 4 -u root -g kamailio
root 4486 0.0 0.0 186708 3572 ? S 10:44 0:00 \_ /usr/local/sbin/kamailio -f /usr/local/etc/kamailio/kamailio.cfg -P /var/run/kamailio/kamailio.pid -m 64 -M 4 -u root -g kamailio
root 4488 0.0 0.0 186712 3996 ? S 10:44 0:00 \_ /usr/local/sbin/kamailio -f /usr/local/etc/kamailio/kamailio.cfg -P /var/run/kamailio/kamailio.pid -m 64 -M 4 -u root -g kamailio
root 4490 0.4 0.0 186708 6760 ? S 10:44 0:01 \_ /usr/local/sbin/kamailio -f /usr/local/etc/kamailio/kamailio.cfg -P /var/run/kamailio/kamailio.pid -m 64 -M 4 -u root -g kamailio
root 4493 0.0 0.0 186712 2560 ? S 10:44 0:00 \_ /usr/local/sbin/kamailio -f /usr/local/etc/kamailio/kamailio.cfg -P /var/run/kamailio/kamailio.pid -m 64 -M 4 -u root -g kamailio
root 4497 0.0 0.0 186776 3048 ? S 10:44 0:00 \_ /usr/local/sbin/kamailio -f /usr/local/etc/kamailio/kamailio.cfg -P /var/run/kamailio/kamailio.pid -m 64 -M 4 -u root -g kamailio
root 4498 0.0 0.0 186708 3244 ? S 10:44 0:00 \_ /usr/local/sbin/kamailio -f /usr/local/etc/kamailio/kamailio.cfg -P /var/run/kamailio/kamailio.pid -m 64 -M 4 -u root -g kamailio
root 4500 0.0 0.0 186708 2892 ? S 10:44 0:00 \_ /usr/local/sbin/kamailio -f /usr/local/etc/kamailio/kamailio.cfg -P /var/run/kamailio/kamailio.pid -m 64 -M 4 -u root -g kamailio
root@corex-mc1s:/usr/local/src/kamailio-4.1/kamailio# ls -la /var/log/kamailio/|grep "10:"
drwxrwxrwx 2 root root 4096 déc. 11 10:49 .
-rw-r--r-- 1 root kamailio 194 déc. 11 10:49 acc_1.log
-rw-r--r-- 1 root kamailio 9764471 déc. 9 10:30 T201312051212_131.CFT
-rw-r--r-- 1 root kamailio 1305022 déc. 11 10:44 T201312110910_129.CFT
-rw-r--r-- 1 root kamailio 1302007 déc. 11 10:44 T201312110910_130.CFT
-rw-r--r-- 1 root kamailio 1347304 déc. 11 10:44 T201312110910_131.CFT
-rw-r--r-- 1 root kamailio 1302961 déc. 11 10:44 T201312110910_132.CFT
-rw-r--r-- 1 root kamailio 136259 déc. 11 10:44 T201312110910_133.CFT
-rw-r--r-- 1 root kamailio 130057 déc. 11 10:44 T201312110910_134.CFT
-rw-r--r-- 1 root kamailio 130622 déc. 11 10:44 T201312110910_135.CFT
-rw-r--r-- 1 root kamailio 129914 déc. 11 10:44 T201312110910_136.CFT
-rw-r--r-- 1 root kamailio 234889 déc. 11 10:42 T201312110910_1.CFT
-rw-r--r-- 1 root kamailio 89076 déc. 11 10:50 T201312111046_129.CFT
-rw-r--r-- 1 root kamailio 86649 déc. 11 10:50 T201312111046_130.CFT
-rw-r--r-- 1 root kamailio 88435 déc. 11 10:50 T201312111046_131.CFT
-rw-r--r-- 1 root kamailio 80389 déc. 11 10:50 T201312111046_132.CFT
-rw-r--r-- 1 root kamailio 1310 déc. 11 10:50 T201312111046_133.CFT
-rw-r--r-- 1 root kamailio 1522 déc. 11 10:50 T201312111046_134.CFT
-rw-r--r-- 1 root kamailio 1377 déc. 11 10:48 T201312111046_135.CFT
-rw-r--r-- 1 root kamailio 1160 déc. 11 10:48 T201312111046_136.CFT