org.eclipse.mat.ibmvm.acquire
Class IBMDumpProvider

java.lang.Object
  extended by org.eclipse.mat.ibmvm.acquire.BaseProvider
      extended by org.eclipse.mat.ibmvm.acquire.IBMDumpProvider
All Implemented Interfaces:
IHeapDumpProvider
Direct Known Subclasses:
IBMJavaDumpProvider

public class IBMDumpProvider
extends BaseProvider

Base class for generating dumps on IBM VMs


Field Summary
 
Fields inherited from class org.eclipse.mat.ibmvm.acquire.BaseProvider
defaultCompress, defaultType, heapDumpTemplate, heapDumpZipTemplate, javaDumpTemplate, systemDumpTemplate, systemDumpZipTemplate
 
Method Summary
 File acquireDump(VmInfo info, File preferredLocation, IProgressListener listener)
          Acquire a heap dump from a locally running Java process.
 List<IBMVmInfo> getAvailableVMs(IProgressListener listener)
          Returns a list of locally running Java processes from which the heap dump provider can attempt to acquire a heap dump
static void main(String[] s)
          Lists VMs or acquires a dump.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

acquireDump

public File acquireDump(VmInfo info,
                        File preferredLocation,
                        IProgressListener listener)
                 throws SnapshotException
Description copied from interface: IHeapDumpProvider
Acquire a heap dump from a locally running Java process. The

Parameters:
info - a descriptor of the Java process which should be dumped
preferredLocation - a preferred filename under which the heap dump should be saved. The IHeapDumpProvider is not obliged to provide the heap dump at this location
listener - a progress listener
Returns:
the File under which the successfully generated heap dump is saved
Throws:
SnapshotException

getAvailableVMs

public List<IBMVmInfo> getAvailableVMs(IProgressListener listener)
Description copied from interface: IHeapDumpProvider
Returns a list of locally running Java processes from which the heap dump provider can attempt to acquire a heap dump

Parameters:
listener - a progress listener
Returns:
A List of VMs, of a type which extends VmInfo.
See Also:
IHeapDumpProvider.getAvailableVMs(org.eclipse.mat.util.IProgressListener)

main

public static void main(String[] s)
                 throws Exception
Lists VMs or acquires a dump. Used when attach API not usable from the MAT process.

Parameters:
s -
  • [0] dump type (Heap=heap+java,System=system)
  • [1] VM id = PID
  • [2] true/false compress dump
  • [3] dump name
Output
  • dump filename
  • or list of all processes (if argument list is empty) PID,proposed file name,description
Throws:
Exception