Monitor Command Line Interface
The command line interface (CLI) version of Monitor provides the same monitoring functionality as the GUI version.
CLI Monitor runs on the Windows and Linux platforms supported by Pervasive PSQL:
On Windows, the executable program is bmon.bat and is installed, by default, in the \bin directory of the Pervasive PSQL installation directory. See Where are the Pervasive PSQL files installed? in Getting Started With Pervasive PSQL.
On Linux, the executable program name is bmon and is located, by default, in the /usr/local/psql/bin directory. Certain requirements must be met before you can run bmon on Linux. These requirements are the same as for another Java utility, bcfg. See Requirements for Running bcfg on Linux, and Troubleshooting Guide for Running bcfg on Linux.
Configuration File
Bmon requires a configuration file to provide its settings. Pervasive PSQL provides a sample configuration file named monconfig.txt. It is located, by default, in the \bin directory of the Pervasive PSQL installation directory. See Where are the Pervasive PSQL files installed? in Getting Started With Pervasive PSQL.
Refer to the comments in the sample configuration file for the settings that you can configure.
Monitoring Output
Output from Bmon can be directed to the console, a log file, or both. An application could, for example, check for a particular condition from the console or in a log file, then take appropriate action.
The configuration file specifies where to direct the output.
Command Syntax
bmon -f [filepath]config_file [-runonce]
Options
Keyboard Key Response If Runonce Parameter Omitted
The runonce parameter is optional. If omitted, the utility executes the settings in the configuration file, then pauses for the duration of the refresh rate. During the pause, you can send the utility a valid keyboard key response as shown in Table 42.
If the refresh rate is set to zero, the utility pauses indefinitely until it receives a valid keyboard key response. The refreshrate setting in the configuration file specifies how many seconds to pause. By default, refreshrate is set to the minimal allowed value of 5 seconds.
Q (or q) + Enter stops execution of bmon
R (or r) + Enter refreshes the monitoring (runs bmon again)
refreshrate=seconds_to_pause
where seconds_to_pause is a whole number 5 or greater
(pause for seconds_to_pause seconds)
Q (or q) + Enter stops execution of bmon