Check memory utilization
To check the memory being utilized by one of the java services (OpenIAM services, Elasticsearch, and Cassandra), we need to use the steps described below.
ps -ef | grep java
The above command will provide a list of the java processes which are running and the arguments by each process during startup.
openiam 16649 16646 2 16:39 ? 00:05:44 /usr/local/openiam/jdk/bin/java -Dlogging.level.org.elasticsearch.client=ERROR -Dlogging.level.root=WARN -Dlogging.level.org.openiam=WARN -Dconfpath=/usr/local/openiam -jar -Xmx1024m -Djdk.tls.client.protocols=TLSv1.2 /usr/local/openiam/services/bin/auth-manager.jaropeniam 16690 16687 1 16:39 ? 00:02:27 /usr/local/openiam/jdk/bin/java -Dlogging.level.org.elasticsearch.client=ERROR -Dlogging.level.root=WARN -Dlogging.level.org.openiam=WARN -Dconfpath=/usr/local/openiam -jar -Xmx256m -Djdk.tls.client.protocols=TLSv1.2 /usr/local/openiam/services/bin/device-manager.jaropeniam 16733 16728 1 16:39 ? 00:03:07 /usr/local/openiam/jdk/bin/java -Dlogging.level.org.elasticsearch.client=ERROR -Dlogging.level.root=WARN -Dlogging.level.org.openiam=WARN -Dconfpath=/usr/local/openiam -jar -Xmx512m -Djdk.tls.client.protocols=TLSv1.2 /usr/local/openiam/services/bin/email-manager.jaropeniam 16813 16774 1 16:39 ? 00:04:17 /usr/local/openiam/jdk/bin/java -Dlogging.level.org.elasticsearch.client=ERROR -Dlogging.level.root=WARN -Dlogging.level.org.openiam=WARN -Dconfpath=/usr/local/openiam -jar -Xmx2048m -Djdk.tls.client.protocols=TLSv1.2 /usr/local/openiam/services/bin/openiam-esb.jaropeniam 16820 16811 1 16:39 ? 00:02:44 /usr/local/openiam/jdk/bin/java -Dlogging.level.org.elasticsearch.client=ERROR -Dlogging.level.root=WARN -Dlogging.level.org.openiam=WARN -Dconfpath=/usr/local/openiam -jar -Xmx512m -Djdk.tls.client.protocols=TLSv1.2 /usr/local/openiam/services/bin/groovy-manager.jaropeniam 16879 16877 2 16:39 ? 00:04:59 /usr/local/openiam/jdk/bin/java -Dlogging.level.org.elasticsearch.client=ERROR -Dlogging.level.root=WARN -Dlogging.level.org.openiam=WARN -Dconfpath=/usr/local/openiam -jar -Xmx512m -Djdk.tls.client.protocols=TLSv1.2 /usr/local/openiam/services/bin/idm.jar
The above command is helpful in determining which processes are running, their process id (PID), and the memory that this component is allowed to use; determined by the -Xmx argument shown above.
To determine the additional details, use the command below. PID is the process id taken from the above.
kill -3 [PID]
The output of this command will be sent to the log related to the service you are checking. These logs can be found in /usr/local/openiam/logs
. To view the logs you can use the following: tail [log file name]
Example, for the auth-manager:
tail auth-manager.logOutput:JNI global refs: 31, weak refs: 0Heapgarbage-first heap total 512000K, used 215965K [0x00000000c0000000, 0x0000000100000000)region size 1024K, 138 young (141312K), 10 survivors (10240K)Metaspace used 129663K, capacity 132186K, committed 133768K, reserved 1167360Kclass space used 15396K, capacity 16406K, committed 16972K, reserved 1048576K