10-31-2001
ps and top require a nontrivial amount of resources to run. And then you still must parse the output. The cheapest way to see if a process is running is via the kill() system call. If you call kill with signal set to zero, error checking is performed but no signal is actually sent.
This works from the shell as well. You can do "kill -0 $pid" and then check the return code. If it worked, the process is still alive.
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
is there a way to find the process id of a process because i have same process invoked several times.
when i need to kill them, i get confused with the id.
Thanks,
sskb
:( (8 Replies)
Discussion started by: sskb
8 Replies
2. UNIX for Dummies Questions & Answers
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
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
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
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
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
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
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
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
LEARN ABOUT DEBIAN
opal-checkpoint
OPAL-CHECKPOINT(1) 1.4.5 OPAL-CHECKPOINT(1)
NAME
opal-checkpoint - Checkpoint a running sequential process using the Open PAL Checkpoint/Restart Service (CRS).
Note: This should only be used by the user if the application being checkpointed is an OPAL-only application. If it is an Open RTE or Open
MPI program their respective tools should be used.
SYNOPSIS
opal-checkpoint [ options ] <PID>
Options
opal-checkpoint will attempt to notify a running process that it has been requested that the process checkpoint itself. A snapshot handle
reference is presented to the user, which is used in opal_restart to restart the process.
<PID> Process ID of the running target process.
-h | --help
Display help for this command
--term After checkpointing the running process, terminate it.
-v | --verbose
Enable verbose output for debugging.
-n | --name
Request a specific name for the local snapshot reference.
-w | --where
Request that the local snapshot reference be placed in a specific location.
-gmca | --gmca <key> <value>
Pass global MCA parameters that are applicable to all contexts. <key> is the parameter name; <value> is the parameter value.
-mca | --mca <key> <value>
Send arguments to various MCA modules.
DESCRIPTION
opal-checkpoint can be invoked multiple, non-overlapping times. This allows the user to take involuntary checkpoints of a running sequen-
tial process. See opal_crs(7) for more information about the CRS framework and components. It is convenient to note that the user does not
need to spectify the checkpointer to be used here, as that is determined completely by the running process being checkpointed.
SEE ALSO
opal-restart(1), opal_crs(7)
Open MPI Feb 10, 2012 OPAL-CHECKPOINT(1)