process_tree_rss_bytes#
Run commands and agent-written programs inside an operating-system boundary. See the guide.
- zett_agent.sandbox.resources.process_tree_rss_bytes(pid)[源代码]#
Return the resident memory of
pid, its descendants and its process group.The group alone misses a command that starts its own session, which is exactly what bubblewrap does (
--new-session), so its processes sit in a group of their own. The descendants alone miss a process that was orphaned and reparented toinit, while it is still in the group. A process that does both, detaching and orphaning itself, is in neither and is not counted.The host runs this, outside the sandbox, so it sees everything the sandbox started. None means
pscould not be read, which the watchdog reports rather than treating as "no memory used".- 参数:
pid (int)
- 返回类型:
int | None