SLAC CMLOG Home Page - Browser Help


The cmlog browser is used to view messages in the cmlog system. It can be used to view historical messages that were logged some time in the past, or near-real-time messages as they are logged.

Invoking the Java Browser on PEPII Solaris:

  1. Type: source /afs/slac/g/cd/soft/dev/script/ENVS.csh
  2. Type: jcmlog
  3. The java browser will begin a new session

Invoking the Motif Browser on PEPII Solaris or LCLS Linux

    Type the command: "cmlog" at the unix prompt with any (or none) of the following options:

    -(c)onnect:  automatic connection to the server.
    -(u)pdate:  automatically put cmlog into updating mode.
    -f filename:  use provided config file.
    -cfg file:   use provided config file (same as -f).
    -q:   do a query with a query message and a time interval provided in a config file
    -hu:   do a query with a query message and a time interval specified in a config file and put cmlog into updating mode
    -h:   this help


Using the browser after it comes up on your display.


1. Select 'connect' on the file pulldown menu. This connects to the server. Skip this step is you invoked the browser with -u or -c.

2. Select 'update' or 'query' on the Options pull down menu. Skip this step is you invoked the browser with -u

To view messages as they are logged into cmlog you want the UPDATE option. After selecting 'update', you will be prompted for the selection string. At that point, just hit OK to see all messages that occur. Instead of hitting OK, you can enter a selection string (see Selection String Syntax section below).

To query for messages that occurred in the past (historical messages), you want the QUERY option. After selecting 'query',
    a. Select the time interval using the buttons.
    b. Enter any selection string to narrow down the selection
        (selection syntax is described below).
    c. Optionally push the 'get all messages' button.
    d. Optionally change the slider for number of messages to retrieve.
    e. Push the ok button.

3. Select 'disconnect' and then 'exit' on the file pulldown menu when you are done.

Selection string syntax for queries or updates.



The easiest way to enter a selection string for queries or updates is to use the help menu. To get to the help menu, push the 'help' button on the Query or Update dialog boxes. On the help menu, you enter field values to the right, then select a verb in the middle, then check the box to the left for that field.
When searching for strings, it is best to use the 'has' verb (also called 'like') instead of "= =" because "= =" is very sensitive to leading or trailing blanks.

In this document, "= =" means two equal signs in a row.

Alternately, instead of using the help menu, as you get more experienced, you may with to enter the selection syntax directly in the Query or Update dialog box using the following method.

The selection syntax is very similar to the C logic expression. For a simple query, specify a tag on the left, then an "= =", and then a string for which to search.

For example: Host = = 'sdr00ioc00' (real simple example)
For example: Facility = = 'EPICS' && Severity > 10 (more complicated example)

All tags (eg. Facility, Host, Severity) must be either the title of the column on the cmlog browser or a real cdev tag name (e.g. status e.g. host).

All strings must be in single quotes (e.g. 'sdr00ioc00').

You can also do a simple pattern match if you want to search for substrings. For example, the query for a substring match might look like this if you're looking for the substring 'OK':
Message like 'OK'

A complicated query will slowdown the server. Always try to use a simple query message and/or limit the time frame being searched.

Saving the browser configuration.

1. If the user saves the configuration (pull down the Preferences menu and hit "save current settings", then a file called ".cmlogrc" is created in the home directory. In a future release of cmlog, that file will contain the complete setup of the browser. But it doesn't in this release. It just saves what ever it read from the CMLOG_CONFIG file.

That .cmlogrc file is currently used when you start cmlog browser regardless of the settings below. It takes priority over the CMLOG_CONFIG setting.

2. There is an environment variable called CMLOG_CONFIG. If the user sets that to the path/name of a file, that file will be used.

3. If there is no .cmlogrc file and CMLOG_CONFIG is not set, then default settings are used.

So, for now, what a user needs to do to have the widths be wider when the browser comes up is to save a .cmlogrc file from the pull down menu. That saves his own configuration file. He can then edit that file and add his own widths. Alternately, he can define CMLOG_CONFIG to point to some file with his setting in it (he put them there with a text editor).

Saving browser output (messages) to a file and how to print messages.


On the browser, select FILE-->SAVE_SCREEN
That allows you to save messages displayed on the screen to a file.
Then, optionally edit the file
Then print the file using the lpr command for example.

WARNING: THE SAVE_SCREEN command saves to the default directory where you were cd'ed when you started the browser.

RETURN TO SLAC CMLOG HOME PAGE 

SLAC Last modified: 11-Jun- 2007 by RonM