[SR-Users] Question on the debug change level command with 5.0.x

Federico Cabiddu federico.cabiddu at gmail.com
Thu Mar 23 20:45:44 CET 2017


No, you don't. The debugger module, among other things, allows​ to set the
debug level per module.

Regards,

Federico



On 23 Mar 2017 6:31 pm, "Ginhoux, Patrick" <patrick.ginhoux at fr.unisys.com>
wrote:

Hi,



Thanks you so much; it works fine as expected.



Now have I to keep the ‘debugger’ module lines in my config ?



Cordialement

Patrick GINHOUX



*De :* sr-users [mailto:sr-users-bounces at lists.sip-router.org] *De la part
de* Federico Cabiddu
*Envoyé :* jeudi 23 mars 2017 17:38
*À :* Kamailio (SER) - Users Mailing List <sr-users at lists.sip-router.org>
*Objet :* Re: [SR-Users] Question on the debug change level command with
5.0.x



Hi,

you have to load the cfg_rpc module (http://www.kamailio.org/docs/
modules/5.0.x/modules/cfg_rpc.html). Then you can run



kamcmd cfg.set_now_int core debug <LEVEL>.



Regards,



Federico



On Thu, Mar 23, 2017 at 5:24 PM, Ginhoux, Patrick <
patrick.ginhoux at fr.unisys.com> wrote:

Hi,



Previously, in my kamailio.cfg 3.3.1, the debug level is set using the
‘debug’ option.

Then with the MI_FIFO module it was simple to change debug level on the
flight using the simple command ‘kamctl fifo debug <new value>’.



Moving to kamailio 5.0.x, there is no more MI_FIFO module. In the
kamailio.cfg, I still have the ‘debug’ option set; so I’m looking for the
command to use to change the debug level.



I look at the debugger module that seems the solution. So I add the
following lines in y script:



debug=4



loadmodule "debugger.so"



modparam("debugger", "log_level", 1)

modparam("debugger", "mod_hash_size", 5)

modparam("debugger", "mod_level_mode", 1)



Then I try to use the following commands :



This one retrieves the debug level set by the debug=4) :

[root at vm-vse02-siprouter1 kamailio]# kamcmd dbg.get_mod_level core

4



This one changed the debug level for the core module

[root at vm-vse02-siprouter1 kamailio]# kamcmd dbg.set_mod_level core 2

200 ok



Same commands can be used for each of the module loaded:



[root at vm-vse02-siprouter1 kamailio]# kamcmd dbg.get_mod_level tm

4

[root at vm-vse02-siprouter1 kamailio]# kamcmd dbg.set_mod_level tm 2

200 ok



[root at vm-vse02-siprouter1 kamailio]# kamcmd dbg.get_mod_level dispatcher

4

[root at vm-vse02-siprouter1 kamailio]# kamcmd dbg.set_mod_level dispatcher 2

200 ok



Each command only applies to a specific module.



I don’t find a ‘global’ command that I could use in the same manner as the
old ‘kamctl fifo debug’ command.



Is there something I missed in my config ?



Cordialement

Patrick GINHOUX




_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users at lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users



_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users at lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20170323/9d97729d/attachment.html>


More information about the sr-users mailing list