I have set up Java processes from armonitor.conf like this (Plugin Server
as an example):
/path/to/remedy/apps/java/jre/bin/java
-Dpname=PluginSvrMain
-server
-Xms128m
-Xmx512m
-XX:PermSize=32m
-XX:MaxPermSize=32m
-XX:+UseConcMarkSweepGC
-XX:-UseParNewGC
-Djava.library.path=/path/to/remedy/ARSystem/pluginsvr:/path/to/remedy/ARSystem/bin:/path/to/remedy/ARSystem/api/lib
-Djava.awt.headless=true
-Dhttp.proxyHost=proxy
-Dhttp.proxyPort=80
-Djava.security.policy=/path/to/remedy/apps/jmx/server.policy
-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.access.file=/path/to/remedy/apps/jmx/jmxremote.access
-Dcom.sun.management.jmxremote.local.only=false
-Dcom.sun.management.jmxremote.port=1105
-Dcom.sun.management.jmxremote.password.file=/path/to/remedy/apps/jmx/password.properties
-Dlog4j.configuration=/path/to/remedy/ARSystem/pluginsvr/log4j_pluginsvr.xml
-classpath
/path/to/remedy/ARSystem/pluginsvr:/path/to/remedy/ARSystem/pluginsvr/arpluginsvr75.jar
com.bmc.arsys.pluginsvr.ARPluginServerMain
-x devserver
-i /path/to/remedy/ARSystem
There are a lot of parameters, but these are the ones that are key for
jvisualvm access:
-Djava.security.policy=/path/to/remedy/apps/jmx/server.policy
-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.access.file=/path/to/remedy/apps/jmx/jmxremote.access
-Dcom.sun.management.jmxremote.local.only=false
-Dcom.sun.management.jmxremote.port=1105
-Dcom.sun.management.jmxremote.password.file=/path/to/remedy/apps/jmx/password.properties
Several files are referenced above. They contain this information:
$ cat /path/to/remedy/apps/jmx/jmxremote.access
unix_username readwrite
$ cat /path/to/remedy/apps/jmx/server.policy
grant {
permission javax.management.remote.SubjectDelegationPermission
"javax.management.remote.JMXPrincipal.delegate";
permission javax.management.MBeanPermission "\*", "\*";
};
grant principal javax.management.remote.JMXPrincipal "unix_username"
{
permission java.security.AllPermission;
};
$ cat /path/to/remedy/apps/jmx/password.properties
unix_username jmx_remote_password
The configuration above lets me connect remotely using jvisualvm or
jconsole on my desktop. I also have write access remotely so that I can
force a garbage collection, etc. There are some limitations though, I
think I can only profile the CPU usage if I use a local monitoring tool.
If you use the configuration above, you will need to replace the following
values with your own configuration:
unix_username (I think it needs to match the owner of the process you want
to monitor)
jmx_remote_password (can be any value)
I use the same configuration files and parameters for all the java
processes that are part of Remedy. This way I can connect to them all. I
do, however, have to set each one to listen on a different port using this
parameter:
-Dcom.sun.management.jmxremote.port=1105
As an added benefit, I set the -Dpname=some_value as the first parameter
for each java process. This is just a flag I use when I view the process
listing so that I can easily tell which java process is which.
If you get all this set up properly, it can be used to go a long way with
the following efforts:
- Size the generations to sizes that work best with that particular process
(save cpu cycles and/or reduce or trade off cpu usage for memory usage)
- Use a GC that works best for the nature of the process
- Size the heap to a value suitable for the process to do what it is
designed to do
-
Axton Grams
On Mon, Apr 30, 2012 at 2:01 PM, Goodall, Andrew C <[email protected]> wrote:
> I think javasystemsolutions provides something:
> https://communities.bmc.com/communities/thread/54095
>
>
> Regards,
>
> Andrew Goodall
> Software Engineer 2 | Development Services | jcpenney . www.jcp.com
>
> -----Original Message-----
> From: Action Request System discussion list(ARSList) [mailto:
> [email protected]] On Behalf Of Joseph Williams
> Sent: Monday, April 30, 2012 1:58 PM
> To: [email protected]
> Subject: Java Monitoring
>
> Does anyone know how to monitor the java processes that are started on the
> arserver via the armonitor config file using the jconsole or jvisualvm?
> Have tried but with no success. Is it even possible?
>
>
> Thanks
> JRW
>
>
> _______________________________________________________________________________
> UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
> attend wwrug12 www.wwrug12.com ARSList: "Where the Answers Are"
> The information transmitted is intended only for the person or entity to
> which it is addressed and may contain confidential and/or privileged
> material. If the reader of this message is not the intended recipient,
> you are hereby notified that your access is unauthorized, and any review,
> dissemination, distribution or copying of this message including any
> attachments is strictly prohibited. If you are not the intended
> recipient, please contact the sender and delete the material from any
> computer.
>
>
>
> _______________________________________________________________________________
> UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
> attend wwrug12 www.wwrug12.com ARSList: "Where the Answers Are"
>
_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
attend wwrug12 www.wwrug12.com ARSList: "Where the Answers Are"