Sponsored Content
Operating Systems AIX Kill multiple processes ran by root Post 303005629 by jeffs42885 on Friday 20th of October 2017 10:22:24 AM
Old 10-20-2017
Kill multiple processes ran by root

Hi all,

I have about 5-6 daemons specific to my application running in the background. I am trying to write a script to stop them. Usually, I run them as a non-root ID, which is fine. But for some reason the client insists on using root.

I do have sudo.

I just tried something like this

Code:
sudo ps ax|grep deamon|awk '{print $1}'|xargs kill -9

kill: 15663166: 0509-013 Permission denied.

kill: 16711728: 0509-013 Permission denied.

kill: 16974010: 0509-013 Permission denied.

kill: 17301670: 0509-013 Permission denied.

kill: 18153676: 0509-013 Permission denied.

kill: 21102690: 0509-013 Permission denied.

kill: 21627104: 0509-013 Permission denied.

kill: 22937744: 0509-013 Permission denied.

kill: 23134276: 0509-013 Permission denied.

kill: 25231382: 0509-015 The specified process does not exist.

This is AIX by the way
 

10 More Discussions You Might Find Interesting

1. Programming

C program to kill root processes

Hello, First let me start by saying I have searched the forum and read all the SUID stuff but it is not in the neighborhood I am looking for. Here is the problem. We want to grant a non super-user permission to kill root processes but only if the process matches certain criteria. ... (8 Replies)
Discussion started by: TioTony
8 Replies

2. Filesystems, Disks and Memory

Ran out of space on /dev/root partition

hi, I have a SCO unix server which has a 36gb hard drive, but the IT company who supplied it assigned 1gb to /dev/root, 15mb to /dev/boot and 33gb to /dev/u. The /dev/root partition is now full, is there a way I can use the 33gb assigned to /dev/u without loosing any data, preferably... (2 Replies)
Discussion started by: Martyn
2 Replies

3. Shell Programming and Scripting

kill all processes

i have a very short file that has in it a line for a find command. now, when i run this script and I kill the script later, using the ps -ef | grep scriptname. i noticed kill -9 kills the script itself but does not kill the internal find command that it gave birth to. say theres a file... (0 Replies)
Discussion started by: Terrible
0 Replies

4. UNIX for Dummies Questions & Answers

Kill several processes at a time

Hello, ps -C a* returns the list of the process I need to kill. but ps -C a* -o pid | kill does not work and I can't get the syntax right. Thanks for any help (4 Replies)
Discussion started by: JCR
4 Replies

5. Solaris

kill processes

how to kill the processes of aperticular user? because i have nearly 25000 process are there for perticular user. i need to kill. Please provide the information? Regards, Rajesh (3 Replies)
Discussion started by: pmrajesh21
3 Replies

6. Solaris

kill the processes seen under ptree

Hi, How to kill the processes running under ptree ? I am noticing lot of processes running under ptree with ssh ? I tried to kill with -9 option which is not working ? Thanks, Radhika. (2 Replies)
Discussion started by: radhirk
2 Replies

7. Shell Programming and Scripting

Kill processes

for i in 'ps -f | grep textedit' do kill $i done I wrote this but it wont work. I am trying to find processes and kill them. Any help would be welcome. (1 Reply)
Discussion started by: hawaiifiver
1 Replies

8. Shell Programming and Scripting

kill all user processes

Hi there, i've been searching all over and i thought i had understood the way i should go to kill all the processes related to a user. But i'm getting more confused then i was. By lunch time i have to make a database backup, and for that all the users shoul logout. The problem is that many users... (4 Replies)
Discussion started by: vascobrito
4 Replies

9. Shell Programming and Scripting

kill multiple processes by name

Want to kill multiple processes by name. for the example below, I want to kill all 'proxy-stagerd_copy' processes. I tried this but didn't work: >> ps -ef|grep proxy_copy root 991 986 0 14:45:34 ? 0:04 proxy-stagerd root 1003 991 0 14:45:49 ? 0:01... (2 Replies)
Discussion started by: catalinawinemxr
2 Replies

10. UNIX for Dummies Questions & Answers

find the no of processes that ran 2 hours before or earlier

Is there a way to find out the total no of processes that were running ? - 2 or 3 hours before - list those no of processes (3 Replies)
Discussion started by: jansat
3 Replies
voliod(8)						      System Manager's Manual							 voliod(8)

NAME
voliod - Start, stop, and report on Logical Storage Manager kernel daemons SYNOPSIS
/sbin/voliod /sbin/voliod [-f] set count OPTIONS
The following option is used by voliod: Force the kill of the last I/O daemon. Without this option, the I/O daemons can only be reduced to one. DESCRIPTION
The voliod utility starts, stops, or reports on Logical Storage Manager I/O daemons. An I/O daemon is a process that provides a process context for processing any work that needs to be done to process Logical Storage Manager I/O. When invoked with no arguments, voliod prints the current number of volume I/O daemons on the standard output. When invoked with the set keyword, the number of daemons specified by count will be created. If more volume I/O daemons exist than are specified by count, then the excess processes will be terminated. If more than the maximum number are created (currently 64), the requested number will be silently truncated to that maximum. The number of daemons to create for general I/O handling depends on system load and usage. One daemon for each CPU on the system is gener- ally adequate, unless volume recovery seems unusually slow. Each I/O daemon starts in the background and creates an asynchronously-running kernel thread and becomes a volume I/O daemon. The voliod utility does not wait for these threads to complete. NOTES
LSM automatically sets the number of I/O daemons when the system starts, so it is usually not necessary to set or change the number of I/O daemons with this command. LSM I/O daemons cannot be killed directly through the use of signals. The number of Logical Storage Manager I/O daemons currently running can only be determined by running voliod; I/O daemons do not appear in the list of processes produced by the ps(1) command. EXIT CODES
The voliod utility prints a diagnostic on the standard error, and exits if an error is encountered. If an I/O error occurs within a spawned I/O daemon thread, then the I/O is not reflected in the exit status for voliod. Otherwise, voliod returns a nonzero exit status on errors. Usage errors result in an exit status of 1 and a usage message. If the requested number of daemons cannot be created, then the exit status is 2, and the number of daemons that were successfully started is reported. If any other error occurs, the exit status is 3. FILES
The device used to report on and start volume I/O daemon kernel threads. SEE ALSO
fork(2), volintro(8), vold(8), voldctl(8) ,pthread(8) voliod(8)
All times are GMT -4. The time now is 07:18 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy