alttch / pptop Goto Github PK
View Code? Open in Web Editor NEWOpen, extensible Python injector/profiler/analyzer
License: MIT License
Open, extensible Python injector/profiler/analyzer
License: MIT License
Hey there! Wonderful tool, love it, been looking for something like this for years.
I had to make a slight tweak to make it work with alpine / musl libc (which is fairly common in docker containers).
The call to __libc_dlopen_mode()
is glibc specific (as far as i can see, a workaround for the fact that libdl is not always loaded?), with musl you should just do dlopen()
.
I don't have a clean patch for this (that doesn't break glibc and tries to detect musl somehow), but wanted to post the issue to not forget.
Cheers
Nice work, thanks so much for making this!
(out of curiosity, any hope for macOS support someday? does it rely on strace/can it use dtrace instead on mac? feel free to close this issue)
Setup:
docker run --rm -d \
--name dd-agent \
--net host \
-e DD_API_KEY="fake" \
-v /proc/:/host/proc/:ro \
-v /sys/fs/cgroup/:/host/sys/fs/cgroup:ro \
-v /var/run/docker.sock:/var/run/docker.sock:ro \
-v /opt/datadog-agent/run:/opt/datadog-agent/run:rw \
datadog/agent
Attachment container (some flags aren't needed - was using this for debugging):
$ docker run --rm -it \
--name="devenv" \
--pid="container:dd-agent" \
--cap-add="SYS_PTRACE" \
--cap-add="SYS_ADMIN" \
--privileged \
--security-opt="seccomp=unconfined" \
--security-opt="apparmor=unconfined" \
ubuntu:21.10
Running:
$ apt update && apt install -y gdb python3-pip
$ pip3 install pptop
$ agent_pid=$(ps -ef | grep 'agent run$' | awk '{print $2}')
$
pptop $agent_pid
b'No symbol "__pptop_start_injection" in current context.\n'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.