Process Watcher (pswatch)

This command runs Unix `ps` command periodically and reports to the user either by email, sms or desktop notification about the process. It can be used for example to monitor length processes. Here at CERN I am working on profiling AliRoot. To get more info on what is AliRoot please go through my previous blog entry.

How it Works

pswatch runs a itz own daemon process (``) which periodically checks the existence of the processes in the watch list. The script `` is used to add process on the watch list. `` lists the processes on the watch list. `` used to remove a process from the watch list. The process watch lists are maintained as files in the temporary folder. These files store information about each of the process on the watch list in addition to how the process completion has to be notified. The configuration file is $HOME/.pswatchrc


The entire source code can be downloaded from here. Please go through the README file for more detail.


untar the source code and execute the installation script INSTALL

$ tar -xvf pswatch.tar.gz


The daemon process. To start it run as `nohup &`. Please note that you cannot add processes on the watch list until the daemon is active. So first step to do is to run the daemon.

$ nohup pswatch &

Add process on the watch list. Use as ` 2343 SMS DESKTOP`. 2343 is the PID of the process. After that it can have at max 3 options. SMS, DESKTOP, EMAIL. You need to specify the email address etc on the file $HOME/.pswatchrc


List process on the watch list. Use as ``


Remove process from the watch list. Use as ` 2343`.

$ 2343


This software developed my Manohar Kuse. In case of problems in it do not hesitate of contact.

mkuse ]]AT[[
swaroopcool21 ]]AT[[

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s