PHP Classes

Process Killer: kill all instances of a unix process

Recommend this page to a friend!
     
  Info   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStar 51%Total: 1,276 All time: 3,012 This week: 571Up
Version License Categories
processkiller 1.0GNU General Publi...Unix, Console
Description 

Author

This class is meant to kill all instances of a Unix process by specifying its name.

It takes the name of the command to kill from the current script comand line arguments, uses the command ps to list all running processes and kills those with a name that matched the specified argument.

Picture of Ben Yacoub Hatem
Name: Ben Yacoub Hatem <contact>
Classes: 18 packages by
Country: Tunisia Tunisia
Age: 46
All time rank: 241 in Tunisia Tunisia
Week rank: 192 Down1 in Tunisia Tunisia Equal
Innovation award
Innovation award
Nominee: 4x

Details

Process Killer Author : Ben Yacoub Hatem <hatem at php dot net> This class is meant to kill all instances of a unix process by entering its name. Inspite of running "ps -aux", check the pid of the process and then kill it ... this script can help you to automate this task. Sample USAGE : For example run 2 instances of php $php & $php & $ps -aux then cd to Process killer directory $cd processkiller $php pkill.php php run again ps to verify that the 2 instances have been killed. $ps -aux Any comment ?

  Files folder image Files (3)  
File Role Description
Accessible without login Plain text file pkill.php Example sample usage of the class
Plain text file processkiller.class.php Class The main class
Accessible without login Plain text file readme.txt Doc. Readme file

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 0%
Total:1,276
This week:0
All time:3,012
This week:571Up
 User Ratings  
 
 All time
Utility:60%StarStarStarStar
Consistency:65%StarStarStarStar
Documentation:75%StarStarStarStar
Examples:75%StarStarStarStar
Tests:-
Videos:-
Overall:51%StarStarStar
Rank:2544