Interface VMControl
- All Known Implementing Classes:
VMControlImpl
public interface VMControl
This class provides methods to trigger events on the virtual machine that is
running the monitored application.
-
Method Summary
Modifier and TypeMethodDescriptionvoidTriggers the collection of the class histogram data.booleanReturns whether classes data collection is enabled.booleanReturns whether GC data collection is enabled.booleanReturns whether IO data collection is enabled.booleanReturns whether locking data collection is enabled.booleanReturns whether native memory data collection is enabled.booleanReturns whether profiling data collection is enabled.booleanReturns whether threads data collection is enabled.voidsetCallStackCollectionEnabled(boolean value) Enables the collection of call stacks for sampled object allocation events.voidsetClassesDataCollectionEnabled(boolean value) Turns classes data collection on or off.voidsetGCDataCollectionEnabled(boolean value) Turns GC data collection on or off.voidsetIODataCollectionEnabled(boolean value) Turns IO data collection on or off.voidsetLockingDataCollectionEnabled(boolean value) Turns locking data collection on or off.voidsetMaxStackDepth(int depth) Sets the maximum number of stack entries to collect for each event.voidsetNativeMemoryDataCollectionEnabled(boolean value) Turns native memory data collection on or off.voidsetObjectAllocationsEnabled(long lowValue) Enables the collection of object allocation data for objects above a specified size.voidsetObjectAllocationsEnabled(long lowThreshold, long highThreshold) Enables the collection of object allocation data for objects within a specified size range.voidsetProfilingDataCollectionEnabled(boolean value) Turns profiling data collection on or off.voidsetThreadDataCollectionEnabled(boolean value) Turns thread data collection on or off.voidsetThreadStackDepth(int depth) Sets the maximum number of stack entries to collect for each thread.voidsetTracePointEnabled(String tracePointID, boolean value) Turns individual trace points on or off.voidsetVerboseGCCollectionEnabled(boolean value) Turns the writing of verbose garbage collection data to a file on or off.booleanTriggers a heap dump in the running virtual machine.booleanTriggers a Java dump in the running virtual machine.booleanTriggers a system dump in the running virtual machine.
-
Method Details
-
setObjectAllocationsEnabled
void setObjectAllocationsEnabled(long lowThreshold, long highThreshold) Enables the collection of object allocation data for objects within a specified size range.- Parameters:
lowThreshold- the minimum size (in bytes) of the objects to collect data on.highThreshold- the maximum size (in bytes) of the objects to collect data on.
-
setObjectAllocationsEnabled
void setObjectAllocationsEnabled(long lowValue) Enables the collection of object allocation data for objects above a specified size.- Parameters:
lowValue- the minimum size (in bytes) of the objects to collect data on.
-
setVerboseGCCollectionEnabled
void setVerboseGCCollectionEnabled(boolean value) Turns the writing of verbose garbage collection data to a file on or off. The name of the file that is created is verbosegc_process_id_n.log, where process_id is the process ID of the monitored JVM, and n is a sequence number. The file is saved in a directory that is local to the monitored JVM specified by thecom.ibm.java.diagnostics.healthcenter.output.folderproperty. If this property is not set, the file is saved in the directory that is specified by theuser.dirsystem property.- Parameters:
value- whether collection is on or off. *
-
triggerHeapDump
boolean triggerHeapDump()Triggers a heap dump in the running virtual machine. A heap dump provides a view of memory objects on the Java heap, and is used for memory analysis.- Returns:
trueif the trigger command was successfully sent to the virtual machine,falseif the command failed.
-
triggerSystemDump
boolean triggerSystemDump()Triggers a system dump in the running virtual machine. A system dump is also known as a core dump. System dump creation involves dumping the entire address space, and can therefore produce very large dumps, and take some time to complete.- Returns:
trueif the trigger command was successfully sent to the virtual machine,falseif the command failed.
-
triggerJavaDump
boolean triggerJavaDump()Triggers a Java dump in the running virtual machine. A Java dump is also known as a thread dump of the Java core. The Java dump is used for viewing the thread activity inside the JVM at a given time.- Returns:
trueif the trigger command was successfully sent to the virtual machine,falseif the command failed.
-
setCallStackCollectionEnabled
void setCallStackCollectionEnabled(boolean value) Enables the collection of call stacks for sampled object allocation events.- Parameters:
value- whether the collection is on or off.
-
setMaxStackDepth
void setMaxStackDepth(int depth) Sets the maximum number of stack entries to collect for each event.- Parameters:
depth- the maximum number of stack entries.
-
setGCDataCollectionEnabled
void setGCDataCollectionEnabled(boolean value) Turns GC data collection on or off. By default, GC data collection is on. Turning this data off can reduce the amount of data generated by the virtual machine that is running the monitored application, and as a result, can reduce the overhead of monitoring an application with the Health Center.- Parameters:
value- whether the collection is on or off.
-
setIODataCollectionEnabled
void setIODataCollectionEnabled(boolean value) Turns IO data collection on or off. By default, IO data collection is on. Turning this data off can reduce the amount of data generated by the virtual machine that is running the monitored application, and as a result, can reduce the overhead of monitoring an application with the Health Center.- Parameters:
value- whether the collection is on or off.
-
setClassesDataCollectionEnabled
void setClassesDataCollectionEnabled(boolean value) Turns classes data collection on or off. By default, classes data collection is on. Turning this data off can reduce the amount of data generated by the virtual machine that is running the monitored application, and as a result, can reduce the overhead of monitoring an application with the Health Center.- Parameters:
value- whether the collection is on or off.
-
setLockingDataCollectionEnabled
void setLockingDataCollectionEnabled(boolean value) Turns locking data collection on or off. By default, locking data collection is on. Turning this data off can reduce the amount of data generated by the virtual machine that is running the monitored application, and as a result, can reduce the overhead of monitoring an application with the Health Center.- Parameters:
value- whether the collection is on or off.
-
setNativeMemoryDataCollectionEnabled
void setNativeMemoryDataCollectionEnabled(boolean value) Turns native memory data collection on or off. By default, native memory data collection is on. Turning this data off can reduce the amount of data generated by the virtual machine that is running the monitored application, and as a result, can reduce the overhead of monitoring an application with the Health Center.- Parameters:
value- whether the collection is on or off.
-
setProfilingDataCollectionEnabled
void setProfilingDataCollectionEnabled(boolean value) Turns profiling data collection on or off. By default, profiling data collection is on. Turning this data off can reduce the amount of data generated by the virtual machine that is running the monitored application, and as a result, can reduce the overhead of monitoring an application with the Health Center.- Parameters:
value- whether the collection is on or off.
-
setThreadDataCollectionEnabled
void setThreadDataCollectionEnabled(boolean value) Turns thread data collection on or off. By default, thread data collection is on. Turning this data off can reduce the amount of data generated by the virtual machine that is running the monitored application, and as a result, can reduce the overhead of monitoring an application with the Health Center.- Parameters:
value- whether the collection is on or off.
-
setThreadStackDepth
void setThreadStackDepth(int depth) Sets the maximum number of stack entries to collect for each thread. Setting this to zero will turn off thread stack collection.- Parameters:
depth- the maximum number of stack entries required.
-
setTracePointEnabled
Turns individual trace points on or off.- Parameters:
tracePointID- the ID of the trace point to enable or disable.value- whether the trace point is on or off.- Throws:
HealthCenterException- if the call is unsuccessful.
-
isGCDataCollectionEnabled
boolean isGCDataCollectionEnabled()Returns whether GC data collection is enabled.- Returns:
- boolean.
-
isIODataCollectionEnabled
boolean isIODataCollectionEnabled()Returns whether IO data collection is enabled.- Returns:
- boolean.
-
isProfilingDataCollectionEnabled
boolean isProfilingDataCollectionEnabled()Returns whether profiling data collection is enabled.- Returns:
- boolean.
-
isClassesDataCollectionEnabled
boolean isClassesDataCollectionEnabled()Returns whether classes data collection is enabled.- Returns:
- boolean.
-
isThreadsDataCollectionEnabled
boolean isThreadsDataCollectionEnabled()Returns whether threads data collection is enabled.- Returns:
- boolean.
-
isNativeMemoryDataCollectionEnabled
boolean isNativeMemoryDataCollectionEnabled()Returns whether native memory data collection is enabled.- Returns:
- boolean.
-
isLockingDataCollectionEnabled
boolean isLockingDataCollectionEnabled()Returns whether locking data collection is enabled.- Returns:
- boolean.
-
collectClassHistogramData
Triggers the collection of the class histogram data. For every class loaded, this process collects the number of instances of that class, and the total amount of memory that is used by those instances.
-