Open DullJZ opened 3 months ago
Hey @DullJZ. The evt.type=procinfo
event, and the on_event
callback, are both only relative to one process/thread per time, so as you already do it would be appropriate to use a combination of a table and print it with an interval. Can you expand on why topproc_cpu.lua
is not enough for your use case? Also I think the filter evt.type=procinfo and container.name!=host
is not necessary, and evt.type=procinfo
should be enough.
Thanks for your reply!
Actually I want to make a command-line way to get all the infomation about processes in a container, including cpu, memory and io usage, like csysdig does:
I want to use sysdig to list the CPU usage of all container processes, so I wrote a script imitating
topproc_cpu.lua
:But this seems to only provide one process information when an event occurs, outputting:
Therefore, I want to know how the built-in evt.type=procinfo works. In other words, how can I achieve my goal, like viewing all process information in csysdig?