SWATCH(8)

NAME
swatch - simple watcher

SYNOPSIS
swatch [ -c config_file ] [ -r restart_time ] [ -P pattern_separator ] [ -A action_separator ] [ -I input_record_separator ] [[ -f file_to_examine ] | [ -p program_to_pipe_from ] | [ -t file_to_tail ]]

DESCRIPTION
Swatch is designed to monitor system activity. Swatch requires a configuration file which contains pattern(s) to look for and action(s) to do when each pattern is found.

OPTIONS

-c filename
    Use filename as the configuration file.

-r restart_time
    Automatically restart at specified time. Time can be in any of the following formats:

    +hh:mm
        Restart after the specified time where hh is hours and mm is minutes.

    hh:mm[am|pm]
        Restart at the specified time.

        -P pattern_separator
            Tells swatch(8) to use pattern_separator when parsing the patterns in the configuration file. The default is a comma.

        -A action_separator
            Tells swatch(8) to use action_separator when parsing the actions in the configuration file. The default is a comma.

        -I input_record_separator
            Tells swatch(8) to use input_record_separator as the character(s) which mark the boundary of each input record. The default is a carriage return.

        You may specify only one of the following options:

        -f filename
            Use filename as the file to examine. Swatch will do a single pass through the named file.

        -p program_name
            Examine input piped in from the program_name.

        -t filename
            Examine lines of text as they are added to filename.

        If swatch is called with no options, it is the same as typing the command line

            swatch -c ~/.swatchrc -t /var/log/syslog

SEE ALSO
swatch(5), signal(3)

AUTHOR
E. Todd Atkins (Todd.Atkins@CAST.Stanford.EDU)
Computer Administration Support Team
Distributed Computing Group
Stanford University

NOTES
Upon receiving a ALRM or HUP signal swatch will re-read the configuration file and restart. Swatch will terminate gracefully when it receives a QUIT, TERM, or INT signal.