openresty/openresty-systemtap-toolkit

How to get the flame graph of a process running in a container

pkking opened this issue · 1 comments

I have a openresty process running in a docker container.
My work steps:

  1. Run sample-bt-off-cpu -t 5 -p 4690 -u/-k on the host
  2. Run ./stackcollapse.pl offcpu1.bt |./flamegraph.pl > sample-bt-off-cpu.svg
    Results:
  3. A perfect kernel space flame graph
  4. A unusual user space flame graph like this
    sample-bt-off-cpu

MY QUESTION is, can this toolkit work with container or what i missed?

@pkking AFAIK, containers are always problematic when running systemtap tools. It needs a lot of work to get it right, if not impossible. One common mistake is not giving your container enough permissions. Well, I cannot be more helpful here.