09-20-2005
use ksh, not sh to run the script. You are overriding the #!/usr/bin/ksh by running the script as sh cs-sonia.
kill, not kill -9 to send SIGTERM, not SIGKILL to the proccess. SIGKILL does not allow the process to "clean up" as it exits.
10 More Discussions You Might Find Interesting
1. Post Here to Contact Site Administrators and Moderators
hello
i want to write a script in unix which read file that contains :
hour and process_id like this
file bbb:
0:30 6678
1:40 8789
and for every line he check if the hour greater then 30 minutes
he kill the process_id
the script looks like this
cat bbb | while read line
do ... (1 Reply)
Discussion started by: naamas03
1 Replies
2. UNIX for Advanced & Expert Users
Hi All,
I am unable to kill a process using kill command. I am using HP-UX system. I have tried with kill -9 and i have root privilages.
How can i terminate this daemon ? ? ?
Regards,
Vijay Hegde (3 Replies)
Discussion started by: VijayHegde
3 Replies
3. Programming
Hi all
i have simple c program , when i wish to kill the app
im using kill(0,-9) , but it seams this command don't do any thing and the program.
just ignore it .
what im doing wrong here ?
im using HP-UX ia64
Thanks (9 Replies)
Discussion started by: umen
9 Replies
4. Shell Programming and Scripting
Sorry, posted the question in other forum. (0 Replies)
Discussion started by: sudhamacs
0 Replies
5. Linux
I want to Kill a process without using kill command as i don't have privileges to kill the process. I know the pid and i am using Linux 2.6.9 OS. (6 Replies)
Discussion started by: sudhamacs
6 Replies
6. Shell Programming and Scripting
i have edited a script to kill an exact mysql process is causing the high load on the server, my problem is, kill dont kill it!
script:
#!/bin/sh
top -n 1 -u mysql | grep mysqld | awk '{print $1}' > pid
proc='cat pid'
kill -9 $proc
or i try with
kill -9 `top -n 1 -u mysql | grep mysqld... (8 Replies)
Discussion started by: chandro
8 Replies
7. Shell Programming and Scripting
Good afternoon
I need to KILL a process in a single command sentence, for example:
kill -9 `ps -aef | grep 'CAL255.4ge' | grep -v grep | awk '{print $2}'`
That sentence Kills the process ID corresponding to the program CAL255.4ge.
However it is possible that the same program... (6 Replies)
Discussion started by: enriquegm82
6 Replies
8. Shell Programming and Scripting
Hey guys,
I have a python script that I call with this line:
python mypythonscript.py >> results.csv &The problem is that the redirection from the stdout to the file results.csv only writes 4096 kbyte blocks.
So if i kill this process with
kill the last kbytes that the script produce will... (6 Replies)
Discussion started by: Mastaer
6 Replies
9. Shell Programming and Scripting
I was trying to read the file to create a table in SAS and I got error as follows while I read.
Resource is write-locked by another user. File
=/usr/sas/sas_config/Lev1/SASApp/StoredProcessServer/Logs/SASApp_STPServer_2015-09-29_tmp_18208.log. System Error Code =
0.
ERROR: File is in... (10 Replies)
Discussion started by: Ram Kumar_BE
10 Replies
10. Shell Programming and Scripting
Hi All, Looking for a quick LINUX shell script which can continuously monitors the flle size, report the process which is creating a file greater than certain limit and also kill that process. Can someone please help me on this? (4 Replies)
Discussion started by: vasavimacherla
4 Replies
KILL(1) User Commands KILL(1)
NAME
kill - send a signal to a process
SYNOPSIS
kill [options] <pid> [...]
DESCRIPTION
The default signal for kill is TERM. Use -l or -L to list available signals. Particularly useful signals include HUP, INT, KILL, STOP,
CONT, and 0. Alternate signals may be specified in three ways: -9, -SIGKILL or -KILL. Negative PID values may be used to choose whole
process groups; see the PGID column in ps command output. A PID of -1 is special; it indicates all processes except the kill process
itself and init.
OPTIONS
<pid> [...]
Send signal to every <pid> listed.
-<signal>
-s <signal>
--signal <signal>
Specify the signal to be sent. The signal can be specified by using name or number. The behavior of signals is explained in sig-
nal(7) manual page.
-l, --list [signal]
List signal names. This option has optional argument, which will convert signal number to signal name, or other way round.
-L, --table
List signal names in a nice table.
NOTES Your shell (command line interpreter) may have a built-in kill command. You may need to run the command described here as /bin/kill
to solve the conflict.
EXAMPLES
kill -9 -1
Kill all processes you can kill.
kill -l 11
Translate number 11 into a signal name.
kill -L
List the available signal choices in a nice table.
kill 123 543 2341 3453
Send the default signal, SIGTERM, to all those processes.
SEE ALSO
kill(2), killall(1), nice(1), pkill(1), renice(1), signal(7), skill(1)
STANDARDS
This command meets appropriate standards. The -L flag is Linux-specific.
AUTHOR
Albert Cahalan <albert@users.sf.net> wrote kill in 1999 to replace a bsdutils one that was not standards compliant. The util-linux one
might also work correctly.
REPORTING BUGS
Please send bug reports to <procps@freelists.org>
procps-ng October 2011 KILL(1)