09-29-2016
Yes Robin.
This is what I am looking for. Also I thought of reading the .sh_history file to read the history file and see the kill command report it.
But if you have any specific piece of code that can simulate kill,can you provide me the same.
Also I am looking for a way to add date and time in the .sh_history file. I was able to figure out only for .bash_history and not for.sh_history. Can you please provide me how can I add Date for .sh_history file.
Thanks
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi guys,
I am new to Unix shell scripting. Can anyone of you tell me how to kill all the processes at a time for a particular user?(No listing the process ID of each process in the kill -9 command).
Thanks in Advance,
-Hary (5 Replies)
Discussion started by: tadi18
5 Replies
2. Shell Programming and Scripting
:confused:Hi All,
I have a folder on Sun Solaris 5.8 SPAC and I'm trying to build a monitoring shell or perl script that sends an email to a user whenever a file was put into this folder.
issue:
if I create a new file in the folder using like 'touch newfile', then the newfile has a current... (9 Replies)
Discussion started by: bizheng
9 Replies
3. UNIX for Dummies Questions & Answers
what is kill -6 command in unix..??
are there any other similar commands.?
ex: kil -1, kill -1 to 8..?
thanks (2 Replies)
Discussion started by: abhi_123
2 Replies
4. UNIX for Advanced & Expert Users
We think we may have an IO problem.
We have 2 identical Oracle servers with the exact same objects in each database. In one database, the first time a query is executed and the data is moved to SGA from disk the query takes about 40 seconds. However, in the other data base, when the query is... (3 Replies)
Discussion started by: shawn_holman
3 Replies
5. UNIX for Dummies Questions & Answers
I like to know how to monitor the UNIX CPU/memory status over time. I need to data to do some graphical representation of the server load. I sort of need to keep track of the vmstat but i dont know how. I hope someone would kindly help me out. thanks. (1 Reply)
Discussion started by: shingpui
1 Replies
6. UNIX for Dummies Questions & Answers
What commands would you recommend in order to monitor things like when a user logs on to a server, assuming you know that user's name on the server? (2 Replies)
Discussion started by: Sotau
2 Replies
7. Shell Programming and Scripting
GM,
Can you pls help how to write a script to monitor different processes on different unix servers and send the output to a /tmp/report file, earlier my boss asked me to write a script to monitor just one process running on different servers and send the output to a file so I wrote this
exec... (0 Replies)
Discussion started by: baders
0 Replies
8. 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
9. Shell Programming and Scripting
Hi all,
Tearing my hair out..!
I have a requirement to monitor and restart a unix process via a simple watchdog script.
I have the following 3 scripts that dont work for me..
script 1 (only produces 1 output if process is up or not)... (4 Replies)
Discussion started by: jonnyd
4 Replies
10. Shell Programming and Scripting
Hi,
I am using sql server 2008 version and invoking the stored procedure using unix script. I want to know the procedure of killing the stored procedure in sql server.
If I kill -9 the unix script will it also terminate the process at the SQL server. When I executed the kill -9 PID in unix... (2 Replies)
Discussion started by: Rahul Raj
2 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)