Next: , Previous: Introduction, Up: Top   [Contents][Index]


2 Invoking alive

Running ‘alive’ is easy. Simply type ‘alive’ at the shell prompt followed by RET. You can use the shell’s i/o redirection facilities to filter/suppress the output, and its job control facilities to have ‘alive’ execute in the background. For example, with GNU Bash (see GNU Software):

$ alive >/dev/null &

Two other modes of operation are available:

$ alive --version
$ alive --help

That’s it! Quite boring, no? The real fun lies in playing with the configuration, either before starting ‘alive’, or while it runs. See Configuration.

Additionally, ‘alive’ responds to certain signals in a more or less well-defined manner. To send it a signal, first note its pid (process id), displayed on the first line output:

$ alive
alive: 2012-08-11 16:24:26 restart (pid 9731)
[...]

The pid in this example is 9731. Next, use the command-line utility ‘kill’:

$ kill -INT 9731

or Emacs command signal-process:

M-x signal-process RET 9731 RET 2 RET

specifying this pid and the signal to send. All unhandled signals (not described in the following table) will cause ‘alive’ to die unceremoniously. To see a list, try ‘kill -l’. Handled signals, on the other hand, elicit an acknowledgement on stdout, e.g., ‘received signal 2 (SIGINT)’.

SIGALRM

Interrupt the current sleep(2). This is useful if you change the configuration and don’t want to wait for the next iteration.

SIGHUP
SIGUSR1

Restart. This is useful if you forget the pid.

SIGINT
SIGQUIT
SIGTERM

Shut down, i.e., display ‘exiting’ and exit successfully.


Next: , Previous: Introduction, Up: Top   [Contents][Index]