installation_guide:debug:start

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
installation_guide:debug:start [2020/06/17 13:22] borjainstallation_guide:debug:start [2024/02/19 16:10] (current) – [Coredump generators] borja
Line 21: Line 21:
 Execute : Execute :
 <code> <code>
-tail -f /var/log/voximal/debug.log+root# tail -f /var/log/voximal/debug.log
 </code> </code>
  
 With colors : With colors :
 <code> <code>
-tail -f /var/log/voximal/debug.log | ccze -A+root# tail -f /var/log/voximal/debug.log | ccze -A
 </code> </code>
  
Line 82: Line 82:
 </code> </code>
  
 +==== Powerful SIP traffic monitor ====
 +
 +Use the "sngrep" tool : 
 +<code>
 +sngrep
 +</code>
 +
 +<code>
 +
 +                                      xINVITE sip:0970265644@84.246.228.243:506
 +           128.140.150.200:5060       xuser=phone SIP/2.0
 +          qqqqqqqqqqwqqqqqqqqq        xVia: SIP/2.0/UDP 128.140.150.200:5060;br
 +  22:22:36.632419          INVITE (Sxch=z9hG4bKk5efg100aob0k0be5og0.1
 +        +0.000994   x qqqqqqqqqqqqqqqqxMax-Forwards: 66
 +  22:22:36.633413           100 TryixFrom: <sip:0677379042@172.17.28.229;user
 +        +0.048311   x <qqqqqqqqqqqqqqqxhone>;tag=1c1397877903
 +  22:22:36.681724          200 OK (SxTo: sip:0970265644@ipdirections.net
 +        +0.085629   x <qqqqqqqqqqqqqqqxCall-ID: SDk6upe02-efa980599ffc4b83e9221
 +  22:22:36.767353               ACK xec76ea708-v300g00030
 +        +8.759074   x qqqqqqqqqqqqqqqqxCSeq: 1 INVITE
 +  22:22:45.526427               BYE xContact: <sip:128.140.150.200:5060;maddr
 +        +0.000527   x qqqqqqqqqqqqqqqqx28.140.150.200>
 +  22:22:45.526954             200 OKxSupported: sdp-anat
 +                    x <qqqqqqqqqqqqqqqxAllow: INVITE,ACK,CANCEL,BYE,OPTIONS
 +                    x                 xP-Asserted-Identity: <sip:0677379042@172
 +                    x                 x7.28.229;user=phone>
 +                    x                 xContent-Type: application/sdp
 +                    x                 xContent-Length: 435
 +                    x                 xP-Early-Media: supported
 +                    x                 xP-Access-Network-Info: GSTN;operator-spe
 +                                      x
 +Esc Calls List   Enter Raw   Space Compare   F1 Help   F2 SDP   F3 RTP   F4 Exte
 +</code>
 +
 +==== Asterisk Manager traffic monitor ====
 +
 +Use the "ngrep" tool : 
 +<code>
 +ngrep
 +</code>
 +
 +<code>
 +ngrep -d lo -s 1500 port 5038 -T
 +</code>
 ==== Monitor memory/CPU ==== ==== Monitor memory/CPU ====
  
Line 273: Line 317:
 </DiagnosticMessages> </DiagnosticMessages>
 </code> </code>
 +
 +==== Set the right TimeZone ====
 +
 +Install the NTP package to synchronize your server to the world's time.
 +
 +<code>
 +#timedatectl set-timezone America/New_York
 +</code>
 +
 +or, for french servers,
 +
 +<code>
 +#timedatectl set-timezone Europe/Paris
 +</code>
 +
 +or automatically,
 +
 +<code>
 +#dpkg-reconfigure tzdata
 +</code>
 +
 +==== Monitor the file descriptors ====
 +
 +List the file descriptors used by a process :
 +
 +<code>
 +# ls -l /proc/[PID]/fd
 +</code>
 +
 +==== Generate a CallStacks or Coredumps ====
 +
 +Generate the threads stacks or a coredump file for the process (voximald) :
 +
 +<code>
 +gdb -ex "thread apply all bt" --batch /usr/sbin/voximald $(pidof voximald) > /var/log/voximal/backtrace-voximald$(date +%s).txt
 +gdb /usr/sbin/voximald $(pidof voximald) -ex "gcore /tmp/toto.core" --batch
 +</code>
 +
  • installation_guide/debug/start.1592400131.txt.gz
  • Last modified: 2020/06/17 13:22
  • by borja