return to PRS Technologies website
#!/usr/bin/ksh
###############################################################################
#
# Module: log_num_threads.sh
# Author: Peter R. Schmidt
# Description: Log number of Informix user threads (from onstat -u)
#
# Change Log
#
# Date Name Description.................
# 03/29/01 Peter R. Schmidt Start Program
#
###############################################################################
. /elite/custom/run.elite
LOGDIR=`onstat -c | egrep "^MSGPATH" | awk '{print $2;}`
LOGDIR=`dirname $LOGDIR`
LOGFILE="$LOGDIR/user_threads.log"
XDATE=`date +%D-%T`
THREADS=`onstat -u | grep "maximum concurrent" | awk '{printf "Current: %d, Maximum: %d",$1,$5}'`
echo "$XDATE $THREADS" >> $LOGFILE
###############################################################################