Like ben_wing , you can work with:
sudo -u jboss-as jmap -dump:file.bin <pid>
(in my case, the user is jboss-as , but yours may be jboss or some other.)
But that was not enough, because he asked me for a password ( [sudo] password for ec2-user: , although I could run sudo without asking for a password for other commands.
I found a solution here , and I just needed to add another sudo :
sudo sudo -u jboss-as jmap -dump:file.bin <pid>
It works with other teams such as jcmd and jinfo .
Lucas Basquerotto May 31 '17 at 20:40 2017-05-31 20:40
source share