使用jconsole監測SAP commerce執行時

i042416發表於2020-09-28

It is known that we can use Hybris Administration Console to monitor the runtime behavior of installed Hybris Commerce instance such as Memory, CPU load and thread overview.


使用jconsole監測SAP commerce執行時


Meanwhile as Hybris Commerce is implemented in Java, there is another approach to achieve the same requirement with the help of JMX.

Java Management Extensions (JMX) is the Java specification for monitoring capabilities. JMX defines managed beans (MBeans for short). MBeans are Java objects which expose some metrics (such as memory usage for example) and implement some functionality (such as flushing the cache).

You can also find JMX definition in wikipedia. Here below is how to use jconsole( a built-in tool provided by JDK ) to monitor Hybris Commerce runtime behavior.

(1) find the port number of JMX Remote Listener for your Hybris instance. In my example it is 9003 observed in Hybris startup log displayed in the console.


使用jconsole監測SAP commerce執行時


(2) copy jmxremote.password.template to jmxremote.password,


使用jconsole監測SAP commerce執行時


and remove the # in front of monitorRole and controlRole to make both take effective. Once done, the content of this file looks like below:


使用jconsole監測SAP commerce執行時


(3) Launch jconsole.exe in /bin:


使用jconsole監測SAP commerce執行時


Once connected, we can use jconsole GUI to monitor runtime behavior.


使用jconsole監測SAP commerce執行時 使用jconsole監測SAP commerce執行時


要獲取更多Jerry的原創文章,請關注公眾號"汪子熙":

使用jconsole監測SAP commerce執行時


來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/24475491/viewspace-2724667/,如需轉載,請註明出處,否則將追究法律責任。

相關文章