public class

MonitoredVmUtil

extends Object
java.lang.Object
   ↳ sun.jvmstat.monitor.MonitoredVmUtil

Class Overview

Utility class proving concenience methods for extracting various information from an MonitoredVm object.

Summary

Public Methods
static String commandLine(MonitoredVm vm)
Return the command line for the target Java application.
static boolean isAttachable(MonitoredVm vm)
Returns true if the VM supports attach-on-demand.
static boolean isKernelVM(MonitoredVm vm)
Returns true if the target VM is a kernel VM
static String jvmArgs(MonitoredVm vm)
Return the JVM arguments for the target Java application.
static String jvmFlags(MonitoredVm vm)
Return the JVM flags for the target Java application.
static String mainArgs(MonitoredVm vm)
Return the arguments to the main class for the target Java application.
static String mainClass(MonitoredVm vm, boolean fullPath)
Return the main class for the target Java application.
static String vmVersion(MonitoredVm vm)
Return the Java Virtual Machine Version.
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public static String commandLine (MonitoredVm vm)

Return the command line for the target Java application.

Parameters
vm the target MonitoredVm
Returns
  • String - contains the command line of the target Java application or the the string "Unknown" if the command line cannot be determined.

public static boolean isAttachable (MonitoredVm vm)

Returns true if the VM supports attach-on-demand.

Parameters
vm the target MonitoredVm

public static boolean isKernelVM (MonitoredVm vm)

Returns true if the target VM is a kernel VM

Parameters
vm the target MonitoredVm

public static String jvmArgs (MonitoredVm vm)

Return the JVM arguments for the target Java application.

Parameters
vm the target MonitoredVm
Returns
  • String - contains the arguments passed to the JVM for the target Java application or the the string "Unknown" if the command line cannot be determined.

public static String jvmFlags (MonitoredVm vm)

Return the JVM flags for the target Java application.

Parameters
vm the target MonitoredVm
Returns
  • String - contains the flags passed to the JVM for the target Java application or the the string "Unknown" if the command line cannot be determined.

public static String mainArgs (MonitoredVm vm)

Return the arguments to the main class for the target Java application. Returns the arguments to the main class. If the arguments can't be found, the string "Unknown" is returned.

Parameters
vm the target MonitoredVm
Returns
  • String - contains the arguments to the main class for the target Java application or the the string "Unknown" if the command line cannot be determined.

public static String mainClass (MonitoredVm vm, boolean fullPath)

Return the main class for the target Java application. Returns the main class or the name of the jar file if the application was started with the -jar option.

Parameters
vm the target MonitoredVm
fullPath include the full path to Jar file, where applicable
Returns
  • String - contains the main class of the target Java application or the the string "Unknown" if the command line cannot be determined.

public static String vmVersion (MonitoredVm vm)

Return the Java Virtual Machine Version.

Parameters
vm the target MonitoredVm
Returns
  • String - contains the version of the target JVM or the the string "Unknown" if the version cannot be determined.