Using StreamBase Monitor

Starting and Stopping StreamBase Monitor

You can view performance statistics for a running StreamBase application using either of two StreamBase Performance Monitor applications. This topic describes StreamBase Monitor, the command-line version of the Monitor applications.

Start the Windows version of StreamBase Monitor from a StreamBase Command Prompt (not a standard Windows command prompt), using the following command:

sbmonitor

The Windows version of StreamBase Monitor looks like the following example:

For UNIX, start StreamBase Monitor from a terminal with the same command, and do not use an ampersand after the command name. The command takes over terminal window you start in, much like the UNIX top utility. The UNIX version of StreamBase Monitor looks like the following example:

Alternate Startup Options

Without arguments, StreamBase Monitor connects to the default StreamBase Server URI, sb://localhost:10000. To connect to another server instance, use the –u option to specify a different URI. See sburi for the format of StreamBase URIs.

The following example connects to a non-default port on a remote server:

sbmonitor –u sb://wayfast.example.com:9900

To connect to a local server instance running on a non-standard port, use the –p option:

sbmonitor –p 10007

Using Command Keys

In both UNIX and Windows versions, you can alter the StreamBase Monitor display and sort columns by pressing the following keys:

C

Toggles container names on and off in the Operator Name column of the Operators view. When monitoring a single-container application where the only container is named default, toggle container names off for a cleaner presentation. When monitoring an application with more than one container, leave container names enabled.

H or ?

Replaces the bottom portion of the screen with help text. Press H or ? again to see the second page of help text. Type S again on the second page to exit help mode, or type Q to exit help mode from either help text page.

L

Toggles the bottom portion of the screen between Threads view and Queues view. Threads view is the default on sbmonitor startup.

P

Toggles the top portion of the screen between Operators view and Profile view. Operators view is the default on sbmonitor startup.

S

Enables and disables column-sort mode for the Operators view. In column-sort mode, which is enabled by default, use the left and right arrow keys to select another column heading. The display automatically re-sorts based on the selected column. Type S to exit column sort mode.

Q

Exits StreamBase Monitor back to the terminal prompt, or exits the H help text screen.

The StreamBase Monitor Window

StreamBase Monitor can display the following information views in the main window.

Operators View

Shows statistics for the StreamBase operators in all containers in the connected server. This is the default view in the top portion of the screen when sbmonitor starts. Press P to toggle between the Operators and Profile views in the top portion.

Threads View

Shows statistics for threads running in the connected server. This is the default view in the bottom portion of the screen when sbmonitor starts. Press L to toggle between the Threads and Queues views in the bottom portion.

Profile View

Shows a snapshot of profiling information for StreamBase operators in the currently connected server.

Queues View

Shows the number of tuples enqueued for each stream in the connected server.

Snapshot Interval

StreamBase Servers collect statistics for every snapshot interval. The default snapshot interval is one second, but you can adjust the length of the interval with the sbmonitor element in the server's configuration file. See sbmonitor .

Most statistics shown in StreamBase Monitor were collected by the server in the most recent snapshot interval. However, some statistics are cumulative, such as the statistics in the Queues View. Cumulative statistics are collected since the server was started, which is the T+nnn number shown in the top line of the StreamBase Monitor screen.

Top Two Lines

The first two lines of the StreamBase Monitor window show the following information:

T+nnn sec

The uptime in seconds of the connected StreamBase Server instance. Cumulative statistics are collected for this time period.

Memory

The memory consumption of the connected StreamBase Server instance for the most recent snapshot interval, showing:

  • The total memory allocated by the server for its use.

  • The amount of memory currently used by the server.

  • The amount of memory available to use by the server.

  • The maximum memory allocatable for the server's use. (You can increase this amount by adjusting the java-vm element of the server's configuration file. See java-vm .)

Deq

The number of dequeue connections to the connected server.

Enq

The number of enqueue connections to the connected server.

Column Heading Reminder Screen

You can view a reminder screen of the column heading information at the UNIX shell prompt or StreamBase Command Prompt with the following command:

sbmonitor -k

Operators View

The Operators View is the default view in the top portion of the screen when sbmonitor starts. Press P to toggle between the Operators and Profile views in the top portion.

This view shows the StreamBase operators currently in use on the connected server, and shows statistics about each operator.

Operators View Columns

  • Operator Name. The name of each operator qualified with its container name. Press C to toggle on and off the container names in this column.

  • In. The number of tuples enqueued on this operator's input queues during this most recent snapshot interval.

  • Out. The number of tuples output by this operator in the past second.

  • w-us/T. The exponentially weighted moving average of wall-clock time per input tuple in microseconds.

  • %Time. The current percentage of time spent in this operator.

  • Size. This value is operator dependent. For Query operators, this is the number of rows of the attached Query Table. For Aggregate operators, it is the number of windows open. For all other operators it is N/A.

Threads View

The Threads View is the default view in the bottom portion of the screen when sbmonitor starts. Press L to toggle between the Threads and Queues views in the bottom portion.

This is an advanced view that shows information about threads used by components in the currently running StreamBase application. This view is of particular interest when your application uses the data concurrency option for operators and adapters. See Execution Order, Concurrency, and Parallelism for more on using parallel execution.

Threads View Columns

  • Thread Name. The name of each thread.

  • %CPU. The amount of total system CPU time spent by this thread. (%User + %Sys).

  • %User. The amount of CPU time spent at user level by this thread.

  • %Sys. The amount of CPU time spent at system level by this thread.

Profile View

Press P to toggle on the Profile View in the top portion of the screen.

The Profile View shows statistics accumulated since the connected StreamBase Server instance started, which is shown by the T+nnn time in the top line. The statistics collected are the same as shown in the Operators View, and the column headings are the same as described in Operator View Columns above. The difference is that the Operators View shows what was true in the last snapshot interval (by default, one second), while the Profile View shows the accumulated statistics since the server and its application started.

You can reconnect to the server with sbmonitor at any time to see the latest accumulated profile information. The longer an application has been running, the more accurate the profiling information. See Profiling StreamBase Applications for an overview of StreamBase profiling.

Queues View

Press L to toggle on the Queues View in the bottom portion of the screen.

The Queues View is an advanced view for troubleshooting complex StreamBase applications that use concurrency features or container connections. For applications that do not use those features, this view shows your application's input and output streams, including control streams in the system container, and generally shows 1 in the Max Size column and 0 in the Latest Size column.

Queue refers to the queue of tuples waiting to exit a stream. Every input and output stream has a queue, but the queue is normally emptied very quickly as tuples flow smoothly through an application. Thus, in a healthy application, queue sizes should be zero or close to zero. The Queues View helps you diagnose possible bottlenecks in your application by identifying queues with a high tuple count.

In complex applications, the queues of interest in the Queues View are the following:

  • In StreamBase Studio, you can flag most operators and adapters to run in separate, parallel threads, using the Concurrency tab of the component's Properties view. For StreamSQL applications, you can flag Java operators, embedded adapters, and modules to run in separate threads using the APPLY PARALLEL keyword. In this case, use the Queues View to monitor the queues of parallel threads. See Execution Order, Concurrency, and Parallelism for more on using parallel execution.

  • An application configured with multiple containers can have container connections, where the output of a stream in one container is received as input to a stream in another container. If a queue for a stream in a container connection is backing up, it indicates that the downstream container (and its application) are slower than the stream produced by the upstream container. See Container Connections for further information.

Queues View Columns

  • Queue Name. Queue names include the name of each input and output stream in your application, including streams in the system container; the names of each thread for operators with parallel execution threads; and the names of container connections.

  • Latest Size. The approximate number of tuples currently waiting in the queue for this stream in the current snapshot interval.

  • Max Size. The maximum number of tuples that enqueued for this stream since the connected server started.

Related Topics

Back to Top ^