Skip to content

Commit

Permalink
kamctl: skip tracing kamctl itself in pstrap
Browse files Browse the repository at this point in the history
(cherry picked from commit 626c0de)
  • Loading branch information
miconda committed Sep 8, 2020
1 parent 12aecb2 commit 7ac48ca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions utils/kamctl/kamctl
Expand Up @@ -2947,11 +2947,11 @@ kamailio_pstrap() {
DATE=`/bin/date +%Y%m%d_%H%M%S`
LOG_FILE=/tmp/gdb_kamailio_${DATE}.txt
minfo "Trap file: $LOG_FILE"
ps axw | grep kamailio | grep -v grep | sort > $LOG_FILE
ps axw | grep kamailio | grep -v grep | grep -v kamctl | sort > $LOG_FILE
echo "" >> $LOG_FILE
echo "" >> $LOG_FILE
echo -n "Trapping Kamailio with gdb: "
PID_TIMESTAMP_VECTOR=`ps axw | grep kamailio | grep -v grep | sort | awk '{print $1}'`
PID_TIMESTAMP_VECTOR=`ps axw | grep kamailio | grep -v grep | grep -v kamctl | sort | awk '{print $1}'`
for pid in $PID_TIMESTAMP_VECTOR
do
echo -n "."
Expand Down

0 comments on commit 7ac48ca

Please sign in to comment.