Last active
November 6, 2018 14:04
-
-
Save jenslohmann/c9b47fc2317f2289e5cfeda396396b54 to your computer and use it in GitHub Desktop.
Poor man's meminfo for the single JBoss process on the server
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ $(ps -ef|grep -E "java.*jboss"|grep -v grep|wc -l) -ne 1 ] ; then | |
echo "Too many (or no) java processes!" | |
else | |
jmap -heap $(ps -ef|grep -E "java.*jboss"|grep -v grep|tr -s " "|cut -d\ -f2) | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment