Sponsored Content
Top Forums UNIX for Advanced & Expert Users Finding Out When A Process Has Finished? Post 9623 by guest100 on Wednesday 31st of October 2001 07:15:19 AM
Old 10-31-2001
Yes , with ps -ef you can check the proccess fine. Also consider 'top'. It is an application that will tell you alot about applications running.
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

finding process id

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

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
LOCKS(3)						   libbash locks Library Manual 						  LOCKS(3)

NAME
locks -- libbash library that implements locking (directory based). This library is not throughoutly tested - use with caution! SYNOPSIS
dirInitLock <object> [<spin>] dirTryLock <object> dirLock <object> dirUnlock <object> dirDestroyLock <object> DESCRIPTION
General locks is a collection of functions that implement locking (mutex like) in bash scripting language. The whole idea is based on the fact that directory creation/removal is an atomic process. The creation of this library was inspired by studying CVS locks management. Same lock object can by used by several processes to serialize access to some shared resource. (Well, yeah, this what locks were invented for...) To actually do this, processes just need to access lock object by the same name. Functions list: dirInitLock Initialize a lock object for your proccess dirTryLock Try to lock the lock object - give up if its already locked dirLock Lock the lock object - will block until object is unlocked dirUnlock Unlock the lock object dirDestroyLock Destroy the lock object - free resources Detailed interface description follows. FUNCTIONS DESCRIPTIONS
dirInitLock <object> [<spin>] Initialize a lock object for your process. Only after a lock is initialized, your proccess will be able to use it. Notice: This action does not lock the object. The lock can be set on two types of objects. The first is an existing directory. In this case, Aq dir must be a path (relative or full). The path must contain a '/'. The second is an abstract object used as a lock. In this case, the name of the lock will not contain any '/'. This can be used to create locks without creating real directories for them. Notice: Do not call your lock object '.lock'. Parameters: <object> The name of the lock object (either existing directory or abstract name) <spin> The time (in seconds) that the funtion dirLock will wait between two runs of dirTryLock. This parameter is optional, and its value gen- erally should be less then 1. If ommited, a default value (0.01) is set. Return Value: One of the following: 0 The action finished successfully. 1 The action failed. You do not have permissions to preform it. 3 The directory path could not be resolved. Possibly parameter does contain '/', but refers to directory that does not exist. dirTryLock <object> Try to lock the lock object. The function always returns immediately. Parameters: <object> The object that the lock is set on. Return Value: One of the following: 0 The action finished successfully. 1 The action failed. The object is already locked. 2 The action failed. Your proccess did not initialize a lock for the object. 3 The directory path could not be resolved. dirLock <object> Lock given lock object. If the object is already locked - the function will block untill the object is unlocked. After each try (dirTry- Lock) the function will sleep for spin seconds (spin is defined using dirInitLock ). Parameters: <object> The directory that the lock is set on. Return Value: One of the following: 0 The action finished successfully. 2 The action failed. Your proccess did not initialize a lock for the directory. 3 The directory path could not be resolved. dirUnlock <dir> Unlock the lock object. Parameters: <object> The object that the lock is set on. Return Value: One of the following: 0 The action finished successfully. 2 The action failed. Your proccess did not initialize the lock. 3 The directory path could not be resolved. dirDestroyLock <object> Destroys the lock object. After this action the proccess will no longer be able to use the lock object. To use the object after this action is done, one must initialize the lock, using dirInitLock. Parameters: <object> The directory that the lock is set on. Return Value: One of the following: 0 The action finished successfully. 1 The action failed. The directory is locked by your own proccess. Unlock it first. 2 The action failed. Your proccess did not initialize the lock. 3 The directory path could not be resolved. EXAMPLES
Creating an abstract lock named mylock, with 0.1 second spintime: $ dirInitLock mylock 0.1 # $?=0 Locking it: $ dirLock mylock # $?=0 Trying once to lock it again: $ dirTryLock mylock # $?=1 Trying to lock it again: $ dirLock mylock # Will wait forever Unlocking: $ dirUnlock mylock # $?=0 Destroying the lock: $ dirDestroyLock mylock # $?=0 Trying to lock again: $ dirLock mylock # $?=2 Creating a lock on the directory ./mydir, with default spin time: $ dirInitLock ./mydir # $?=0 AUTHORS
Hai Zaar <haizaar@haizaar.com> Gil Ran <gil@ran4.net> SEE ALSO
ldbash(1), libbash(1) Linux Epoch Linux
All times are GMT -4. The time now is 09:23 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy