NAME

brep-monitor – monitor brep infrastructure

SYNOPSIS

brep-monitor --help
brep-monitor --version
brep-monitor [options] brep-config toolchain [toolchain...]

toolchain = name[/version]

DESCRIPTION

brep-monitor analyzes the brep internal state and reports the infrastructure issues printing their descriptions to stderr.

The specified brep module configuration file (brep-config) is used to retrieve information required to access the databases and deduce the expected behavior. Most of this information can be overridden via the command line options.

Currently, only delayed package builds for the specified toolchains are reported. If toolchain version is omitted then all package builds with this toolchain name are considered.

brep-monitor maintains its own state in the brep build database. In particular, it records timestamps of the reported package build delays and optionally omits them from being reported again during the timeout specified with the --report-timeout option. If the timeout is unspecified, then the report timestamps are not updated. To report all delays and still update the timestamps specify the zero report timeout.

By default, a brief report is printed. Use the --full-report option to obtain the full report (which may be large).

Note that brep-monitor expects the build database schema to have already been created using brep-migrate(1).

OPTIONS

--soft-rebuild-timeout seconds
Time to wait (in seconds) before considering a package soft (re)build as delayed. If unspecified, it is the sum of the package rebuild timeout (soft rebuild timeout if the alternative timeout is unspecified and the maximum of two otherwise) and the build result timeout (see the build-soft-rebuild-timeout, build-alt-soft-rebuild-*, and build-result-timeout brep module configuration options for details). The special zero value disables monitoring of soft rebuilds.

Note that if both soft and hard rebuilds are disabled in the brep module configuration, then brep-monitor is unable to come up with a reasonable build timeout on its own. In this case, to monitor the initial package build delays, you may need to specify either --soft-rebuild-timeout or --hard-rebuild-timeout explicitly.

Also note that a package that was not built before it was archived is always considered as delayed. However, to distinguish this case from a situation where a package was archived before a configuration have been added, brep-monitor needs to observe the package as buildable for this configuration before it is archived. As result, if you run brep-monitor periodically (for example, as a cron job), then make sure its running period is less than the tenant archive timeout.

--hard-rebuild-timeout seconds
Time to wait (in seconds) before considering a package hard (re)build as delayed. If unspecified, it is calculated in the same way as for --soft-rebuild-timeout but using the build-hard-rebuild-timeout and build-alt-hard-rebuild-* brep module configuration options.
--report-timeout seconds
Time to wait (in seconds) before repeating a report of a package build delay. By default there is no timeout and all reports are repeated.
--full-report
Print the list of delayed package builds rather than just their number per build configuration.
--clean
Additionally clean the monitor state removing outdated information related to non-existent packages, configurations, etc.
--build-db-user|-u user
build database user name. If unspecified, then operating system (login) name is used.
--build-db-password pass
build database password. If unspecified, then login without password is expected to work.
--build-db-name|-n name
build database name. If unspecified, then brep's build-db-name configuration option value is used.
--build-db-host|-h host
build database host name, address, or socket. If unspecified, then brep's build-db-host configuration option value is used.
--build-db-port|-p port
build database port number. If unspecified, then brep's build-db-port configuration option value is used.
--pager path
The pager program to be used to show long text. Commonly used pager programs are less and more. You can also specify additional options that should be passed to the pager program with --pager-option. If an empty string is specified as the pager program, then no pager will be used. If the pager program is not explicitly specified, then brep-monitor will try to use less. If it is not available, then no pager will be used.
--pager-option opt
Additional option to be passed to the pager program. See --pager for more information on the pager program. Repeat this option to specify multiple pager options.
--help
Print usage information and exit.
--version
Print version and exit.

EXIT STATUS

0
Success.
1
Fatal error.
2
An instance of brep-monitor or some other brep utility is already running. Try again.
3
Recoverable database error. Try again.

BUGS

Send bug reports to the users@build2.org mailing list.