j4psh vs JBoss CLI

Jolokia includes j4psh which is a JMX shell which is using standard MBean names, provides syntax highlighting together with code completion and even wildcard patterns. In j4psh you will be using similar command as JBoss AS 7 CLI.

Here's a partial list of the most useful j4psh commands:

  • connect, to connect to an Java EE server with the jolokia.war deployed or using the Java agent
  • pwd, to find out the current MBean name or domain
  • cd, to navigate to an MBean or domain
  • ls, to list MBean details (works with * and can be restricted as “ls -a” for attributes and “ls -o” for operations).
  • cat, to display attribute values

Here's a snapshot of the j4psh shell:

jolokia tutorial jboss
Although the two products are not aiming at the same target (the CLI is the official AS7 administration and configuration tool, while the Jolokia shell is designed to interact with the AS Mbeans) we can try a comparison of them:

Functionality JBoss CLI j4psh
Installation Built-in in JBoss AS 7 Need installing jmx4perl
Availability Specific of JBoss AS 7 Multivendors (Most other application servers, Mule agent, JVM agent OSGi agent)
Syntax Proprietary shell-like syntax Standard MBean name
Autocompletion yes yes
Syntax highlighting no yes
Commands history yes yes
Take system snapshot yes no
Return format Text, XML JSON
Accessible Data All application server subsystems All accessible MBeans
Authentication Role based authentication. (SSL, HTTP-Authentication) and support for custom policies.
Firewall friendly Requires opening port on the firewall Communication is over HTTP, proxying through firewalls becomes mostly a none-issue
Bulk requests The batch mode allows one to group commands and operations and execute them together as an atomic unit. Can process many JMX requests with a single roundtrip.
Multiplatform No Available also to Javascript and Perl clients
Non interactive mode Possible to send multiple requests using non-interactive mode No
GUI mode Available GUI interface No
Resource shortcuts Available shortcuts for creation of most common resources (JMS destinations/ Datasources) No
Server and Domain management yes No

So, as you can see, although j4psh and the AS 7 CLI bear some similarities, the AS 7 CLI is the defacto administration and management tool. On the other hand j4psh and Jolokia is a very cool addition for interacting with the server MBeans thanks to its multiplatform and multivendor availability.

References:

http://www.munzandmore.com/tag/jolokia

http://www.jolokia.org

0
0
0
s2smodern

Related articles available on mastertheboss.com

How to monitor JBoss CPU usage ?

  JBoss AS 7 users and WildFly can use JConsole in order to moni

How to monitor jboss graphically ?

  You’ve been using the JMX Console to access yourMBeans. In thi

How to monitor JBoss with snapshots?

  JBoss gives you the ability to capture data not only in real t

JBoss Alarm configuration

An Alarm indicates that an event (generally an error) has happene

Monitoring JBoss EJB Container

In this article we will show how easily you can write an Intercep

How to solve java.lang.OutOfMemoryError: unable to create new nat

In Java you can stumble upon two kind of Out of Memory errors: