Package sun.tools.attach
Class LinuxVirtualMachine
java.lang.Object
com.sun.tools.attach.VirtualMachine
sun.tools.attach.HotSpotVirtualMachine
sun.tools.attach.LinuxVirtualMachine
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionLinuxVirtualMachine
(AttachProvider provider, String vmid) Attaches to the target VM -
Method Summary
Modifier and TypeMethodDescription(package private) static void
checkPermissions
(String path) (package private) static void
close
(int fd) (package private) static void
private File
createAttachFile
(int pid) void
detach()
Detach from the target VM(package private) InputStream
Execute the given command in the target VM.private String
findSocketFile
(int pid) (package private) static int
getLinuxThreadsManager
(int pid) (package private) static boolean
(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, String s) Methods inherited from class sun.tools.attach.HotSpotVirtualMachine
attachTimeout, dumpHeap, executeJCmd, getAgentProperties, getSystemProperties, heapHisto, loadAgent, loadAgentLibrary, loadAgentPath, localDataDump, printFlag, readInt, remoteDataDump, setFlag
Methods inherited from class com.sun.tools.attach.VirtualMachine
attach, attach, equals, hashCode, id, list, loadAgent, loadAgentLibrary, loadAgentPath, provider, toString
-
Field Details
-
tmpdir
- See Also:
-
isLinuxThreads
static boolean isLinuxThreads -
path
String path -
PROTOCOL_VERSION
- See Also:
-
ATTACH_ERROR_BADVERSION
private static final int ATTACH_ERROR_BADVERSION- See Also:
-
-
Constructor Details
-
LinuxVirtualMachine
public LinuxVirtualMachine(AttachProvider provider, String vmid) throws AttachNotSupportedException, IOException Attaches to the target VM
-
-
Method Details
-
detach
Detach from the target VM- Specified by:
detach
in classVirtualMachine
- Throws:
IOException
- If an I/O error occurs
-
execute
Execute the given command in the target VM.- Specified by:
execute
in classHotSpotVirtualMachine
- Throws:
AgentLoadException
IOException
-
findSocketFile
-
createAttachFile
- Throws:
IOException
-
writeString
- Throws:
IOException
-
isLinuxThreads
static boolean isLinuxThreads() -
getLinuxThreadsManager
- Throws:
IOException
-
sendQuitToChildrenOf
- Throws:
IOException
-
sendQuitTo
- Throws:
IOException
-
checkPermissions
- Throws:
IOException
-
socket
- Throws:
IOException
-
connect
- Throws:
IOException
-
close
- Throws:
IOException
-
read
- Throws:
IOException
-
write
- Throws:
IOException
-