ProcDump is a command line tool that can be used to capture a memory dump of an application when the application crashes, hangs or you can also use it to capture a memory dump for performance reasons.
ProcDump is a process utility originally developed for Microsoft Windows, as part of the Sysinternals web site. It's primary purpose is monitoring an application for CPU spikes and creating crash dumps so the cause of the spike can be investigated, but it can also be used to monitor for hung windows, unhandled exceptions, or excessive use of system resources (by monitoring system performance counters).
A version for Linux has also been created.
Documentation (including a download link) for the Windows version is available on the Microsoft documentation web site.
The Linux version is available on GitHub.