X-Git-Url: https://git.sven.stormbind.net/?p=sven%2Fjattach.git;a=blobdiff_plain;f=README.md;fp=README.md;h=711ffe647bc81b9d5fa14c873cfa8c431cdf2e5a;hp=7532b569201ea6f2f1c8ad95d909f73f06f6a4ce;hb=91eb05a0b9cfabc7670a4f0f1e2b8083307a2fca;hpb=b330d6f5cff47911c6b1faf488d0d2791e1a181b diff --git a/README.md b/README.md index 7532b56..711ffe6 100644 --- a/README.md +++ b/README.md @@ -22,8 +22,14 @@ https://docs.oracle.com/javase/8/docs/jdk/api/attach/spec/ - **printflag** : print VM flag - **jcmd** : execute jcmd command +### Download + +Binaries are available on the [Releases](https://github.com/apangin/jattach/releases) page. + +On some platforms, you can also [install](#installation) jattach with a package manager. + ### Examples -#### Load JVMTI agent +#### Load native agent $ jattach load <.so-path> { true | false } [ options ] @@ -31,6 +37,13 @@ Where `true` means that the path is absolute, `false` -- the path is relative. `options` are passed to the agent. +#### Load Java agent + +Java agents are loaded by the special built-in native agent named `instrument`, +which takes .jar path and its arguments as a single options string. + + $ jattach load instrument false "javaagent.jar=arguments" + #### List available jcmd commands $ jattach jcmd "help -all" @@ -44,9 +57,9 @@ On FreeBSD, you can use the following command to install `jattach` package: #### Alpine Linux -On Alpine Linux, you can use the following command to install `jattach` package from the edge/testing repository: +On Alpine Linux, you can use the following command to install `jattach` package from the edge/community repository: - $ apk add --no-cache jattach --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing/ + $ apk add --no-cache jattach --repository http://dl-cdn.alpinelinux.org/alpine/edge/community/ #### Archlinux