Skip to content

dirkm/pward

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PWARD(1)			 User Manuals			      PWARD(1)



NAME
       pward - check if a set of processes stays alive

SYNOPSIS
       pward [ OPTION ] ... [ PID ] ...

DESCRIPTION
       pward  observes	a  set	of  processes  given  at  the command-line. By
       default, pward stops when all these processes have  died.   Optionally,
       it stops when a configurable number of processes has died, or when less
       than a number of processes is still running.  It can be	configured  to
       execute a command before stopping.

OPTIONS
       -r, --running=n
	      stop  monitoring when no more than n processes are still running
	      (default 0)

       -s, --stopped=n
	      stop monitoring when at least n processes have stopped  (default
	      1)

       -e, --exec=command
	      Execute  command	after the treshold is met, and before pward is
	      stopped.	The command  is executed in the starting directory.

       -v, --verbose
	      summarize monitored processes at startup.

       -b, --batch
	      don't perform sanity checks at input. This can  be  useful  when
	      invoked from a script.

       -h, --help
	      print a help message at startup.

       [PID]  space separated list of process-ids to be monitored.


FILES
       /proc  location of the proc file system


ENVIRONMENT
DIAGNOSTICS
       The following diagnostics may be issued on stderr:

       command failed
	      the command in the -exec option failed to execute.

       cannot access /proc.
	      pward has no access to the proc filesystem.


BUGS
       pward  checks  processes  by polling the proc-table.  This is portable,
       but an implementation with modern kernel features would be  more  effi-
       cient.

       pward is only tested on linux (32/64 bits).


EXAMPLES
       pward `pgrep emerge` -v -i10 -e"shutdown -h +10"

       Shuts  down  the  machine  10 minutes after emerge finished.  Some info
       about the monitored processes is dumped to the console at startup.  The
       polling	interval  is  set to 10 seconds.  The user needs the rights to
       shutdown the machine for this to work.


AUTHOR
       Dirk Moermans <dirkmoermans @ gmail.com>

SEE ALSO
       pgrep(1), pkill(1), top(1), wait(1)



Linux				   July 2010			      PWARD(1)

About

check if a set of processes stays alive

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages