Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Command to check if a particular process is running Post 302425958 by vr3w3c9 on Monday 31st of May 2010 06:38:50 AM
Old 05-31-2010
Hi

I have executed the command in the server. Please find the below results that I received.


# prstat -a
-bash: prstat: command not found.

---------- Post updated at 05:38 AM ---------- Previous update was at 05:30 AM ----------

Hi

Mine is a Linux system. I tried executing the lsof command and it lists all the process that are running in the system. It seems to work fine. But Im not sure how to identify the binary file. Can you please help me on how to identify the binary file. When I execute the lsof command on the binary file, specified above, I get the below result

lsof /bin/bash
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
run.sh 4711 platrgatxt REG 253,0 773216 65619 /bin/bash
run.sh 4795 platrga txt REG 253,0 773216 65619 /bin/bash
sod.sh 5440 root txt REG 253,0 773216 65619 /bin/bash
bash 6859 vr4637 txt REG 253,0 773216 65619 /bin/bash
bash 6887 root txt REG 253,0 773216 65619 /bin/bash
run.sh 29881 platrga txt REG 253,0 773216 65619 /bin/bash


The above does not seem to list the process that Im intrested in. Please Assist. Thanks
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

check process running

I have this script: ------------------------------------------------------- #!/bin/ksh # if ] || ] then echo "Executing main_load.sh script" /usr1/psc_load/jobs/cron/main_load.sh "ods" else echo "File not found, do nothing" fi exit 0 ... (4 Replies)
Discussion started by: rose1207
4 Replies

2. Shell Programming and Scripting

script to check if process is running

How do I make a shell script to see if a certain process is running. The process shows up on ps aux as /usr/sbin/daemon eg: if /usr/sbin/daemon else #nothin basically i want to run the process if it isnt running/ has been stopped. Thanks. (2 Replies)
Discussion started by: daydreamer
2 Replies

3. Shell Programming and Scripting

Check if Process is running

Hi , I have a csh code below which check the process if it's running. Can any expert advise me on the following: 1) what does this notationmean ">!" and how is it different from the append ">" notation ? 2) how does "setenv" work in this code ? # Check whether there is a running... (3 Replies)
Discussion started by: Raynon
3 Replies

4. UNIX and Linux Applications

How to check if process is running?

Hi I would like to check if an instance of a script is already running. I've seen many different examples, but I haven't the slightest idea as to how to do this. Can you please help. Thank you. (5 Replies)
Discussion started by: ladyAnne
5 Replies

5. Programming

How do I check if a process is running in C

How to I check if a process is running in C? I'm trying to use ps aux |grep "process name" but failing in doing that. How do I do that? Thanks, (1 Reply)
Discussion started by: cprogdude
1 Replies

6. Shell Programming and Scripting

Script to check running of process

Hi, Can anyone please tell me how to write a shell script to check whether a process if running or not.... if its still running then wait for sometime and if not then run the next query. Also, Under my one main script main.sh I have to run 2 scripts simutaneously which take some time to... (2 Replies)
Discussion started by: lovepujain
2 Replies

7. Shell Programming and Scripting

need to check if the process is running

Hi, I check if the process is running or not using the below. /usr/ucb/ps auxww | grep 109 |grep rmi | awk '{print $2}' 9718 Thus we see 9718 is the PID. It return blank if the process is not running. I need to perform some action if the process is not running and leave it if... (8 Replies)
Discussion started by: shifahim
8 Replies

8. UNIX for Dummies Questions & Answers

How a process can check if a particular process is running on different machine?

I have process1 running on one machine and generating some log file. Now another process which can be launched on any machine wants to know if process1 is running or not and also in case it is running it wants to stream the logs file generated by process1 on terminal from which process2 is... (2 Replies)
Discussion started by: saurabhnsit2001
2 Replies

9. Shell Programming and Scripting

Looping to check the currently running process.

Hi Gurus, t=`ps -u irb|grep -v grep|grep BSNL_PAYMENT_C` echo $t if then echo $? echo "Process Creation is Running ...." else echo "Process went down at $dat $tim" fi How would i use loop so that the script continously checks for the current status of this process.... (1 Reply)
Discussion started by: ankitknit
1 Replies

10. Shell Programming and Scripting

Check if process is running if not then use command

Hello, Could someone do the following bash ubuntu script for me? I have 5 screen processes of bot: SCREEN -dmS Xbot_instance_1 php core.php -i 1 SCREEN -dmS Xbot_instance_2 php core.php -i 2 SCREEN -dmS Xbot_instance_3 php core.php -i 3 SCREEN -dmS Xbot_instance_4 php core.php -i 4 ... (2 Replies)
Discussion started by: kotch
2 Replies
GIT-CHECK-ATTR(1)						    Git Manual							 GIT-CHECK-ATTR(1)

NAME
git-check-attr - Display gitattributes information SYNOPSIS
git check-attr attr... [--] pathname... git check-attr --stdin [-z] attr... < <list-of-paths> DESCRIPTION
For every pathname, this command will list if each attribute is unspecified, set, or unset as a gitattribute on that pathname. OPTIONS
--stdin Read file names from stdin instead of from the command-line. -z Only meaningful with --stdin; paths are separated with a NUL character instead of a linefeed character. -- Interpret all preceding arguments as attributes and all following arguments as path names. If not supplied, only the first argument will be treated as an attribute. OUTPUT
The output is of the form: <path> COLON SP <attribute> COLON SP <info> LF <path> is the path of a file being queried, <attribute> is an attribute being queried and <info> can be either: unspecified when the attribute is not defined for the path. unset when the attribute is defined as false. set when the attribute is defined as true. <value> when a value has been assigned to the attribute. EXAMPLES
In the examples, the following .gitattributes file is used: .ft C *.java diff=java -crlf myAttr NoMyAttr.java !myAttr README caveat=unspecified .ft o Listing a single attribute: .ft C $ git check-attr diff org/example/MyClass.java org/example/MyClass.java: diff: java .ft o Listing multiple attributes for a file: .ft C $ git check-attr crlf diff myAttr -- org/example/MyClass.java org/example/MyClass.java: crlf: unset org/example/MyClass.java: diff: java org/example/MyClass.java: myAttr: set .ft o Listing an attribute for multiple files: .ft C $ git check-attr myAttr -- org/example/MyClass.java org/example/NoMyAttr.java org/example/MyClass.java: myAttr: set org/example/NoMyAttr.java: myAttr: unspecified .ft o Not all values are equally unambiguous: .ft C $ git check-attr caveat README README: caveat: unspecified .ft SEE ALSO
gitattributes(5). AUTHOR
Written by Junio C Hamano <gitster@pobox.com[1]> DOCUMENTATION
Documentation by James Bowes. GIT
Part of the git(1) suite NOTES
1. gitster@pobox.com mailto:gitster@pobox.com Git 1.7.1 07/05/2010 GIT-CHECK-ATTR(1)
All times are GMT -4. The time now is 03:24 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy