Instant Messaging provides an agent to help you monitor activity. This agent is called the monitoring framework management agent, or mfwk agent. The mfwk agent is contained within the Common Agent Container (CAC). The CAC and the mfwk agent are installed when you installed Instant Messaging.
The mfwk agent makes XMPP module statistics
available through the Java Monitoring and Management
Console
(JConsole
). Table 17–1 describes the Instant Messaging services for
which the agent exposes state and performance metrics.
mfwk
Agent
Category |
Services |
Description |
---|---|---|
Authentication |
auth |
Authentications. |
Discovery |
disco |
Discovery requests. |
Messages |
message |
Information about alerts and one-on-one chat sessions between two clients such as the speed at which messages are sent. |
Conference |
muc-presence, muc-admin, and muc-message |
Conference statistics such as leaving or joining a conference, conference administrative requests, and conference (group chat) messages relayed. |
Presence |
presence-subscribe, presence-unsubscribe, presence-probe, and presence-authorize |
Presence informations such as updates and subscriptions. |
Privacy |
private-get, private-set, privacy-get, and privacy-set |
Privacy details. |
Roster |
roster-get and roster-set |
Roster information. |
Search |
search |
Search statistics. |
This section provides information about administering and troubleshooting the mfwk agent and JConsole
, and
how you can use the agent and JConsole
to
monitor Instant Messaging in the following sections:
Before you can use the mfwk agent, you need to configure the Instant Messaging server to make its activities available (turn on instrumentation) for use by mfwk as described in this section. Monitoring is disabled by default when you install Instant Messaging.
Open iim.conf.
See iim.conf File Syntax for more information.
Change the value of the iim_server.monitor.enable parameter.
Save and close the file.
Refresh the server.
imadmin refresh server |
Do not use the imadmin start, imadmin stop, or imadmin refresh commands in an HA environment with Sun Cluster. Instead, use the Sun Cluster administrative utilities.
You use the mfwkadm command-line utility to administer the mfwk agent. For example, you can start, stop, and restart the agent, and set up new and view current performance monitoring jobs performed by the agent. Detailed instructions on using this utility are available in the mfwkadm man page. In addition, the agent runs inside the CAC. For information on the CAC, refer to the cacaoadm and cacao man pages. This section provides instructions for locating these man pages.
Table 17–2 lists the paths to the man pages.
Table 17–2 mfwkadm and CAC man page paths
Component |
Solaris Path |
Linux Path |
---|---|---|
/opt/SUNWmfwk |
/opt/sun/mfwk |
|
/opt/SUNWcacao/man |
/opt/sun/man |
On the command line, check your MANPATH environment variable to see if the correct paths are already there.
If the correct path is not there, append the location of the mfwkadm utility and CAC man pages to your MANPATH environment variable.
For example, on Solaris:
MANPATH=/usr/dt/man:/usr/man:/opt/SUNWmfwk:/opt/SUNWcacao/man |
On Linux, update /etc/man.config with the path to the man pages.
Verify that the man pages are accessible.
For example:
man mfwkadm |
Use JConsole
to view the information
exposed by the mfwk agent. JConsole
is a graphical console tool that enables you to monitor and manage
Java applications and virtual machines in your network. Using JConsole
, you can browse the server JVM and also
observe the Instant Messaging services described in Table 17–1.
For more information about using JConsole
,
see the JConsole
man page and the “Using JConsole” chapter of Monitoring and Management for the Java Platform.
JConsole
Log in as root.
Set the CLASSPATH to include the location of the CAC, JConsole
, and the JMX jar file.
The line should be entered as a single line without line breaks.
On Solaris:
/opt/SUNWcacao/lib/cacao_cacao.jar:/opt/SUNWjdmk/5.1/lib /jmxremote_optional.jar:/usr/jdk/entsys-j2se/lib/jconsole.jar |
On Linux:
/opt/sun/cacao/share/lib/cacao_cacao.jar:/opt/sun/jdmk/5.1/lib /jmxremote_optional.jar:/usr/jdk/entsys-j2se/lib/jconsole.jar |
Run JConsole.
On both platforms, enter the command as a single line with a space between JConsole and “service.
On Solaris:
/usr/jdk/entsys-j2se/bin/java sun.tools.jconsole.JConsole "service:jmx:cacao-jmxmp://localhost;wellknown=true;username=root" |
On Linux:
/usr/jdk/entsys-j2se/bin/java sun.tools.jconsole.JConsole "service:jmx:cacao-jmxmp://localhost;wellknown=true;username=root" |
On the MBeans tab, expand the XMPP tree.
The service attributes and their values are listed within the tree. See Table 17–1 for a complete list of Instant Messaging services visible through JConsole
.
If you are experiencing trouble using the mfwk agent to monitor Instant Messaging, ensure the following:
The dependencies are installed. In particular, check to make sure the JDMK, CAC, and the mfwk agent are installed. To check, use the following commands:
Solaris:
pkginfo SUNWmfwk-agent (For the mfwk agent.)
pkginfo SUNWcacao (For the CAC.)
For JDMK, if the CAC is running, then the JDMK is installed. You can also check that the jar files are installed under /opt/SUNWjdmk/version/lib and /opt/SUNWjdmk/version/bin, where version is the version number of the JDMK, for example 5.1.
Linux:
rpm -qi sun-mfwk-agent-1.0 (For the mfwk agent.)
rpm -qi sun-cacao-1.0 (For the CAC.)
For JDMK, if the CAC is running, then the JDMK is installed. You can also check that the jar files are installed under /opt/sun/jdmk/version/lib and /opt/sun/jdmk/version/bin, where version is the version number of the JDMK, for example 5.1. In addition, you can use the rpm command.
rpm -qi sun-jdmk-runtime-5.1 |
The CAC is running. To get status on the CAC, use the following commands:
Solaris: /opt/SUNWcacao/bin/cacaoadm status
Linux: /opt/sun/cacao/bin/cacaoadm status
If the CAC is not running, start it as follows:
Solaris: /opt/SUNWcacao/bin/cacaoadm start
Linux: /opt/sun/cacao/bin/cacaoadm start
The XMPP module is loaded within the CAC and running:
/opt/SUNWcacao/bin/cacaoadm status com.sun.im.service.xmpp |
The mfwk agent is loaded within the CAC:
Solaris: /opt/SUNWcacao/bin/cacaoadm list-modules
Linux: /opt/sun/cacao/bin/cacaoadm list-modules
The module name for the mfwk agent is com.sun.mfwk.mfwk_module.
The mfwk agent is running. To get status on the mfwk agent, use the following commands:
Solaris: /opt/SUNWcacao/bin/cacaoadm status com.sun.mfwk.mfwk_module
Linux: /opt/sun/cacao/bin/cacaoadm status com.sun.mfwk.mfwk_module
If the mfwk agent is not running, start it as follows:
Solaris: /opt/SUNWmfwk/bin/mfwkadm start
Linux: /opt/sun/mfwk/bin/mfwkadm start
JConsole
If you cannot bring up JConsole
,
ensure the following:
The path to JConsole
is
correctly entered in your CLASSPATH.
You logged in as root before attempting to run JConsole
.