commit | 392e6271894bcd27539b9d7a4307083ea6cd12cd | [log] [tgz] |
---|---|---|
author | david_williams <david_williams> | Wed Dec 03 03:15:52 2008 +0000 |
committer | david_williams <david_williams> | Wed Dec 03 03:15:52 2008 +0000 |
tree | ef62158473edfa36f98d21decd9d9a3f08846f1d | |
parent | 43122078ada29ddceaf687f06cac9bac7846a696 [diff] [blame] |
utility to count threads
diff --git a/releng.control/nThreads.sh b/releng.control/nThreads.sh new file mode 100644 index 0000000..5e65225 --- /dev/null +++ b/releng.control/nThreads.sh
@@ -0,0 +1,12 @@ +#!/bin/sh +PIDFILE=cc.pid +echo; +if [ -f ${PIDFILE} ] ; then + PID=`cat ${PIDFILE}` + nthreads=`ps -mp $PID | wc -l` + echo " Number of threads in wtp's CC process: $nthreads" +else + echo " PID file (${PIDFILE}) does not exist." + echo " Either CC not running, or PID file deleted" +fi +echo