| #!/bin/sh | |
| echo; | |
| PID=$1 | |
| if [ ! -z $PID ] ; then | |
| nthreads=`ps -mp $PID | wc -l` | |
| echo " process PID: " $PID | |
| echo " Number of threads in process: $nthreads" | |
| else | |
| PID=`pgrep -f configure=/opt/users/hudsonbuild/` | |
| if [ ! -z $PID ] ; then | |
| nthreads=`ps -mp $PID | wc -l` | |
| echo " hudson process PID: " $PID | |
| echo " Number of threds n process: $nthreads" | |
| else | |
| echo " PID $PID not found/defined (maybe pass in as first argument)?." | |
| fi | |
| fi | |
| echo | |