When should a heap dump be taken

We have a java application and my query here is to know when I should be taking a heap dump for a particular JVM. On what basis should I look at the memory usage details and take the heap dump to analyse it.

I understand that each Java process has a pid, which when found using the ps command be used with the jstat. From the Jstat Docs, I see the below four ways to know the memory and garbage utilization details -

gc: Displays statistics about the behavior of the garbage collected heap.

gccapacity: Displays statistics about the capacities of the generations and their corresponding spaces.

gccause: Displays a summary about garbage collection statistics (same as -gcutil), with the cause of the last and current (when applicable) garbage collection events.

gcutil: Displays a summary about garbage collection statistics.

From these 4 commands and the data they give, what parameters should i look at and take a heap dump when some of the metrics change. Kindly clarify.