-
-
Save abhilater/cbc4f9c404bd14cb2ef5c5e198bfae02 to your computer and use it in GitHub Desktop.
running jmxterm from command line to force gc
This file contains 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
wget http://downloads.sourceforge.net/project/cyclops-group/jmxterm/0.2/jmxterm-0.2-uber.jar | |
a@a:~$ java -jar jmxterm-0.2-uber.jar | |
Welcome to JMX terminal. Type "help" for available commands. | |
?$ open localhost:8076 | |
Connection to localhost:8076 is opened | |
>$ bean java.lang:type=Memory | |
bean is set to java.lang:type=Memory | |
>$ run gc | |
calling operation gc of mbean java.lang:type=Memory | |
operation returns: | |
null |
This file contains 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
jmap -dump:format=b,file=memory.hprof PIDHERE | |
sometimes | |
sudo jmap -dump:format=b,file=memory.hprof PIDHERE | |
sometimes | |
sudo -u useridofprocess jmap -dump:format=b,file=memory.hprof PIDHERE | |
sometimes requires | |
echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope | |
make sure CWD or process is writeable by owner of process |
This file contains 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
jstat -gcnew -h 10 PIDHERE 2000 | |
jstat -gcold -h 10 PIDHERE 2000 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment