10-19-2016
Quote:
Originally Posted by
Don Cragun
I will note that kill -9 won't hurt the OS.
Yes, but only in principle. If a process has allocated a lot of shared memory which it *should* free on exit but won't (because it is killed with signal 9) that may not be hurtful for the OS directly but it definitely will make the runtime stability of the system deteriorate. My bad for not articulating that more specifically.
Quote:
Originally Posted by
Don Cragun
But, arbitrarily logging out users and killing the jobs they were running (especially the job that had been running for 10 hours and would have successfully finished if allowed to run 5 more minutes, but will need to run for another 10 hours and 5 minutes since it was killed) is a sure way to have irate users banging on your desk the next morning.
Like above: yes and no. You are right if we operate a classical Unix system, but in the industry this is rarely the case. Most companies have either specialised non-personal users for this sort of jobs which could easily be excluded from the general purge i proposed - it was just a general suggestion on how to do it - or have job schedulers in place. Typical IBM shops (it was mentioned they run AIX, which is IBMs Unix) are coming from the host and most have an (or even several) IBM mainframe(s) along with AIX, many have Linux too (on x86- as well as POWER-platforms) and Windows servers. In such a diverse environment you don't use cron as a scheduler but something more platform-independent: Control-M from BMC, for instance (but also UC4 and many others).
This in turn means: if a user has a running process he shouldn't have it run anyways and it can be killed for convenience at any time.
About the superfluous
cut: yes, you are right. Point taken.
I hope this helps.
bakunin
These 3 Users Gave Thanks to bakunin For This Post:
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I have a stubborn process on my OpenBSD box that just refuses to die. It is taking up about half a meg of memory and refuses to die. It appears to be an errant gzip process that was executed from the console on 06 Jan 2002.
Here is a snippet of my attempts to kill the gzip process
... (7 Replies)
Discussion started by: auswipe
7 Replies
2. UNIX for Dummies Questions & Answers
in aix, do a who -uH, by seeing the pts/number, we can do a
ps -ef | grep pts/number to see what processes the terminal is running, then how do we kill them? (3 Replies)
Discussion started by: yls177
3 Replies
3. Shell Programming and Scripting
can I do
ps -ef | grep <process_name>
and kill the process is it exists?
and send a mail to me that the process was found and killed
Thanks much...
KS (4 Replies)
Discussion started by: skotapal
4 Replies
4. UNIX for Dummies Questions & Answers
I can kill running processes on my linux red hat system using ctrl-c but cannot do it from command line of another terminal using kill -2 pid. Although I can kill them from command line using kill -9 pid and other signals. I would like to do it using the kill -2 pid.
Thanks for your suggestions (6 Replies)
Discussion started by: bbhayana
6 Replies
5. Shell Programming and Scripting
Hello,
I need to create a process that will kill a specific process if it's running. Let's just say the process is called win, actually called something else. It could be running multiple times on the machine and I would want to kill them all. Below is the code I have written so far, and it... (6 Replies)
Discussion started by: benefactr
6 Replies
6. Shell Programming and Scripting
Hi Friends,
I am new to this forum as well as new to shell scripting.
I have a problem here and i need someone to solve this.
Let us consider there are two processes(abc & def).There is a script which kills these two processes(i.e killtheprocess abc). Here abc is the argument .
There is a... (1 Reply)
Discussion started by: Prince89
1 Replies
7. UNIX for Dummies Questions & Answers
Hi,
First, I am running a scipt.While the script is running I realize that I dont want the script to be run so I am killing the script externally.Before the process gets terminated or killed it should delete all the temporary files created by the script.How to do this?Can anyone help me?
... (3 Replies)
Discussion started by: arthi
3 Replies
8. Shell Programming and Scripting
Hi friends,
i m in big trouble....
i have one script which connects two server ...like below..
script1.sh
-------------------------------------
bash test.sh &
eval x=$@
export x=`echo $x`
#echo $x
#
ssh user@8.2.5.6 bash /mbbv/location/script.sh $x|sed '/Binary file/d'... (1 Reply)
Discussion started by: Shahul
1 Replies
9. Shell Programming and Scripting
I had issues with processes locking up. This script checks for processes and kills them if they are older than a certain time.
Its uses some functions you'll need to define or remove, like slog() which I use for logging, and is_running() which checks if this script is already running so you can... (0 Replies)
Discussion started by: sukerman
0 Replies
10. Shell Programming and Scripting
Hi ,
I have a list of application process id's.
Is there a way to kill all the process listed below using the script, except the once which are starting with " Genesis "
adm 1522 ABC_Process.tra
adm 1939 Genesis_Process.tra
adm 2729 Genesis_Archive.tra
adm 3259 xyz_Process.tra (5 Replies)
Discussion started by: murali1687
5 Replies
LEARN ABOUT HPUX
strclean
strclean(1M) strclean(1M)
NAME
strclean - remove outdated STREAMS error log files
SYNOPSIS
logdir] age]
DESCRIPTION
cleans the STREAMS error logger directory of log files mm-dd) that contain error messages sent by the STREAMS log driver, strlog(7). If
the option is not used to specify another directory, removes error log files in the directory. If the option is not used to specify
another age, removes error log files that have not been modified in three days.
Options
recognizes the following options and command-line arguments:
Specifies a directory for the location of the
STREAMS error log files to be removed if this is not the default directory
Specifies a maximum age in days for the
STREAMS error log files if this not the default age of 3. The value of age must be an integer greater than or less than 3.
EXAMPLES
Remove day-old error log files from a directory called
FILES
One or more error log file or files on which operates. The mm-dd in the filename indicates the month and day of the messages con-
tained in the file.
NLS catalog for
SEE ALSO
strerr(1M), strlog(7).
strclean(1M)