Show TOC

Monitoring JMS Provider Using TelnetLocate this document in the navigation structure

Use

Using Telnet commands you can access the following runtime information of the JMS Provider:

  • are there any messages that are sent but not acknowledged yet

  • when the last message was delivered for a particular destination to a consumer

  • does a particular destination have dead (undeliverable) messages

  • browse the messages in a particular Queue

  • what is the configuration and current status of a JMS Store-and-Forward Agent for a particular application

  • what is the size of the currently used message cache and the number of messages currently cashed on the server

  • does a particular consumer has message selector specified

  • list all consumers that match a certain regular expression search string

  • what are the connection stack trace files of a particular connection

Currently, all these monitors are available via the jms_monitor Telnet command in the jms group.

Procedure

Monitoring the JMS Provider using the jms_monitor command

The common syntax of the command is jms_monitor <commandOption> [-vp=<virtualProviderName>] [-additionalParameter] , where the name of the JMS Virtual Provider [-vp=<virtualProviderName>] is optional and the additional parameter can be one of the following:

  • [ -dest =<destination name> ] - specifies the name of a destination.

  • [ -app =<application name> ] - specifies the name of an application.

  • [ -reset =<yes|no> ] - this is a reset option for the dead messages flag. The default value is no .

  • [ -id =<object id> ] - specifies the id of an object, for example consumer id.

  • [ -hasselector =<value> ] - this is a filtering option that shows consumers with or without message selector specified.

    If the hasselector option is set to true , all consumers that have a message selector specified are listed. If it is set to false , all consumers that does not have a message selector are listed. The default value is ignore that shows all consumers no matter if they have a message selector or not.

  • [ -creator =<regular expression search string> ] - specifies a regular expression search string.

    To list JMS consumers using the creator option, the regular expression search string has to be one of the following:

    • a thread name;

    • a task name;

    • a subtask name;

  • [ -mode =<runtime|db> ] - Shows whether the distributed transactions are listed from the database or in runtime. By default are printed both - from the database and in runtime.

  • [ -full =<true|false> ] - If this parameter is set to true, it shows the full XID, if it is false, a short version of the XID is printed. By default its value is false.

Telnet Command

Description

Example

jms_monitor pending [-vp=<virtualProviderName>] [-dest=<destinationName>]

Pending messages are such messages, which are sent but not acknowledged yet. This monitor lists all pending messages for a given destination.

jms_monitor pending -vp=default -dest=sapDemoTopic

If you specify only the name of a Virtual Provider, you display all pending messages for all destinations that belong to that particular Virtual Provider.

jms_monitor pending -vp=default

If you do not specify any Virtual Provider or destination, you display all pending messages for all destinations and their corresponding Virtual Providers.

jms_monitor pending

jms_monitor lastDeliveryTime [-vp=<virtualProviderName>] [-dest=destinationName]

Displays the last time the message was delivered to a consumer registered to the specified destination.

jms_monitor lastDeliveryTime -vp=default -dest=sapDemoQueue

jms_monitor deadMessages [-vp=<virtualProviderName>] [-dest=destinationName] [-reset=yes|no]

Shows if there are any dead messages for the specified destination. If there are dead messages, the deadMessages flag is set to true. To reset the deadMessages flag for one or more destinations, use the -reset option. The default value is no .

jms_monitor deadMessages -vp=default -dest=sapDemoQueue -reset=no

jms_monitor browseQueue [-vp=<virtualProviderName>] [-dest=destinationName]

Creates a QueueBrowser to view the messages of the specified Queue.

Note

This monitor is available only for queues.

jms_monitor browseQueue -vp=default -dest=sapDemoQueue

jms_monitor safAgentStatus [-vp=<virtualProviderName>] [-dest=destinationName] [-app=applicationName]

Shows the status of the Store-and-Forward (SAF) Agent of the specified application and general information about its local and remote resources. The status of the SAF Agent can be: RUNNING, STOPPED, NOT_AVAILABLE.

If you do not specify any parameters, this command displays the status of all SAF Agents.

jms_monitor safAgentStatus -vp=default -dest=sapDemoQueue -app=sap.com/mySAFApplication

jms_monitor cacheInfo [-vp=<virtualProviderName>]

Shows the size of the currently used server-side message cache in bytes and the number of messages currently cashed on the server.

jms_monitor cacheInfo -vp=default

jms_monitor msg [-vp=<virtualProviderName>] [-dest=destinationName] [-id=yes]

Displays the messages from the database and from the cache for the specified destination.

If you do not specify the Virtual Provider, the messages are displayed for the default Virtual Provider.

If you do not specify the destination, the messages are displayed for all destinations of the default Virtual Provider.

If you do not specify the id option, the message id of the listed messages is not displayed. The message id is displayed only if you specify [-id=yes] .

jms_monitor msg -vp=default -dest=sapDemoTopic -id=yes

jms_monitor consumer [-vp=<virtualProviderName>] [-id=object id] [-dest=destinationName] [-hasselector=value] [-creator=regular expression search string]

Shows detailed information about a JMS consumer: its consumer ID, the destination it listens to, the Virtual Provider, whether it has a selector specified or not, and the key word or expression set for a search.

jms_monitor consumer -vp=default -creator=.*deploy.*

jms_monitor mdb [-vp=<virtualProviderName>] [-id=object id] [-dest=destinationName] [-hasselector=value] [-creator=regular expression search string] [-app=application name]

Shows detailed information about a JMS resource adapter: its ID, the destination it listens to, the Virtual Provider, the application name, whether it has a selector specified or not, and the key word or expression set for a search.

jms_monitor mdb -hasselector=true

jms_monitor list_mdb [-vp=<virtualProviderName>] [-dest=destinationName] [-hasselector=value] [-creator=regular expression search string] [-app=application name]

Shows a list of the resource adapters available.

jms_monitor list_mdb -app=MyTestApplication

jms_monitor xaTransactions [-vp=<virtualProviderName>] [-mode=runtime|db] [-full=<true|false>]

Shows detailed information about the available transaction in the runtime structures and from the database. of all available Virtual Providers.

If you specify -mode=runtime , the information is displayed for all transactions of all available Virtual Providers and you do not need to specify the [-vp=<virtualProviderName>] option.

If you specify -mode=db , the information is displayed for the given Virtual Provider. If you do not use the [-vp=<virtualProviderName>] option, the information is displayed for the default Virtual Provider.

More information: Using Distributed Transactions

jms_monitor xaTransactions -mode=runtime -full=false

jms_monitor xaTransactions -vp=default -mode=db -full=false

jms_monitor traceConnection [-vp=<virtualProviderName>] [-id=object id] [-dest=destinationName]

Displays the connection stack trace at the time the connection is created.

Note

To list this stack trace, you have to set the log severity of com.sap.jms to DEBUG.

More information about changing the log severity: Configuring Log Controllers

jms_monitor traceConnection -vp=default -dest=sapDemoQueue