-
Notifications
You must be signed in to change notification settings - Fork 261
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document how to run perf-map-agent against Docker containers #40
Comments
@sattishv, this is a good question. There seem to be several issues around running perf-map-agents in containers. The simplest way is probably installing perf-map-agent inside the container and then spawning another shell in the same container and then running the scripts as usual. As others have reported this needs sudo to work inside the container. A nicer solution would be to be able to run perf and perf-map-agent from outside the container. As far as I have tried that there seem to be several issues around that with PIDs not matching inside and outside the container etc. It would be nice if someone would get this to work. It might be that this feature would need specific support from perf itself. |
Here's information about how to do that:
Though, afaik, it hasn't been achieved yet to run perf-map-agent outside of the container. |
I managed to run the attach script from the host namespace. I haven't properly integrated that as it needs some hacking of internals from tools.jar. Right now it will only work if the target process has PID 1 in the container. See https://github.com/jvm-profiling-tools/perf-map-agent/compare/jr/attach-to-container-from-host |
Let's close this one as a duplicate of #50. |
Hi team,
We have our application running inside a container. If thats the case the map-agent should be installed outside or inside the container. I presume it should be done inside the container because the jdk we use is referenced inside. Could you please review and let us know the ideal approach.
Sattish.
The text was updated successfully, but these errors were encountered: