#!/bin/ksh # Program: blocked_clients # Purpose: This script allows you to determine the cause of a blocked # or hung client # Author: Adam Backman # Date Written: 02/06/98 # # Setup the environment SCRIPTS=${SCRIPTS-/u3/users/adamb/scripts} export SCRIPTS # Setup DB specific variables . $SCRIPTS/live/read_registry $1 case $? in 2) echo "Database $1 is not in database registry" exit 1 ;; 3) echo "Database $1 is on $HOST not on this host" exit 1 ;; esac proutil $DB_DIR/$DB -C busy 2>/dev/null >/dev/null if [ $? -eq 0 ] then echo "The database is not running" exit 1 else promon -F $DB_DIR/$DB << $END$ > $SCRIPTS/tmp/blocked.lst 2>/dev/null R&D 1 4 2 x $END$ echo echo "Information for database: "$DB more $SCRIPTS/tmp/blocked.lst rm $SCRIPTS/tmp/blocked.lst fi