monitor cc memory use
diff --git a/releng.control/ccmonitor.sh b/releng.control/ccmonitor.sh
new file mode 100644
index 0000000..55565ab
--- /dev/null
+++ b/releng.control/ccmonitor.sh
@@ -0,0 +1,24 @@
+#!/bin/sh
+echo;
+echo " "`date`;
+
+PIDFILE=cc.pid
+
+
+echo;
+if [ -f ${PIDFILE} ] ; then
+ PID=`cat ${PIDFILE}`
+else
+ echo " PID file (${PIDFILE}) does not exist."
+ echo " Either CC not running, or PID file deleted"
+ exit 5
+fi
+ # I've found lsof is in /user/sbin on some machines
+ nhandles=`/usr/bin/lsof -p $PID | wc -l`
+ echo " Number of handles in wtp's CC process: $nhandles"
+ echo;
+ nthreads=`ps -mp $PID | wc -l`
+ echo " Number of threads in wtp's CC process: $nthreads"
+ echo;
+ top -c -b -n 1 -p$PID
+echo