How to take java threaddump?

Get the PID of Java ps -el | grep java top | grep java jstack  -F <your-pid> >dump.log sudo jstack -F `pidof java` > /tmp/`hostname`_threaddump_`date +”%Y%m%d_%H%M”`.txt     Result: hybris@aws-hybris5prd-ecom-app02:~$ jstack -F 31987 >...