openresty-systemtap-toolkit icon indicating copy to clipboard operation
openresty-systemtap-toolkit copied to clipboard

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

Open pkking opened this issue 7 years ago • 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 avatar Jul 10 '17 02:07 pkking

@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.

agentzh avatar Jul 10 '17 03:07 agentzh