User Tools

Site Tools


check_if_a_process_is_running

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
check_if_a_process_is_running [2015/01/08 15:01]
admin
check_if_a_process_is_running [2015/01/08 15:04] (current)
Line 1: Line 1:
 ===command to determine if process is running=== ===command to determine if process is running===
  
 +Example : 
  
 +<file bash grep_process_test.sh>​
 +ps cax | grep httpd
 +if [ $? -eq 0 ]; then
 +  echo "​Process is running."​
 +else
 +  echo "​Process is not running."​
 +fi
 +</​file>​
  
 Source : [[http://​stackoverflow.com/​questions/​9117507/​linux-unix-command-to-determine-if-process-is-running|External Link]] Source : [[http://​stackoverflow.com/​questions/​9117507/​linux-unix-command-to-determine-if-process-is-running|External Link]]
check_if_a_process_is_running.txt ยท Last modified: 2015/01/08 15:04 (external edit)