#!/bin/ksh
#Make sure you point the environment 
#by setting 
# export TUXCONFIG=/your fully qualified domain-name/PSTUXCFG
#Usage ----- tuxpq.sh m n
# where m is the duration (number of times)
# and n is the time interval in seconds, you want this script to poll
# For example, if you specify tuxpq.sh 3600 2, the script 
# will run 3600 times every 2 seconds
case $# in
   2)
    count=$1
    delay=$2;;
   1)
    count=$1
    delay=0;;
   *)
    count=1
    delay=0;;
esac
i=0
touch output.log
while [ $i -lt $count ]
do
date
   tmadmin <<!
pq
!
   i=`expr $i + 1`
   if [ $i -lt $count ]
   then
      sleep $delay
   fi
done

