monitor Command

The monitor command is used to provide details about server memory use, active database sessions, and active execution threads.

This page discusses:

User Level

System Administrators

Monitor Memory

The monitor memory command issues memory statistics for the Collaboration server.

Syntax

Only users with System Administrators privileges can execute the monitor memory command.

monitor memory;

This command is available only on Windows and HP platforms.

Here is an example monitor memory output for a server on Windows with Java 1.4:

Used heap 6667360 bytes, free heap 1182488 bytes. 
JVM total memory: 2031616 
JVM free memory: 916072 
JVM memory in use: 1115544

For MQL processes, the JVM memory statistics are included in the “monitor memory” output only if the JVM has been loaded (that is, if a JPO invokes it directly or via a trigger).

While the monitor memory command is available on all platforms, general heap information obtained from the OS is included only on HP and Windows. Memory manager and JVM memory information is output on all platforms.

JVM Memory Details

JVM memory statistics are part of the output of monitor memory and monitor context commands. Output varies depending on platform and Java version. For example, additional fields with Java 1.5 might look like:

JVM total memory: 661782528
JVM max memory: 661782528
JVM free memory: 649235280
JVM memory in use: 12547248
JVM available processors: 4

Following is sample output for the monitor context command, taken using a Studio Customization Toolkit program that mimics Studio Modeling Platform MQL functionality. The string named after the session name (current ) indicates the context corresponding to the current user session.

mql>monitor context
Pooled session cache: 0 bytes

4 context objects

Session PUF93l21k9lAjAH0hy0O2WOZCYOhggu2dvWd0owsfT9DDHzH1I5P|-263669613110616712
0/167839130/6/7001/7001/7002/7002/7001/-1
    User:   'Test Everything' logged in
    Vault:  'eService Sample'
    Last:   t@2208, select.bosBusinessObject
    Last recorded cache size: 0
    idle:   14 minutes 52 seconds
    0 active sessions

Session mx1027692483622676970837 (current)
    User:   'creator' logged in
    Vault:  'ADMINISTRATION'
    Last:   t@2104, executeCmd.bosMQLCommand
    Last recorded cache size: 0
    Idle: 0 seconds
    1 active session
      session 0
        transaction active,readonly,wait
        0 cached entries, 0 bytes

Session mx10277030735012117155733
    User:   'creator' logged in
    Vault:  'ADMINISTRATION'
    Last:   t@1940, executeCmd.bosMQLCommand
    Last recorded cache size: 505579
    idle:   5 seconds
    2 active sessions
      session 0
        transaction active,update,wait
          savepoint save1
        3 cached entries, 3192 bytes
      session 1
        transaction active,update,wait
        3 cached entries, 502387 bytes

Session mx1027703338082-1990050644
    User:   'creator' logged out
    Vault:  'ADMINISTRATION'
    Last:   t@2284, executeCmd.bosMQLCommand
    Last recorded cache size: 0
    idle:   11 minutes 39 seconds
    0 active sessions

Total cache size: 505579 bytes

If a context is currently executing at the time another context issues the monitor context command, output for the active session will resemble the following:

Session PUGpAOiBm3OcnMK5Bk27QcQYjcm2iq2UwMQzxh9KGjTTddp52xkr|-263669613110616712
0/167839130/6/7001/7001/7002/7002/7001/-1
    User:   'Test Everything' logged in
    Vault:  'eService Sample'
    Last:   t@1956, executeCmd.bosMQLCommand
    Active: 2 seconds
    Last recorded cache size: 0 (update requested; reissue monitor context command)
*** Cannot report session stats - session is active ***

The above sample shows the “Active” time for the session, and a warning message states “…session is active.”

In the interest of thread safety, monitor context processing reports only what is safe to report. Access to cache and transaction information during monitor context processing is done in a thread-safe fashion so it does not impact system performance and stability of other sessions and the system as a whole.

Monitor Context

The monitor context command is used to count and list currently registered context objects and give statistics.

Only users with System Administrator privileges can execute the monitor context command.

The monitor context command provides the following information per session:

  • Number of contexts
  • Idle versus active session
  • Total cached bytes
  • Session ID
  • Context set/logged in status
  • Username
  • Timestamp for and name of last Studio Customization Toolkit call and thread on which it executed
  • Transaction status (for example: active, mode, savepoints, and so on)
  • Estimate of context-specific cache size in use, if possible, for each active session

The command displays the following environment information for all sessions:

  • Total number of sessions
  • Total session cache size
  • Pooled session cache size
  • JVM memory statistics

Use this syntax:

monitor context [SESSION-ID] [set|!set] [terse] [xml];

  • SESSION-ID is used to limit the display of session information to the context object for the specified session ID. If not used, all sessions are reported.
  • The [set|!set] option limits the display of session information to contexts that are marked as “set” or “not set” respectively. (The Studio Customization Toolkit context.shutdown() method will mark a context “not set.”) Use this option only when the session ID is not specified.
  • terse displays only cumulative statistics and statistics, not individual sessions.
  • xml displays the statistics in XML format.

Monitor Server

The monitor server command can be issued against a running server through the emxRunMQL admin tool, or by connecting directly to the server from a separate standalone Java program or custom JSP. Any user can execute the monitor server command to print details of all active threads (though not Java stack trace information as it is included with kill -QUIT command).

monitor server [age SECONDS] [port] [filename FILENAME [append]];
  • Include age SECONDS to limit the list of Studio Customization Toolkit calls found in the core to those running for longer than the specified number of seconds.
  • Include port to report the MX_DEBUG_PORT number on which the server is listening, or -1 if not listening.
  • Include filename FILENAME to dump the output to the file specified, to be created in the directory pointed to by the MX_TRACE_FILE_PATH variable on the server. If the file already exists, you can specify append, or else the original file will be renamed with the date and timestamp.

The port and age options are mutually exclusive.

There is no special user privilege required to execute the monitor server command.

Monitor Tenant

The monitor tenant command can be issued to monitor the tenants.

monitor tenant;