Proctools

pgrep, pkill and pfind for OpenBSD and Darwin (Mac OS X)

Current version is 0.4pre1 (07 Dec 2003).

The proctools are text-based utilities to scan for and send signals to processes.

Features and History

pgrep and pkill appeared in Solaris 7 and have now been recreated for other operating systems. The proctools in this distribution have the same command-line interface as the Solaris versions as well as some additional features.

 New in 2003:  Proctools 0.4 includes pfind, which uses a syntax similar to the traditional find(1) tool. This provides precise process matching and interactive control of signals. Its features overlap with both pgrep and pkill.

Online manuals are available for pfind(1), pgrep(1) and pkill(1).

Development, Feedback, Distribution

Please see <http://sourceforge.net/projects/proctools> for further information and downloads. The proctools are distributed under the terms of the BSD license. Feedback may be sent to j-devenish and wfaulk at the users.sourceforge.net e-mail domain.

The proctools can be compiled from the files distributed at this site or via the OpenBSD ports tree (ports/sysutils/proctools). When compiling for Darwin, use the bsdmake tool.

Examples

pgrep sendmail

Prints the process IDs of all sendmail processes.

pgrep -G daemon -v

Prints the process IDs of all processes whose group ID is not daemon.

pgrep -d, -u root sh

Prints the process IDs of all shells whose effective user ID is root, separated by commas.

 New in 2003:  pgrep -u root -r ssh

Prints the process IDs of all ssh processes whose effective user ID is not root.

 New in 2003:  pfind ssh -not -user root

Prints the process IDs of all ssh processes whose effective user ID is not root.

 New in 2003:  pfind -user root -any perl -details -ask -then QUIT

Prints the command line of all root's perl processes, then prompts whether to send SIGQUIT to each.


Hosted at SourceForge.