New and Improved CLI Monitoring in GlassFish V2

Before GlassFish V2, the only way to monitor attributes in CLI is using the "dotted-name" get command.
asadmin get --monitor (-m) dotted name...

The output looks like this for jvm uptime:

>asadmin get -m server.jvm.update-time
server.jvm.uptime-count = 1115738
(in millisec)

If user would like to monitor multiple attributes,  they would have to provide the "dotted-names" as operands:  "asadmin get --monitor <dotted-name1> <dotted-name2>...

This is rather cumbersome since user will need to find out the dotted-names for the attributes plus the output is difficult to read for multiple attributes.  In addition,  the output cannot be saved to a file for further analysis.

In GlassFish V2, there is a new command called monitor.
The output of the monitor command models Unix's vmstat.

The syntax of the monitor command is as follow:

monitor --type monitor_type --user admin_user [--terse=false] [--echo=false] [--interactive=true] [--host localhost] [--port 4848|4849] [--secure | -s] [--passwordfile file_name] [--interval 30] [--filter filter] [--filename filename] instance_name

To monitor jvm in server instance:

>asadmin monitor --type jvm --interval=5 server

The filename option allows user to save the monitoring attributes to a file in comma separated format.

The type option can have the following values:  httplistener, keepalive, filecache, connectionqueue, jdbcpool, jvm, threadpool, servlet, connecton, connectorpool, endpoint, entitybean, messagedriven, statefulsession, statelesssession, httpservice, webmodule.

The filter option is used to filter out multiple elements.  For example if --type is httplistener and there are two httplisteners in server instance (admin-server), the --filter option is used to specify the httplistener you'd like to monitor.

i.e.
>asadmin  monitor --type httplistener --filter http-listener-1 --interval=5 server


The heading may look a bit crypted, but when you type the "h" key a legend is displayed:

 


To exit from the monitor command, press the "q" key.

<<>>Hope this new feature can help user monitor GlassFish and ensure that your application is running efficiently.>

Download GlassFish V2 and give this feature a try.

<script type="text/javascript" src="http://www.google-analytics.com/urchin.js"> </script> <script type="text/javascript"> _uacct = "UA-1759290-1"; urchinTracker(); </script>
Comments:

Excellent information, Jane.

Great job, as always.

Two comments:
- get does have the feature to get the attribute at a given interval or a for a given number of iterations.
- --interval=5 -- can we just say --interval 5? Regards.

Posted by Kedar on April 29, 2007 at 11:28 PM PDT #

Post a Comment:
  • HTML Syntax: NOT allowed
About

janeyoung

Search

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

No bookmarks in folder