Script to check Lock Table size

The following unix script should be set in cron. I run it every 5 min. It will email everyone on EMAILLIST when Lock Table will be over 30000.
The value is set in progress program LockTableWatch.p. It will also report the users that have more than 500 locks.

EMAILLIST="your-name@domain.com johndoe@yahoo.com"

$DLC/bin/_progres -b -db db-name -p LockTableWatch.p
sleep 2
if [ -f /tmp/LockTableWatch.out ]
then
  cat /tmp/LockTableWatch.out | mail -s "Check Lock Table" -e "$EMAILLIST"
fi