summaryrefslogtreecommitdiffstats
path: root/tests/diag.sh
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2011-03-31 17:08:01 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2011-03-31 17:08:01 +0200
commitb30e809a202ef42e59a6c9e455e17ce56c7894bc (patch)
tree23e0584c2a0cc1fecdd7f2c9af69f7482e7c915b /tests/diag.sh
parentb615cbaacec3d6f25e448362095ac54fcbe6d927 (diff)
parent945bc9bd0d9de984ab11b9faf609b809a1f3cb90 (diff)
downloadrsyslog-b30e809a202ef42e59a6c9e455e17ce56c7894bc.tar.gz
rsyslog-b30e809a202ef42e59a6c9e455e17ce56c7894bc.tar.xz
rsyslog-b30e809a202ef42e59a6c9e455e17ce56c7894bc.zip
Merge branch 'v5-devel'
Conflicts: configure.ac doc/manual.html doc/rsyslog_conf.html runtime/msg.c runtime/rsyslog.h template.c
Diffstat (limited to 'tests/diag.sh')
-rwxr-xr-xtests/diag.sh16
1 files changed, 14 insertions, 2 deletions
diff --git a/tests/diag.sh b/tests/diag.sh
index b8b55f11..8b0ad573 100755
--- a/tests/diag.sh
+++ b/tests/diag.sh
@@ -10,7 +10,7 @@
#valgrind="valgrind --tool=helgrind --log-fd=1"
#valgrind="valgrind --tool=exp-ptrcheck --log-fd=1"
#set -o xtrace
-#export RSYSLOG_DEBUG="debug nostdout"
+#export RSYSLOG_DEBUG="debug nologfuncflow nostdout"
#export RSYSLOG_DEBUGLOG="log"
case $1 in
'init') $srcdir/killrsyslog.sh # kill rsyslogd if it runs for some reason
@@ -84,15 +84,27 @@ case $1 in
exit 1
fi
;;
+ 'get-mainqueuesize') # show the current main queue size
+ if [ "$2" == "2" ]
+ then
+ echo getmainmsgqueuesize | ./diagtalker -p13501
+ else
+ echo getmainmsgqueuesize | ./diagtalker
+ fi
+ ;;
'wait-queueempty') # wait for main message queue to be empty. $2 is the instance.
if [ "$2" == "2" ]
then
- echo WaitMainQueueEmpty | ./diagtalker
+ echo WaitMainQueueEmpty | ./diagtalker -p13501
else
echo WaitMainQueueEmpty | ./diagtalker
fi
;;
'shutdown-when-empty') # shut rsyslogd down when main queue is empty. $2 is the instance.
+ if [ "$2" == "2" ]
+ then
+ echo Shutting down instance 2
+ fi
$srcdir/diag.sh wait-queueempty $2
kill `cat rsyslog$2.pid`
# note: we do not wait for the actual termination!