Sponsored Content
Full Discussion: Kill -9 -1 combination
Top Forums UNIX for Beginners Questions & Answers Kill -9 -1 combination Post 303040982 by alexcol on Monday 11th of November 2019 03:12:59 PM
Old 11-11-2019
Good afternnon:

Thank you very much all of you for your help

This is 1 of 4th web application node using apache as a webserver, and as a Production env it receives all the htpp traffic from internet throuh a load balancer called (F5 -A10) and by a java process called germ.jar open sockets to port 89xx (load balancer), so below is the information:

Code:
$ /bin/bash --version
GNU bash, version 4.2.46(2)-release (x86_64-redhat-linux-gnu)
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later

Code:
$ uname -a
Linux serverbam04.nh 4.1.12-124.15.2.el7uek.x86_64 #2 SMP Tue May 22 11:52:31 PDT 2018 x86_64 x86_64 x86_64 GNU/Linux

Code:
openjdk version "1.8.0_171"
OpenJDK Runtime Environment (build 1.8.0_171-b10)
OpenJDK 64-Bit Server VM (build 25.171-b10, mixed mode)

webserver apache

Code:
EE-plus-7.0.2/lib/openejb-javaagent.jar -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -classpath /usr/share/tomEE-plus-7.0.2/bin/bootstrap.jar:/usr/share/tomEE-plus-7.0.2/bin/tomcat-juli.jar -Dcatalina.base=/usr/share/tomEE-plus-7.0.2 -Dcatalina.home=/usr/share/tomEE-plus-7.0.2 -Djava.io.tmpdir=/usr/share/tomEE-plus-7.0.2/temp org.apache.catalina.startup.Bootstrap start

The reason why i asked whad does kill -9 -1 does is because our web application provider suggested every time we shut down the app, i will have to run this command to make sure all session are cleaned, but i didnt know how powerful or dangerous this command will be

some time ago the user med has 1615 processes because a shell that runs every 5 minutes got stuck and blocked the node, and we contact aour System Administrator but these processes could never get killed and this node had to be started

Code:
med+ 32737     1  0 14:49 ?        00:00:00 /bin/bash /app/perm/backend/check_port_process/CHECK_PORT_PROCESS_MAIN.sh
 32742     1  0 13:15 ?        00:00:00 /bin/bash /app/perm/backend/check_port_process/CHECK_PORT_PROCESS_MAIN.sh
$ ps -fu med|wc -l
1615

kill command
Code:
ps -fu med | grep -v grep | awk '{print $2}' | xargs kill -9

Thanks again for your help
 

10 More Discussions You Might Find Interesting

1. Filesystems, Disks and Memory

Partition combination

Hi all I've got MacOSX server which is a UNIX based system. I've got 2 partiontion an I like to make just one partition on he disk without loosing any data on part1. Is there a way to do that kind of thing in UNIX or do I have to format everything and put up the system again? Thanx for reading... (3 Replies)
Discussion started by: gardarm
3 Replies

2. UNIX for Advanced & Expert Users

When kill doesnt work, how to kill a process ?

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

kill(0,-9) don't kill the process

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. UNIX for Dummies Questions & Answers

combination of two commands

I want to show a output like this Lee Ballancore PID TTY TIME CMD 31799 pts/3 00:00:00 vim 31866 pts/3 00:00:00 vim 2495 pts/7 00:00:00 vim 8368 pts/0 00:00:00 vim 9544 pts/2 00:00:00 ps Alistairr Rutherford PID TTY TIME CMD 8368 pts/0 00:00:00 vim 9544 pts/2 00:00:00 ps ... (3 Replies)
Discussion started by: nehaquick
3 Replies

5. Shell Programming and Scripting

Kill a process without using kill command

Sorry, posted the question in other forum. (0 Replies)
Discussion started by: sudhamacs
0 Replies

6. Linux

Kill a process without using kill command

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

7. Shell Programming and Scripting

Combination of numbers

Hello Group, I have a file of data that contain 1 2 3 4 5 I request you help with a shell script for generate all posible combination of these numbers with the following output: Example: 1 + 2 + 3 + 4 + 5 = 2 + 2 + 3 + 4 + 5 = 3 + 2 + 3 + 4 + 5 = Thanks in advance. Carlos (7 Replies)
Discussion started by: csierra
7 Replies

8. Shell Programming and Scripting

Kill an specific process ID using the KILL and GREP commands

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. Programming

6 digits combination

Is there any program that can create 6 digit numbers with: (DIGIT_1)+(DIGIT_2)+(DIGIT_3)+(DIGIT_4)+(DIGIT_5)+(DIGIT_6)=10 Any perl or C also can. Anyone can help me? Thank you (6 Replies)
Discussion started by: Tzeronone
6 Replies

10. Shell Programming and Scripting

Combination of 6 nos

Hi folks, I have a numbers from 1-100 and from these nos I have 30 numbers.. From this 30 nos, I have to generate a combination of 6 nos... this 30 numbers will range from 1-100... ( FYI: This is not a lottery game - just kidding) ... I am trying out this in a shell script.. any ideas ? (3 Replies)
Discussion started by: gsiva
3 Replies
KILLALL(1)							   User Commands							KILLALL(1)

NAME
killall - kill processes by name SYNOPSIS
killall [-e,--exact] [-g,--process-group] [-i,--interactive] [-q,--quiet] [-v,--verbose] [-w,--wait] [-V,--version] [-S,--sid] [-c,--con- text] [-s,--signal signal] [--] name ... killall -l killall -V,--version DESCRIPTION
killall sends a signal to all processes running any of the specified commands. If no signal name is specified, SIGTERM is sent. Signals can be specified either by name (e.g. -HUP) or by number (e.g. -1). If the command name contains a slash (/), processes executing that particular file will be selected for killing, independent of their name. killall returns a zero return code if at least one process has been killed for each ilisted command. killall returns zero otherwise. A killall process never kills itself (but may kill other killall processes). OPTIONS
-e, --exact Require an exact match for very long names. If a command name is longer than 15 characters, the full name may be unavailable (i.e. it is swapped out). In this case, killall will kill everything that matches within the first 15 characters. With -e, such entries are skipped. killall prints a message for each skipped entry if -v is specified in addition to -e, -g, --process-group Kill the process group to which the process belongs. The kill signal is only sent once per group, even if multiple processes belong- ing to the same process group were found. -i, --interactive Interactively ask for confirmation before killing. -l, --list List all known signal names. -q, --quiet Do not complain if no processes were killed. -v, --verbose Report if the signal was successfully sent. -V, --version Display version information. -w, --wait Wait for all killed processes to die. killall checks once per second if any of the killed processes still exist and only returns if none are left. Note that killall may wait forever if the signal was ignored, had no effect, or if the process stays in zombie state. -S (Flask only) Specify SID: kill only processes with given SID. Mutually exclusive with -c argument. Must precede other arguments on command line. -c (Flask only) Specify security context: kill only processes with given security context. Mutually exclusive with -s. Must precede other arguments on the command line. FILES
/proc location of the proc file system KNOWN BUGS
Killing by file only works for executables that are kept open during execution, i.e. impure executables can't be killed this way. Be warned that typing killall name may not have the desired effect on non-Linux systems, especially when done by a privileged user. killall -w doesn't detect if a process disappears and is replaced by a new process with the same PID between scans. AUTHORS
Werner Almesberger <Werner.Almesberger@epfl.ch> wrote the original version of psmisc. Since version 20 Craig Small <csmall@small.drop- bear.id.au> can be blamed. SEE ALSO
kill(1), fuser(1), pgrep(1), pidof(1), ps(1), kill(2) Linux March 25, 2001 KILLALL(1)
All times are GMT -4. The time now is 01:57 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy