Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
installation_guide:debug:start [2017/01/11 00:23] – [Valgrid using] borja | installation_guide:debug:start [2025/03/07 08:44] (current) – [Execute Asterisk with GDB (debugger)] borja | ||
---|---|---|---|
Line 15: | Line 15: | ||
CLI> voximal debug interpreter | CLI> voximal debug interpreter | ||
</ | </ | ||
+ | |||
+ | |||
+ | ==== View the traces flow === | ||
+ | |||
+ | Execute : | ||
+ | < | ||
+ | root# tail -f / | ||
+ | </ | ||
+ | |||
+ | With colors : | ||
+ | < | ||
+ | root# tail -f / | ||
+ | </ | ||
+ | |||
==== Generate a normal stop ==== | ==== Generate a normal stop ==== | ||
Line 33: | Line 47: | ||
< exit|result=ok | < exit|result=ok | ||
+ | </ | ||
+ | |||
+ | ==== Powerful top monitor ==== | ||
+ | |||
+ | Use the " | ||
+ | < | ||
+ | htop -p $(pidoff voximald) | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | 1 [ 0.0%] | ||
+ | 2 [| | ||
+ | 3 [ 0.0%] | ||
+ | 4 [ 0.0%] | ||
+ | Mem[||| | ||
+ | Swp[| 31.8M/ | ||
+ | |||
+ | PID USER PRI NI VIRT | ||
+ | 1 root | ||
+ | 18890 root | ||
+ | 18891 root | ||
+ | 409 root | ||
+ | 14487 postfix | ||
+ | 412 postfix | ||
+ | 308 root | ||
+ | 30788 www-data | ||
+ | 30787 www-data | ||
+ | 30786 www-data | ||
+ | 30785 www-data | ||
+ | 30784 www-data | ||
+ | 263 mysql 28 | ||
+ | 2808 mysql 20 | ||
+ | F1Help | ||
+ | </ | ||
+ | |||
+ | ==== Powerful SIP traffic monitor ==== | ||
+ | |||
+ | Use the " | ||
+ | < | ||
+ | sngrep | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | |||
+ | xINVITE sip: | ||
+ | | ||
+ | qqqqqqqqqqwqqqqqqqqq | ||
+ | 22: | ||
+ | +0.000994 | ||
+ | 22: | ||
+ | +0.048311 | ||
+ | 22: | ||
+ | +0.085629 | ||
+ | 22: | ||
+ | +8.759074 | ||
+ | 22: | ||
+ | +0.000527 | ||
+ | 22: | ||
+ | x < | ||
+ | x | ||
+ | x | ||
+ | x | ||
+ | x | ||
+ | x | ||
+ | x | ||
+ | x | ||
+ | Esc Calls List Enter Raw Space Compare | ||
+ | </ | ||
+ | |||
+ | ==== Asterisk Manager traffic monitor ==== | ||
+ | |||
+ | Use the " | ||
+ | < | ||
+ | ngrep | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | ngrep -d lo -s 1500 port 5038 -T | ||
+ | </ | ||
+ | ==== Monitor memory/CPU ==== | ||
+ | |||
+ | A very simple way to follow the memory and CPU indicators : | ||
+ | |||
+ | < | ||
+ | root# top -b -d 5 -p $(pidof voximald) | awk -v OFS="," | ||
</ | </ | ||
Line 58: | Line 157: | ||
< | < | ||
asterisk -cvvvvv -U asterisk -G asterisk -g | asterisk -cvvvvv -U asterisk -G asterisk -g | ||
+ | </ | ||
+ | |||
+ | ==== VoiceXML Log levels ==== | ||
+ | |||
+ | Format : | ||
+ | |||
+ | < | ||
+ | |||
+ | Diagnostic | ||
+ | date/time | threadID | sessionID or mark | tagID | subtag | text | ||
+ | | ||
+ | Error | ||
+ | date/time | threadID | sessionID or -1 | 0 | severity | modulename | errorID | errorText | appends | ||
+ | | ||
+ | Event | ||
+ | date/time | threadID | sessionID | EVENT | 0|evenID | appends | ||
+ | </ | ||
+ | |||
+ | Logging example : | ||
+ | |||
+ | < | ||
+ | ... | ||
+ | Oct 23 23: | ||
+ | Oct 23 23: | ||
+ | Oct 23 23: | ||
+ | Oct 23 23: | ||
+ | Oct 23 23: | ||
+ | Oct 23 23: | ||
+ | Oct 23 23: | ||
+ | Oct 23 23: | ||
+ | Oct 23 23: | ||
+ | Oct 23 23: | ||
+ | Oct 23 23: | ||
+ | Oct 23 23: | ||
+ | Oct 23 23: | ||
+ | Oct 23 23: | ||
+ | Oct 23 23: | ||
+ | Oct 23 23: | ||
+ | Oct 23 23: | ||
+ | ... | ||
+ | </ | ||
+ | |||
+ | |||
+ | The default log bases (used to define tagIDs) : | ||
+ | |||
+ | < | ||
+ | client.cache.diagLogBase | ||
+ | client.inet.diagLogBase | ||
+ | client.jsi.diagLogBase | ||
+ | client.prompt.diagLogBase | ||
+ | client.rec.diagLogBase | ||
+ | client.tel.diagLogBase | ||
+ | client.vxi.diagLogBase | ||
+ | client.object.diagLogBase | ||
+ | client.client.diagLogBase | ||
+ | </ | ||
+ | |||
+ | |||
+ | === Interet connector === | ||
+ | |||
+ | < | ||
+ | < | ||
+ | <diag tag=" | ||
+ | <diag tag=" | ||
+ | <diag tag=" | ||
+ | <diag tag=" | ||
+ | <diag tag=" | ||
+ | <diag tag=" | ||
+ | <diag tag=" | ||
+ | <diag tag=" | ||
+ | |||
+ | </ | ||
+ | </ | ||
+ | |||
+ | |||
+ | === Cache === | ||
+ | |||
+ | < | ||
+ | < | ||
+ | <diag tag=" | ||
+ | <diag tag=" | ||
+ | <diag tag=" | ||
+ | <diag tag=" | ||
+ | <diag tag=" | ||
+ | <diag tag=" | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | |||
+ | === EcmaScript interpreter === | ||
+ | |||
+ | < | ||
+ | < | ||
+ | <diag tag=" | ||
+ | <diag tag=" | ||
+ | <diag tag=" | ||
+ | <diag tag=" | ||
+ | <diag tag=" | ||
+ | <diag tag=" | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | === Client main === | ||
+ | |||
+ | < | ||
+ | < | ||
+ | <diag tag=" | ||
+ | <diag tag=" | ||
+ | <diag tag=" | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | |||
+ | === Objects === | ||
+ | |||
+ | < | ||
+ | < | ||
+ | <diag tag=" | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | === VoiceXML interpreter (VXI) === | ||
+ | |||
+ | < | ||
+ | < | ||
+ | <diag tag=" | ||
+ | <diag tag=" | ||
+ | <diag tag=" | ||
+ | <diag tag=" | ||
+ | <diag tag=" | ||
+ | <diag tag=" | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | === Telephony === | ||
+ | |||
+ | < | ||
+ | < | ||
+ | <diag tag=" | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | |||
+ | === Prompt === | ||
+ | |||
+ | < | ||
+ | < | ||
+ | <diag tag=" | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | |||
+ | === Recognize === | ||
+ | |||
+ | < | ||
+ | < | ||
+ | <diag tag=" | ||
+ | <diag tag=" | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | ==== Set the right TimeZone ==== | ||
+ | |||
+ | Install the NTP package to synchronize your server to the world' | ||
+ | |||
+ | < | ||
+ | # | ||
+ | </ | ||
+ | |||
+ | or, for french servers, | ||
+ | |||
+ | < | ||
+ | # | ||
+ | </ | ||
+ | |||
+ | or automatically, | ||
+ | |||
+ | < | ||
+ | # | ||
+ | </ | ||
+ | |||
+ | ==== Monitor the file descriptors ==== | ||
+ | |||
+ | List the file descriptors used by a process : | ||
+ | |||
+ | < | ||
+ | # ls -l / | ||
+ | </ | ||
+ | |||
+ | ==== Generate a CallStacks or Coredumps ==== | ||
+ | |||
+ | Generate the threads stacks or a coredump file for the process (voximald) : | ||
+ | |||
+ | < | ||
+ | gdb -ex " | ||
+ | gdb / | ||
+ | </ | ||
+ | |||
+ | ==== Execute the Asterisk with GDB (debugger) ==== | ||
+ | |||
+ | Launch the Asterisk process with the debugger (gdb) : | ||
+ | |||
+ | < | ||
+ | gdb -ex=r --args asterisk -cvvvvvv -U asterisk -G asterisk | ||
</ | </ |