public class LinuxVirtualMachine extends HotSpotVirtualMachine
Modifier and Type | Class and Description |
---|---|
private class |
LinuxVirtualMachine.SocketInputStream |
Modifier and Type | Field and Description |
---|---|
private static int |
ATTACH_ERROR_BADVERSION |
(package private) static boolean |
isLinuxThreads |
(package private) java.lang.String |
path |
private static java.lang.String |
PROTOCOL_VERSION |
private static java.lang.String |
tmpdir |
Constructor and Description |
---|
LinuxVirtualMachine(AttachProvider provider,
java.lang.String vmid)
Attaches to the target VM
|
Modifier and Type | Method and Description |
---|---|
(package private) static void |
checkPermissions(java.lang.String path) |
(package private) static void |
close(int fd) |
(package private) static void |
connect(int fd,
java.lang.String path) |
private java.io.File |
createAttachFile(int pid) |
void |
detach()
Detach from the target VM
|
(package private) java.io.InputStream |
execute(java.lang.String cmd,
java.lang.Object... args)
Execute the given command in the target VM.
|
private java.lang.String |
findSocketFile(int pid) |
(package private) static int |
getLinuxThreadsManager(int pid) |
(package private) static boolean |
isLinuxThreads() |
(package private) static int |
read(int fd,
byte[] buf,
int off,
int bufLen) |
(package private) static void |
sendQuitTo(int pid) |
(package private) static void |
sendQuitToChildrenOf(int pid) |
(package private) static int |
socket() |
(package private) static void |
write(int fd,
byte[] buf,
int off,
int bufLen) |
private void |
writeString(int fd,
java.lang.String s) |
attachTimeout, dumpHeap, executeJCmd, getAgentProperties, getSystemProperties, heapHisto, loadAgent, loadAgentLibrary, loadAgentPath, localDataDump, printFlag, readInt, remoteDataDump, setFlag
attach, attach, equals, hashCode, id, list, loadAgent, loadAgentLibrary, loadAgentPath, provider, toString
private static final java.lang.String tmpdir
static boolean isLinuxThreads
java.lang.String path
private static final java.lang.String PROTOCOL_VERSION
private static final int ATTACH_ERROR_BADVERSION
public LinuxVirtualMachine(AttachProvider provider, java.lang.String vmid) throws AttachNotSupportedException, java.io.IOException
AttachNotSupportedException
java.io.IOException
public void detach() throws java.io.IOException
detach
in class VirtualMachine
java.io.IOException
- If an I/O error occursjava.io.InputStream execute(java.lang.String cmd, java.lang.Object... args) throws AgentLoadException, java.io.IOException
execute
in class HotSpotVirtualMachine
AgentLoadException
java.io.IOException
private java.lang.String findSocketFile(int pid)
private java.io.File createAttachFile(int pid) throws java.io.IOException
java.io.IOException
private void writeString(int fd, java.lang.String s) throws java.io.IOException
java.io.IOException
static boolean isLinuxThreads()
static int getLinuxThreadsManager(int pid) throws java.io.IOException
java.io.IOException
static void sendQuitToChildrenOf(int pid) throws java.io.IOException
java.io.IOException
static void sendQuitTo(int pid) throws java.io.IOException
java.io.IOException
static void checkPermissions(java.lang.String path) throws java.io.IOException
java.io.IOException
static int socket() throws java.io.IOException
java.io.IOException
static void connect(int fd, java.lang.String path) throws java.io.IOException
java.io.IOException
static void close(int fd) throws java.io.IOException
java.io.IOException
static int read(int fd, byte[] buf, int off, int bufLen) throws java.io.IOException
java.io.IOException
static void write(int fd, byte[] buf, int off, int bufLen) throws java.io.IOException
java.io.IOException