Browse code

kamctl: skip tracing kamctl itself in pstrap

(cherry picked from commit 626c0dee863fa517e473148ca8010d737a8f7ffe)

Daniel-Constantin Mierla authored on 07/07/2020 17:28:29
Showing 1 changed files
... ...
@@ -2947,11 +2947,11 @@ kamailio_pstrap() {
2947 2947
 	DATE=`/bin/date +%Y%m%d_%H%M%S`
2948 2948
 	LOG_FILE=/tmp/gdb_kamailio_${DATE}.txt
2949 2949
 	minfo "Trap file: $LOG_FILE"
2950
-	ps axw | grep kamailio | grep -v grep | sort > $LOG_FILE
2950
+	ps axw | grep kamailio | grep -v grep | grep -v kamctl | sort > $LOG_FILE
2951 2951
 	echo "" >> $LOG_FILE
2952 2952
 	echo "" >> $LOG_FILE
2953 2953
 	echo -n "Trapping Kamailio with gdb: "
2954
-	PID_TIMESTAMP_VECTOR=`ps axw | grep kamailio | grep -v grep | sort | awk '{print $1}'`
2954
+	PID_TIMESTAMP_VECTOR=`ps axw | grep kamailio | grep -v grep | grep -v kamctl | sort | awk '{print $1}'`
2955 2955
 	for pid in $PID_TIMESTAMP_VECTOR
2956 2956
 	do
2957 2957
 		echo -n "."