cat /proc/102433/smaps | grep -i pss | awk '{Total+=$2} END {print Total/1024" MB"}'
499.514 MB
cat /proc/102433/smaps | grep -i rss | awk '{Total+=$2} END {print Total/1024" MB"}'
506.32 MB
jmap
pmap
To learn more about smaps, read here https://jameshunt.us/writings/smaps.html
Showing posts with label jmap. Show all posts
Showing posts with label jmap. Show all posts
Thursday, November 28, 2019
Friday, September 18, 2015
jmap and userid
Reading on StackOverflow some people report issues when you take a heap profiling with jmap (jmap -dump or jmap -histo... NOT with jmap -heap) using root rather than actual user who started the JVM process.
Specifically you might get a:
".... so you must do a reverse lookup of the UID...using the "getent passwd UID" command:
One would expect "id" to be able to do the reverse lookup, but this would be too easy.
Specifically you might get a:
/cs/java/jdk160_85-64b/bin/jmap -F -dump:format=b,file=/tmp/PIPPOheapdump20150918.hdump 10166 10166: Unable to open socket file: target process not responding or HotSpot VM not loaded The -F option can be used when the target process is not respondingAt this point you do a ps -ef to find out who started that JVM.... and you get a NUMBER (uid) rather than a username...!!! unfortunately you cant "sudo su -
id jcqpc uid=5010012(jcqpc) gid=5008728(jcqpc) groups=5008728(jcqpc)
getent passwd 5010012 jcqpc:x:5010012:5008728:Created by CentrifyEx Automation:/home/jcqpc:/bin/centrifyda
One would expect "id" to be able to do the reverse lookup, but this would be too easy.
Subscribe to:
Posts (Atom)