New JMX client for batch for V2.2

As part of changes to the batch component in the framework, a JMX command line utility has been released as Patch #8222333 available from My Oracle Support.

This utility allows the following:

  • Identify what thread pools are defined in a threadpoolworker

  • See what active jobs or threads are currently running

  • Be able to cancel a particular thread or a batch job

  • Gracefully shutdown a threadpoolworker

The command line utility is in the following format:

jmxbatchclient[.sh] [options]
where options are:
-c Cancel active threads.
-d Display details
-f Regular expression to filter by
-h Show this usage information.
-j The JMX URL to connect to. (Required)
-k Kill threadpool worker.
-l Suppress logging
-s Display summary

Options

Help -h:
Display the available options and their descriptions.

JMX URL-j:

Specify the JMX URL to connect to. This should match the spl.runtime.management.connector.url.default property specified in the threadpoolworker.properties.

For example:

jmxbatchclient.sh –j service:jmx:rmi:///jndi/rmi://myserver:9999/spl/fw/jmxConnector

Cancel Active threads -c:

Specifies that active threads should be cancelled. Can be used with –f option to cancel only jobs matching the regular expression provided.

Display details -d:

Display the details of the currently active threads.

jmxbatchclient.sh -j service:jmx:rmi:///jndi/rmi://myserver:9999/spl/fw/jmxConnector -d

Connecting to service:jmx:rmi:///jndi/rmi://myserver:9999/spl/fw/jmxConnector
ActiveGridNode
threadPools=[MYSERVER:5, SCHEDULER_DAEMON_THREAD_POOL:1, LOCAL_THREAD_POOL:b9835d11f15fd71b:1df6824f:120011dc94e:-8000:0]

BatchThread_ZZQABAT2_1_of_1.36
ElapsedTime = 0 yrs. 0 days 00:00:20
BatchCd = ZZQABAT2
ThreadCount = 1
ThreadNumber = 1
RerunNumber = 0
ProcessDate = 2009-03-13
MaximumCommitRecords = 200
MaximumTimeoutMinutes = 0
UserId = SYSUSER
LanguageCd = ENG
SoftParameters = []
MaxExecutionAttempts = 1
DateTimeStarted = 2009-03-13-11.54.02
DistThreadPool = MYSERVER
BatchNumber = 4
Status = Running
ProgramType = Java
ProgramName = com.splwg.cm.domain.qa.batch.QaBatch2
RunType = New Run

Regular expression filter -f:

If a large number of threads are currently active, a filter can be supplied to only display or cancel threads that match the pattern.

For example, if two active threads were displayed as follows:

jmxbatchclient.sh -j service:jmx:rmi:///jndi/rmi://myserver:9999/spl/fw/jmxConnector -d

Options: -j service:jmx:rmi:///jndi/rmi://myserver:9999/spl/fw/jmxConnector
Connecting to service:jmx:rmi:///jndi/rmi://myserver:9999/spl/fw/jmxConnector
ActiveGridNode
threadPools=[MYSERVER:5, LOCAL_THREAD_POOL:b9835d11f15fd71b:681ba91d:1200151a3c8:-8000:0, SCHEDULER_DAEMON_THREAD_POOL:1]

BatchThread_ZZQABAT1_1_of_1.31

BatchThread_ZZQABAT2_1_of_1.32

This can be filtered to show only the BAT1 with the option: -f .*BAT1.* as follows:

jmxbatchclient.sh -j service:jmx:rmi:///jndi/rmi://myserver:9999/spl/fw/jmxConnector -f .*BAT1.*

Options: -j service:jmx:rmi:///jndi/rmi://myserver:9999/spl/fw/jmxConnector -f .*BAT1.*
Connecting to service:jmx:rmi:///jndi/rmi://myserver:9999/spl/fw/jmxConnector
ActiveGridNode
threadPools=[MYSERVER:5, LOCAL_THREAD_POOL:b9835d11f15fd71b:681ba91d:1200151a3c8:-8000:0, SCHEDULER_DAEMON_THREAD_POOL:1]

BatchThread_ZZQABAT1_1_of_1.31

Kill threadpoolworker -k:

Specifying this option will result in the cancellation of all currently running threads and the stoppage of the threadpoolworker process.

For example:

jmxbatchclient.sh -j service:jmx:rmi:///jndi/rmi://myserver:9999/spl/fw/jmxConnector -k

Suppress logging -l:

By default, all logging information is displayed and logged using log4j. Supplying this option will result in only select information being displayed to the system output.

Display summary -s:

Display the summary of the currently active threads is a listing format.
For exmaple:

jmxbatchclient.sh -j service:jmx:rmi:///jndi/rmi://myserver:9999/spl/fw/jmxConnector -s

Options: -j service:jmx:rmi:///jndi/rmi://myserver:9999/spl/fw/jmxConnector -s
Connecting to service:jmx:rmi:///jndi/rmi://myserver-us:9999/spl/fw/jmxConnector
ActiveGridNode
threadPools=[MYSERVER:5, SCHEDULER_DAEMON_THREAD_POOL:1, LOCAL_THREAD_POOL:b9835d11f15fd71b:-60bf2fc1:120115996cc:-8000:0]

JMX Id DistThreadPool BatchNumber DatTimeStarted ElapsedTime
BatchThread_ZZQABAT1_1_of_1.29 MYSERVER 32 2009-03-16-17.07.29 0 yrs. 0 days 00:03:49

This means that you can manage the threadpools from the external scheduler or the command line. Details of the utility are in the Product Fix document supplied with the patch.

Comments:

You make blogging look like a walk in the park! I've been trying to blog daily but I just cant find writing material.. you're an inspiration to me and i'm sure many others!

Posted by Get Backlinks on December 31, 2010 at 03:16 AM EST #

Post a Comment:
  • HTML Syntax: NOT allowed
About

Anthony Shorten
Hi, I am Anthony Shorten, I am the Principal Product Manager for the Oracle Utilities Application Framework. I have been working for over 20+ years in the IT Business and am the author of many a technical whitepaper, manual and training material. I am one of the product managers working on strategy and designs for the next generation of the technology used for the Utilities and Tax markets. This blog is provided to announce new features, document tips and techniques and also outline features of the Oracle Utilities Application Framework based products. These products include Oracle Utilities Customer Care and Billing, Oracle Utilities Meter Data Management, Oracle Utilities Mobile Workforce Management and Oracle Enterprise Taxation and Policy Management. I am the product manager for the Management Pack for these products.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
9
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today