Sun Java System Application Server Enterprise Edition 8.1 2005Q2 Administration Guide

- Previous: Examples for the list --user admin-user --monitor Command
- Next: To use the PetStore example

### Examples for the get --user admin-user --monitor Command

This command retrieves the following monitored information:

- All attribute(s) monitored within a component or subsystem

- Specific attribute monitored within a component or subsystem

  When an attribute is requested that does not exist for a particular component or subsystem, an error is returned. Similarly, when a specific attribute is requested that is not active for a component or subsystem, an error is returned.

  Refer to Expected Output for list and get Commands at All Levels for more information on the use of the `get` command.

#### Example 1

Attempt to get all attributes from a subsystem for a specific object:

    asadmin> get --user admin-user --monitor server.jvm.*

Returns:

    server.jvm.dotted-name= server.jvm
    server.jvm.heapsize-current = 21241856
    server.jvm.heapsize-description = Provides statistical information about
       the JVM's memory heap size.
    server.jvm.heapsize-highwatermark = 21241856
    server.jvm.heapsize-lastsampletime = 1080232913938
    server.jvm.heapsize-lowerbound = 0
    server.jvm.heapsize-lowwatermark = 0
    server.jvm.heapsize-name = JvmHeapSize
    server.jvm.heapsize-starttime = 1080234457308
    server.jvm.heapsize-unit = bytes
    server.jvm.heapsize-upperbound = 518979584
    server.jvm.uptime-count = 1080234457308
    server.jvm.uptime-description = Provides the amount of time the JVM has
       been running.
    server.jvm.uptime-lastsampletime = 1080234457308
    server.jvm.uptime-name = JvmUpTime
    server.jvm.uptime-starttime = 1080232913928
    server.jvm.uptime-unit = milliseconds

#### Example 2

Attempt to get all attributes from a J2EE application:

    asadmin> get --user admin-user --monitor server.applications.myJ2eeApp.*

Returns:

    No matches resulted from the wildcard expression.
    CLI137 Command get failed.

There are no monitorable attributes exposed at the J2EE-application level, therefore this reply displays.

#### Example 3

Attempt to get a specific attribute from a subsystem:

    asadmin> get --user admin-user --monitor server.jvm.uptime-lastsampletime

Returns:

    server.jvm.uptime-lastsampletime = 1093215374813

#### Example 4

Attempt to get an unknown attribute from within a subsystem attribute:

    asadmin> get --user admin-user --monitor server.jvm.badname

Returns:

    No such attribute found from reflecting the corresponding Stats
    interface: [badname]
    CLI137 Command get failed.

- Previous: Examples for the list --user admin-user --monitor Command
- Next: To use the PetStore example

- © 2010, Oracle Corporation and/or its affiliates