Taking java heap dump of application using jattach and s3

exec app.
CD BIN
jattach 57 dumpheap /tmp/java_pid$java_pid-$(date +%Y-%m-%d_%H-%M-%S).hprof

kubectl cp glp2-nf2/rbassessment-549967bb85-5d79l:/tmp/57-2019-09-16_11-59-21-nf2.hprof /home/suramyashah/heapdump.hprof


exec app.
CD BIN
jattach 57 dumpheap /tmp/java_pid$java_pid-$(date +%Y-%m-%d_%H-%M-%S).hprof


kubectl cp glp2-nf2/rbassessment-549967bb85-5d79l:/tmp/57-2019-09-16_11-59-21-nf2.hprof /home/suramyashah/heapdump.hprof


//make bucket: aws s3 mb s3://heapdump-bucket

aws s3 cp /home/suramyashah/heapdump.hprof s3://heapdump-bucket/ --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers


Comments

Popular Posts