[SR-Users] kamailio presence server becomes unresponsive

Daniel-Constantin Mierla miconda at gmail.com
Tue Dec 24 00:20:08 CET 2013


Hello,

On 23/12/13 12:12, Juha Heinanen wrote:
> Klaus Darilion writes:
>
>> utils/kamctl: new command 'trap'
>>    - useful to get a full bt dump of all kamailio processes
>>    - handy in dead-lock investigatigations
> klaus,
>
> thanks for the pointer.  i pulled out shell script from it (below).
>
> it would be still nice to know how kamailio is dispatching the requests
> to worker processes.
for udp, is the kernel that decides which process reads the datagram. 
For tcp, iirc, the main tcp process dispatches connections to tcp 
workers on the least loaded (by number of connections) mode.

Cheers,
Daniel
>
> -- juha
>
> #!/bin/bash
>
> BINARY=kamailio
>
> GDB=gdb
> DATE=`/bin/date +%Y%m%d_%H%M%S`
> LOG_FILE=/tmp/gdb_kamailio_$DATE
> echo "Trap file: $LOG_FILE"
> pres-serv_ctl ps > $LOG_FILE
> echo -n "Trapping Kamailio with gdb: "
> PID_TIMESTAMP_VECTOR=`sed -e 's/\([0-9]*\).*/\1/' $LOG_FILE`
> for pid in $PID_TIMESTAMP_VECTOR
>      do
>          echo -n "."
>          PID=`echo $pid | cut -d '-' -f 1`
>          echo "" >> $LOG_FILE
>              echo "---start $PID -----------------------------------------------------" >> $LOG_FILE
>              $GDB $BINARY $PID -batch --eval-command="bt full" &>> $LOG_FILE
>              echo "---end $PID -------------------------------------------------------" >> $LOG_FILE
>      done
> echo "."

-- 
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda




More information about the sr-users mailing list