linux ps sample
ps -ef|grep "myswooleserver.php"| grep -v "grep" | wc -l 4 cpc@cpc-Aspire-6935:~/Downloads$ ps -ef|grep "myswooleserver.php"| grep -v "grep" cpc 16849 16472 0 15:06 pts/3 00:00:00 php /home/cpc/Downloads/myswooleserver.php cpc 16850 16849 0 15:06 pts/3 00:00:00 php /home/cpc/Downloads/myswooleserver.php cpc 16853 16850 0 15:06 pts/3 00:00:00 php /home/cpc/Downloads/myswooleserver.php cpc 16854 16850 0 15:06 pts/3 00:00:00 php /home/cpc/Downloads/myswooleserver.php cpc@cpc-Aspire-6935:~/Downloads$ ./myswoolelauncher.sh 4 cpc@cpc-Aspire-6935:~/Downloads$ ./myswoolelauncher.sh 0 cpc@cpc-Aspire-6935:~/Downloads$ ps -fe|grep "myswooleserver.php"| grep -v "grep" cpc 17113 16472 0 15:14 pts/3 00:00:00 php /home/cpc/Downloads/myswooleserver.php cpc 17114 17113 0 15:14 pts/3 00:00:00 php /home/cpc/Downloads/myswooleserver.php cpc 17117 17114 0 15:14 pts/3 00:00:00 php /home/cpc/Downloads/myswooleserver.php cpc 17118 17114 0 15:14 pts/3 00:00:00 php /home/cpc/Downloads/myswooleserver.php cpc@cpc-Aspire-6935:~/Downloads$ ps -eaf |grep "myswooleserver.php" | grep -v "grep"| awk '{print $2}' 17113 17114 17117 17118 cpc@cpc-Aspire-6935:~/Downloads$ ps -eaf |grep "myswooleserver.php" | grep -v "grep"| awk '{print $2}'|xargs 17113 17114 17117 17118
some of them