linux verifier qu'un processus tourne
Par PlaceOweb le mercredi, octobre 31 2012, 10:58 - Système - Lien permanent
www-data 6241 0.0 0.0 10644 1516 pts/0 S+ 10:00 0:00 | \_ /bin/bash ./websocket.daemon.placeoweb.sh www-data 6242 0.0 0.2 121544 11144 pts/0 S+ 10:00 0:00 | \_ php project.demo.php ps --no-headers -o comm= -p `cat /usr/local/squid/logs/squid.pid` # pgrep bash 13953 25016 # pidof bash 6241 pgrep bash pidof bash # ps --no-headers -o comm= -p `pidof bash` websocket.daemo # ps -C websocket.daemon PID TTY TIME CMD 6241 pts/0 00:00:00 websocket.daemo # ps --no-headers -C websocket.daemon 6241 pts/0 00:00:00 websocket.daemo # ps --no-headers -o comm= -C websocket.daemon.placeoweb.sh websocket.daemo # ps -f -C websocket.daemon.placeoweb.sh UID PID PPID C STIME TTY TIME CMD www-data 6241 22787 0 10:00 pts/0 00:00:00 /bin/bash ./websocket.daemon.placeoweb.sh # ps -o pid= -C websocket.daemon.placeoweb.sh 6241 ps -o pid= -C websocket.daemon.placeoweb.sh || (cd /DATA/www/ && ./websocket.daemon.placeoweb.sh) 6241 ps -o pid= -C websocket.daemon.placeoweb.sh || (cd /DATA/www/ && ./websocket.daemon.placeoweb.sh)