Re: Talking Heads (head hunters) and killing turbos
Posted in 1993
jack, another alternative is to give your users a 'friendlier' way to kill the sqlturbos. if they do a tbstat -u, and know which process they want to kill, the following script should do it. -------------cut here----------------------------------------------------------------- #!/bin/sh if [ "$#" -lt 1 ] then echo " " echo "USAGE : $0 <pid list>" echo " " exit 1 fi for _pid in `echo $*` do echo $_pid for line in `tbstat -u | awk /Users/,/active/ | grep $_pid | awk '{print $1"~"$2"~"$3"~" }'` do user_address=`echo $line | cut -d~ -f1` for trans in `tbstat -u | awk /Transactions/,/active/ | grep $user_address | awk '{print $1"~"$2"~"$3"~" }'` do trans_address=`echo $trans | cut -d~ -f1` echo "tbmode -Z $trans_address" tbmode -Z $trans_address sleep 2 echo "tbmode -z $_pid" tbmode -z $_pid done done done -------------cut here----------------------------------------------------------------- regards, ------------------------------------------------------------------------------ | . . Bob Baskett | ... ... Software Engineer, DBA | ..... ..... Business Systems Integration Group | .. ... .. Semiconductor Products Sector | . . . Mesa, AZ | | Motorola, Inc ------------------------------------------------------------------------------ Sun 690-MP Informix Versions: Online - 5.00.UC2 ISQL - 4.10.UD1 4GL-RDS- 4.10.UC1 ------------------------------------------------------------------------------