attach
Attach to running Java applications to record performance data for CPU, JDBC, JPA, HTTP, and MongoDB subsystems. Connect to JVM processes or Docker containers for comprehensive profiling analysis.
Instructions
Attach to a running JVM by PID or to a JVM inside a Docker container. Records performance data for the following subsystems: cpu, jdbc, jpa, http_server, http_client, mongo_db until check_status is called with 'stopRecording: true'. You can use list_jvms to discover JVMs.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pid | No | The PID of a local JVM process, or the container PID (NSpid) of a JVM inside the specified container. If a container is specified and this is omitted, the topmost JVM in the container is used. | |
| containerNameOrId | No | The name or ID of a Docker container. When specified, profiling attaches to a JVM inside this container. |