Package org.openjdk.jol.vm.sa
Class ServiceabilityAgentSupport
- java.lang.Object
-
- org.openjdk.jol.vm.sa.ServiceabilityAgentSupport
-
public class ServiceabilityAgentSupport extends java.lang.Object
Hotspot Serviceability Agent support.IMPORTANT NOTE: On some UNIX based operating systems and MacOSX operation system, Hotspot Serviceability Agent (SA) process attach may fail due to insufficient privilege. So, on these operating systems, user (runs the application) must be super user and must be already authenticated for example with
"sudo"
command (also with password) to"/etc/sudoers"
file. For more information about"sudo"
, please have a look: http://en.wikipedia.org/wiki/Sudo http://linux.about.com/od/commands/l/blcmdl8_sudo.htm- See Also:
Task
,Result
,UniverseData
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
ServiceabilityAgentSupport.AgentStyle
-
Field Summary
Fields Modifier and Type Field Description private ServiceabilityAgentSupport.AgentStyle
agentStyle
private static ServiceabilityAgentSupport
INSTANCE
private long
processId
private boolean
sudoRequired
-
Constructor Summary
Constructors Modifier Constructor Description private
ServiceabilityAgentSupport()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private Result
callAgent(Task processor)
private Result
callAgent(Task processor, boolean sudoRequired, ServiceabilityAgentSupport.AgentStyle style)
private java.util.List<java.lang.String>
getArguments(boolean sudoRequired, ServiceabilityAgentSupport.AgentStyle style)
private static long
getCurrentProcId()
UniverseData
getUniverseData()
static ServiceabilityAgentSupport
instance()
private static boolean
isSudoValidOS()
private boolean
needSudo(ServiceabilityAgentSupport.AgentStyle style)
private static java.lang.String
normalizePath(java.lang.String path)
private void
senseAccess(ServiceabilityAgentSupport.AgentStyle style)
private ServiceabilityAgentSupport.AgentStyle
senseAgentStyle()
-
-
-
Field Detail
-
INSTANCE
private static ServiceabilityAgentSupport INSTANCE
-
processId
private final long processId
-
sudoRequired
private final boolean sudoRequired
-
agentStyle
private final ServiceabilityAgentSupport.AgentStyle agentStyle
-
-
Method Detail
-
instance
public static ServiceabilityAgentSupport instance()
-
senseAgentStyle
private ServiceabilityAgentSupport.AgentStyle senseAgentStyle()
-
needSudo
private boolean needSudo(ServiceabilityAgentSupport.AgentStyle style)
-
normalizePath
private static java.lang.String normalizePath(java.lang.String path)
-
isSudoValidOS
private static boolean isSudoValidOS()
-
getCurrentProcId
private static long getCurrentProcId()
-
callAgent
private Result callAgent(Task processor, boolean sudoRequired, ServiceabilityAgentSupport.AgentStyle style)
-
senseAccess
private void senseAccess(ServiceabilityAgentSupport.AgentStyle style)
-
getArguments
private java.util.List<java.lang.String> getArguments(boolean sudoRequired, ServiceabilityAgentSupport.AgentStyle style)
-
getUniverseData
public UniverseData getUniverseData()
-
-