Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bdelbosc/jmxstat
Poll JMX attributes from the command line
https://github.com/bdelbosc/jmxstat
Last synced: 4 months ago
JSON representation
Poll JMX attributes from the command line
- Host: GitHub
- URL: https://github.com/bdelbosc/jmxstat
- Owner: bdelbosc
- License: other
- Fork: true (jonjlee/jmxstat)
- Created: 2011-04-08T07:37:26.000Z (almost 14 years ago)
- Default Branch: master
- Last Pushed: 2012-09-04T07:58:42.000Z (over 12 years ago)
- Last Synced: 2024-10-08T17:52:41.403Z (5 months ago)
- Language: Java
- Homepage:
- Size: 969 KB
- Stars: 17
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGES.txt
- License: LICENSE
Awesome Lists containing this project
README
NAME
jmxstat - Poll JMX attributes and more
SYNOPSIS
jmxstat [--peformGC|--contention|--disable-contention] [mbean.name[attribute.field], ...] [interval [count]]
or
java -jar jmxstat-VERSION.jar [--peformGC|--contention|--disable-contention] [mbean.name[attribute.field], ...] [interval [count]]DESCRIPTION
jmxstat connects to a remote JMX server via RMI and reads MBean attributes
at a regular interval. Authentication is not supported.
jmxstat supports these arguments:
host:port Host and port of the JMX enabled process to connect to
mbean-attributes Space separated list of mbean names and attributes to
query in the following format:
mbeanDomain:mbeanKey=mbeanValues,...[mbeanAttribute1[.field],...]
If the attribute starts with '!' invoke the method.--contention Render blockedCount and blockedTime for all threads.
blockedCount is the total number of times threads
blocked to enter or reenter a monitor.
blockedTime is the time elapsed in milliseconds for
all threads blocked to enter or reenter a monitor.--disable-contention Disable the blocked time monitoring activated by the
--contention options.--performGC Perform a full GC.
interval Pause _interval_ seconds between each query.
count Select count records at interval second intervals.
EXAMPLES
**Precondition**. These examples assume a JMX enabled process is listening
on localhost:9999. To use jmxstat itself as the monitored process:
java -Dcom.sun.management.jmxremote.port=9999 -Dcom.sun.management.jmxremote.authentice=false -Dcom.sun.management.jmxremote.ssl=false -jar jmxstat.jar localhost:9999Display the number of loaded classes (every 5 seconds, by default):
jmxstat localhost:9999 java.lang:type=ClassLoading[LoadedClassCount]
Display heap usage and thread count every 2 seconds 3 times:
jmxstat localhost:9999 java.lang:type=Memory[HeapMemoryUsage.max,HeapMemoryUsage.committed,HeapMemoryUsage.used] java.lang:type=Threading[ThreadCount] 2 3Display thread count and contention information:
jmxstat localhost:9999 --contention java.lang:type=Threading[ThreadCount] 2 3
Perform a Full garbage collector:jmxstat localhost:9999 --performGC
Same but using a method invocation:
jmxstat localhost:1089 java.lang:type=Memory[!gc] 1 1
Invoking method with parameters:
jmxstat localhost:1089 localhost:1089 org.nuxeo:name=EventMonitoring,type=service[!setListenerEnabledFlag/auditLoggerListener/false] 1 1
INSTALL/DOWNLOAD
Get the latest package from:
Then install:
tar xzvf jmxstat-VERSION.tgz
cd jmxstat-VERSION
sudo make install