Quote:
Originally Posted by
frank_rizzo
echo $$ from the script. also you generally should avoid using kill -9 and only use this as a last resort. running kill -9 on database processes can cause corruption. if you really want to kill them then just kill it from root. no need for su.
Hi,
Oops, I think I placed the wrong title, what I meant is the process ID of the current login not the script as the script is ran using su - sybase. So am wanting to get the process ID of the su - sybase so I can exclude it.
The database does not run on this server, however I need to terminate the connections whenever this server has to fail over from one cluster to the other.
---------- Post updated at 11:02 PM ---------- Previous update was at 11:00 PM ----------
Quote:
Originally Posted by
jlliagre
$$ is the current shell process IDMight be its parent process id which might be in the $PPID variable.
"kill -9" is almost always unwise, especially when done on sensitive processes like databases.
That's tortuous. Use pkill instead.
Which is probably useless as the script will exit at the end anyway ...
Hi,
Oops, I think I placed the wrong title, what I meant is the process ID of the current login not the script as the script is ran using su - sybase. So am wanting to get the process ID of the su - sybase so I can exclude it, is that the PPID as you mentioned?
The database does not run on this server, however I need to terminate the connections whenever this server has to fail over from one cluster to the other.