GithubHelp home page GithubHelp logo

zu1kbackup / jattach Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jattach/jattach

0.0 1.0 0.0 62 KB

JVM Dynamic Attach utility

Home Page: https://github.com/apangin/jattach/releases

License: Apache License 2.0

C 95.62% Makefile 4.38%

jattach's Introduction

jattach

JVM Dynamic Attach utility

The utility to send commands to a JVM process via Dynamic Attach mechanism.

All-in-one jmap + jstack + jcmd + jinfo functionality in a single tiny program.
No installed JDK required, works with just JRE. Supports Linux containers.

This is the lightweight native version of HotSpot Attach API
https://docs.oracle.com/javase/8/docs/jdk/api/attach/spec/

Supported commands:

  • load : load agent library
  • properties : print system properties
  • agentProperties : print agent properties
  • datadump : show heap and thread summary
  • threaddump : dump all stack traces (like jstack)
  • dumpheap : dump heap (like jmap)
  • inspectheap : heap histogram (like jmap -histo)
  • setflag : modify manageable VM flag
  • printflag : print VM flag
  • jcmd : execute jcmd command

Download

Binaries are available on the Releases page.

On some platforms, you can also install jattach with a package manager.

Examples

Load native agent

$ jattach <pid> load <.so-path> { true | false } [ options ]

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 <pid> load instrument false "javaagent.jar=arguments"

List available jcmd commands

$ jattach <pid> jcmd help -all

Installation

FreeBSD

On FreeBSD, you can use the following command to install jattach package:

$ pkg install jattach

Alpine Linux

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/community/

Archlinux

jattach package can be installed from AUR using one of AUR helpers, e.g., yay:

$ yay -S jattach

Debian Linux

On Debian Linux, you can use the following command to install jattach from the official repository:

$ apt install jattach

Packages are provided for bullseye (stable), bookworm (testing) and sid (unstable).

jattach's People

Contributors

apangin avatar incubos avatar hwesselmann avatar andreaskl avatar goldshtn avatar jchipmunk avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.