The monitor command is useful in many situations, however, it does not offer the complete list of all monitorable objects. To work with comprehensive data for an object type, use the list --monitor and the get --monitor commands followed by the dotted name of a monitorable object.
A monitorable object must be configured for monitoring before you can display information on the object. See To Enable Monitoring if needed..
List the objects that are enabled for monitoring by using the list(1) command.
For example, the following command lists all components and services that have monitoring enabled for instance server:
asadmin list --monitor=true server.* |
Information similar to the following is displayed:
server.web server.jvm server.http-service server.applications |
Get data for a monitored component or service by using the get(1) command.
The following example command gets information on all the attributes for object type jvm on instance server:
asadmin get --monitor=true server.jvm.* |
Information similar to the following is displayed:
server.jvm.class-loading-system.loadedclasscount-count = 3715 server.jvm.class-loading-system.totalloadedclasscount-count = 3731 server.jvm.class-loading-system.unloadedclasscount-count = 16 server.jvm.compilation-system.name-current = HotSpot Client Compiler server.jvm.compilation-system.totalcompilationtime-count = 769 server.jvm.garbage-collectors.Copy.collectioncount-count = 285 server.jvm.garbage-collectors.Copy.collectiontime-count = 980 server.jvm.garbage-collectors.MarkSweepCompact.collectioncount-count = 2 server.jvm.garbage-collectors.MarkSweepCompact.collectiontime-count = 383 server.jvm.memory.committedheapsize-count = 23498752 server.jvm.memory.committednonheapsize-count = 13598720 server.jvm.memory.initheapsize-count = 0 server.jvm.memory.initnonheapsize-count = 8585216 server.jvm.memory.maxheapsize-count = 66650112 server.jvm.memory.maxnonheapsize-count = 100663296 server.jvm.memory.objectpendingfinalizationcount-count = 0 server.jvm.memory.usedheapsize-count = 19741184 server.jvm.memory.usednonheapsize-count = 13398352 server.jvm.operating-system.arch-current = x86 server.jvm.operating-system.availableprocessors-count = 2 server.jvm.operating-system.name-current = Windows XP server.jvm.operating-system.version-current = 5.1 server.jvm.runtime.classpath-current = glassfish.jar server.jvm.runtime.inputarguments-current = [] server.jvm.runtime.managementspecversion-current = 1.0 server.jvm.runtime.name-current = 4372@ABBAGANI_WORK server.jvm.runtime.specname-current = Java Virtual Machine Specification server.jvm.runtime.specvendor-current = Sun Microsystems Inc. server.jvm.runtime.specversion-current = 1.0 server.jvm.runtime.uptime-count = 84813 server.jvm.runtime.vmname-current = Java HotSpot(TM) Client VM server.jvm.runtime.vmvendor-current = Sun Microsystems Inc. server.jvm.runtime.vmversion-current = 1.5.0_11-b03 |
The following example command lists all the monitorable applications for instance server:
asadmin list --monitor=true server.applications.* |
Information similar to the following is displayed:
server.applications.app1 server.applications.app2 server.applications.app1.virtual-server1 server.applications.app2.virtual-server1 |
The following example command gets information on all the attributes for application hello:
asadmin get --monitor=true server.applications.hello.* |
Information similar to the following is displayed:
server.applications.hello.server.activatedsessionstotal-count = 0 server.applications.hello.server.activejspsloadedcount-count = 1 server.applications.hello.server.activeservletsloadedcount-count = 1 server.applications.hello.server.activesessionscurrent-count = 1 server.applications.hello.server.activesessionshigh-count = 1 server.applications.hello.server.errorcount-count = 0 server.applications.hello.server.expiredsessionstotal-count = 0 server.applications.hello.server.maxjspsloadedcount-count = 1 server.applications.hello.server.maxservletsloadedcount-count = 0 server.applications.hello.server.maxtime-count = 0 server.applications.hello.server.passivatedsessionstotal-count = 0 server.applications.hello.server.persistedsessionstotal-count = 0 server.applications.hello.server.processingtime-count = 0.0 server.applications.hello.server.rejectedsessionstotal-count = 0 server.applications.hello.server.requestcount-count = 0 server.applications.hello.server.sessionstotal-count = server.applications.hello.server.totaljspsloadedcount-count = 0 server.applications.hello.server.totalservletsloadedcount-count = 0 |
The following example command gets information on jvm attribute runtime.vmversion-current on an instance server:
asadmin get --monitor=true server.jvm.runtime.vmversion-current |
Information similar to the following is displayed:
server.jvm.runtime.vmversion-current = 10.0-b23 |