WorkFusion interview question

how to get Threaddump, heapdump of running application.