<< Previous Contents Index Next >>

6.5. Output disposition

The file, postprocess and postprocess-file statements control where the output is written to. At least one of the former two statements must be provided in a summary block.

6.5.1. Output file: the file statement

The file filename [backups] statement defines the file name to write the output to. filename name can contain strftime(3) arguments to base the file name on the time of the start time of the report.

The backups parameter, if specified, indicates how many times the file should be rotated, i.e. an existing file renamed to filename.1, filename.1 to filename.2 and so-on. backups can not be specified if filename contains strftime(3) arguments.

If file rotation is not performed and the output file already exists, the new report is appended to the existing file.

6.5.2. Output post-processing: the postprocess and postprocess-file statements

The postprocess shell-command statement allows a script or program to be run to parse the output of a summary. If the file statement is also provided, the standard output points to the output file (allowing the postprocessor to act as a filter); otherwise the output is sent back to the ipacc supervisor process for logging.

ipacc sets the following environment variables prior to launching the postprocessor:

The postprocess-file shell-command statement runs the command shell-command after the output file has been closed. The command has a single parameter, the file name of the newly written output file.

Note that if no file statement has been specified, the file name will not be supplied, however the command will still be run; this could be used to provide an independent notification that a summary had been completed.

A postprocess or postprocess-file shell command that returns a non-zero return code will cause ipacc to abort the summary and retry it later.


<< Previous Contents Index Next >>