Sponsored Content
Full Discussion: finding process id
Top Forums UNIX for Dummies Questions & Answers finding process id Post 18991 by killerserv on Thursday 4th of April 2002 07:17:57 PM
Old 04-04-2002
best way if you can do ps -aux im sure the process name that you are running. If you can try ps --username for the current process that you execute, by this way you have a idea on which process can be killed, rather then confused of all the systems process. One more suggestion ps -eo "%p" actually it will lists out the normal default output and easy for you to kill (works on AIX havent try on any other OS's) Give a try post back if this doesnt help..
 

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Finding Out When A Process Has Finished?

Problem I have an application which basically runs lots of UNIX programs remotely, using the Telnet protocol. For each program it remotely executes, it stores the process ID (PID) for that process. At regular intervals, I would like my application to take the PID for every process still... (5 Replies)
Discussion started by: 1cuervo
5 Replies

2. UNIX for Dummies Questions & Answers

Finding out process id in a scipt

Hi, If in a shell script i write a command ls > bla & ls The output is redirected to bla and the next ls starts as first one is going on in background. I want to find the PID of the first command. Thanks in advance (2 Replies)
Discussion started by: vibhor_agarwali
2 Replies

3. Shell Programming and Scripting

finding Background Process Id

Hi Gurus, How can i find background process is completed or not. I have mentioned my scenario below. Actually Pr1 Process is running in back ground, i just want to know whether this process completed or not. I can come to know the process id by typing pid=$! but i want to trigger... (4 Replies)
Discussion started by: krk_555
4 Replies

4. Linux

Need help in finding process

Hello, Iam running a apache webserver in CentOS recenlty a hacker has attacked my server using RFI attack and did something in my server.. After that everyday at 8Pm my httpd is using about 5000 pid's actually in normal it takes only about 30 - 40 pid's. and also exim uses 2000 pid's totally my... (2 Replies)
Discussion started by: dheeraj4uuu
2 Replies

5. Shell Programming and Scripting

Finding the process id of the process using the ports

Hi Any idea how to get the process id of the process using the ports lsof -i :portnumber does not work in my machine. I am on sun Solaris SPARC. Any suggestion is highly appreciated (1 Reply)
Discussion started by: kinny
1 Replies

6. UNIX for Advanced & Expert Users

Finding process id of subsequent process

hi all, I am trying to find the process id of the subsequent process created via fork and exec calls in perl. For eg: envVarSetter dataCruncher.exe < input.txt > output.txt When I fork and exec the above command, it returns only the pid of envVarSetter and I don't know how to find the... (9 Replies)
Discussion started by: matrixmadhan
9 Replies

7. UNIX for Dummies Questions & Answers

Finding a rogue process

Afternoon all, hopefully someone can give me a hand with this (the following may be explained very poorly :rolleyes: ) I know there's a process running on one of our Solaris 10 boxes that runs approximately every 5 minutes. Unfortunately I've no idea, who owns it, what it is called, or how it is... (2 Replies)
Discussion started by: dlam
2 Replies

8. Shell Programming and Scripting

Finding process which ended another process

Hello, The scenario is as follows, I have a background process running initially for which i know the PID on machine1. I use ssh from machine 2 to execute a script in machine 1. For some reason the back ground process is terminated. I would like to know which process caused the... (6 Replies)
Discussion started by: prasbala
6 Replies

9. Shell Programming and Scripting

Finding a file process ?

Hi, I am trying to find a file that have a different name than it should be processing, the file name is ( Fifa15 ) is there a command to use? I got that file by ps -ef | grep fifa15 but how do I know what is running ? thanks a lot, I am learning unix so sorry if that is a... (2 Replies)
Discussion started by: latinooo
2 Replies
kill(2) 							System Calls Manual							   kill(2)

Name
       kill - send signal to a process

Syntax
       #include <sys/types.h>
       #include <signal.h>

       kill(pid, sig)
       pid_t pid;
       int sig;

Description
       The  system  call sends the signal sig to a process specified by the process number pid.  The sig can be a signal specified in a call or it
       can be 0.  If the sig is 0, error checking is performed, but a signal is not sent.  This call can be used to check the validity of pid.

       The sending and receiving processes must have the same effective user ID, otherwise this call is  restricted  to  the  superuser  with  the
       exception of the signal SIGCONT.  The signal SIGCONT can always be sent to a child or grandchild of the current process.

       If the process number is 0, the signal is sent to all other processes in the sender's process group.

       If  the process number is negative but not -1, the signal is sent to all processes whose process-group-id is equal to the absolute value of
       the process number.

       The above two options are variants of

       If the process number is -1, and the user is the superuser, the signal is broadcast for all processes except to system  processes  and  the
       process sending the signal.

       Processes may send signals to themselves.

Environment
       System Five
       POSIX

       When  your  program  is	compiled in the System V or POSIX environment, a signal is sent if either the real or effective uid of the sending
       process matches the real or saved-set-uid (as described in ) of the receiving process. In addition, any process can use a pid  of  -1,  and
       the signal is sent to all processes subject to these permission checks.

       In POSIX mode, the pid argument is of type pid_t.

Return Values
       Upon successful completion, a value of 0 is returned.  Otherwise, a value of -1 is returned, and is set to indicate the error.

Diagnostics
       The system call fails under the following conditions:

       [EINVAL]       The sig is not a valid signal number.

       [EPERM]	      The  sending  process  is not the superuser, and its effective user ID does not match the effective user ID of the receiving
		      process.

       [ESRCH]	      No process can be found corresponding to that specified by pid.

See Also
       execve(2), getpgrp(2), getpid(2), killpg(2), sigvec(2), pause(3)

																	   kill(2)
All times are GMT -4. The time now is 03:57 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy