![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| command to terminate | munna_dude | High Level Programming | 2 | 01-25-2007 07:59 AM |
| Interrupt signal Control C takes too long to terminate a process | paqui | UNIX for Advanced & Expert Users | 8 | 10-17-2005 07:30 AM |
| Terminate process | ust | Shell Programming and Scripting | 5 | 07-12-2005 05:56 AM |
| terminate the process | ust | Shell Programming and Scripting | 2 | 05-18-2005 02:53 AM |
| How to terminate a tail -f | DonVince | Shell Programming and Scripting | 4 | 09-11-2002 09:17 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
terminate process
I want to have a script to terminate the system process that generated by user oracle_usr and have already processed for over 10 minutes , could suggest the script ? thx
|
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
Tuning Oracle scripts is better than killing processes - FWIW.
Remove the # from in front of Code:
# . ./temp.sh after you have reviewed the temp.sh file and you are sure it is getting right processes. This code loops with a one minute sleep - you may wabnt to change it not to loop. Code:
#!/bin/ksh
while true
do
ps -ef | awk '{if($1=="oracle"){
sub(/:/,"",$7)
if($7 > 1000 ){
printf("kill -9 %s # %s\n",$2, $0)
}
}} ' > temp.sh
if [ -s temp.sh ]; then
chmod +x temp.sh
# . ./temp.sh
fi
sleep 60
done
exit
|
|||
| Google The UNIX and Linux Forums |