Hi all,
The latest version of killprosession is available as part of the pt3.14 download from https://wss.com/progress-openedge-monitoring-with-protop/.
New features:
- Added a force flag (runs kill -SIGFPE)
If the user selects -f and the script determines that no DB files are open AND no DB shared memory segments are attached, it will proceed to send the SIGFPE signal.
CAVEATS:
a) On AIX, you need to specify DBFILESYSTEM=/<DB file system> in $PROTOP/bin/localenv. This is because lsof on AIX only returns the file system name and not the full file name. If you have multiple DBs on multiple FS then this won't work as expected.
b) killprosession only checks shared memory segments of DBs in $PROTOP/etc/dblist.cfg.
c) Only lightly tested on HPUX as that operating system is becoming mighty scarce
- Delivered in ECHO only mode
The script is delivered with the line "ECHO=echo" uncommented. This means that lines like "$ECHO kill -s INT ${PID}" will only echo the kill command and not execute it. This mode is clearly indicated in the Usage and when running the script. You'll see:
$ /usr/local/protop/bin/killprosession.sh 48365686
pk4939 48365686 pts/27 _progres -pf /usr/local/etc/params.m.pf
ECHO ONLY MODE is on. Comment ECHO=echo in script.
USE AT YOUR OWN RISK. THERE IS NO 100% SAFE WAY TO KILL A SHARED MEMORY PROCESS
Please confirm the kill of this session (y/n):
and same in the usage:
Usage: /usr/local/protop/bin/killprosession.sh [ -q ] [ -f ] [ -v ] pid1 [pid2 pid3 ...]
-q quiet. No prompts
-f force. Will execute a kill -SIGFPE if lsof and svmon/pmap seem clear. DANGEROUS !!
-v verbose. Generate verbose output
ECHO ONLY MODE is on. Comment ECHO=echo in script.
- Added a verbose flag
If you want to see every little thing that killprosesson does as it does it, add the -v flag. This is particularly useful in echo mode.