Skip to content
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

only sudo if you aren't already the user running the jvm process #76

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tekumara
Copy link

@tekumara tekumara commented Nov 7, 2018

this enables usage inside docker containers that don't contain sudo, when running docker exec as the user running the jvm process

eg: when perf-map-agent is installed at /perf-map-agent/ inside a container running a single jvm process as user daemon, create a perf-map in the container's /tmp as follows:

docker exec -it --user daemon CONTAINER sh -c '/perf-map-agent/bin/create-java-perf-map.sh $(pidof java)'

NB: the pid of the perf map will be the pid in the container's namespace, not the host's.

hopefully addresses concerns in #18

this enables usage inside docker containers that don't contain sudo, when running `docker exec` as the user running the jvm process, eg:`docker exec -it --user daemon`

because perf maps may now be created as the jvm process user, we need to
tell perf script/top/report to not check ownership by using the --force
flag
@tekumara
Copy link
Author

@jrudolph are you able to remove this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant