Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This patch adds support to print the contents of processLRU. This may be useful during debugging. Example: $ sudo ./tetra dump processlru process:{exec_id:"YXBhcGFnLXVidW50dS1kZXY6MTow" pid:{} uid:{} binary:"<kernel>" flags:"procFS" start_time:{seconds:1710835735 nanos:594078504} auid:{} parent_exec_id:"YXBhcGFnLXVidW50dS1kZXY6MTow" tid:{}} color:"inUse" refcnt:{value:4} refcntOps:"{process++:1}|{parent++:3}" process:{exec_id:"YXBhcGFnLXVidW50dS1kZXY6MTg5MTAwMDAwMDA6NTY0" pid:{value:564} uid:{} cwd:"/" binary:"/usr/bin/containerd" flags:"procFS auid rootcwd" start_time:{seconds:1710835754 nanos:504077933} auid:{value:4294967295} parent_exec_id:"YXBhcGFnLXVidW50dS1kZXY6MjcwMDAwMDAwOjE=" tid:{value:564}} color:"inUse" refcnt:{value:1} refcntOps:"{process++:1}" process:{exec_id:"YXBhcGFnLXVidW50dS1kZXY6MzE1MDAwMDAwMDoyMTU=" pid:{value:215} uid:{} cwd:"/" binary:"/usr/bin/udevadm" flags:"procFS auid rootcwd" start_time:{seconds:1710835738 nanos:744077948} auid:{value:4294967295} parent_exec_id:"YXBhcGFnLXVidW50dS1kZXY6MjcwMDAwMDAwOjE=" tid:{value:215}} color:"inUse" refcnt:{value:1} refcntOps:"{process++:1}" process:{exec_id:"YXBhcGFnLXVidW50dS1kZXY6NDA5NDAwMDAwMDA6MTE1Mw==" pid:{value:1153} uid:{} cwd:"/" binary:"/usr/sbin/agetty" arguments:"-o \"-p -- \\u\" --noclear - linux" flags:"procFS auid rootcwd" start_time:{seconds:1710835776 nanos:534077952} auid:{value:4294967295} parent_exec_id:"YXBhcGFnLXVidW50dS1kZXY6MjcwMDAwMDAwOjE=" tid:{value:1153}} color:"inUse" refcnt:{value:1} refcntOps:"{process++:1}" process:{exec_id:"YXBhcGFnLXVidW50dS1kZXY6NDEwMzAwMDAwMDA6MTE2MA==" pid:{value:1160} uid:{} cwd:"/" binary:"/usr/lib/systemd/systemd-logind" flags:"procFS auid rootcwd" start_time:{seconds:1710835776 nanos:624077943} auid:{value:4294967295} parent_exec_id:"YXBhcGFnLXVidW50dS1kZXY6MjcwMDAwMDAwOjE=" tid:{value:1160}} color:"inUse" refcnt:{value:1} refcntOps:"{process++:1}" [...] We also provide "--skip-zero-refcnt" command line argument to print only the entries with refcnt not equals to zero. $ sudo ./tetra dump processlru --skip-zero-refcnt process:{exec_id:"YXBhcGFnLXVidW50dS1kZXY6MTUzMDAwMDAwMDoxNDI=" pid:{value:142} uid:{} binary:"[kworker/3:1H-kblockd]" flags:"procFS" start_time:{seconds:1710835737 nanos:124077925} auid:{value:4294967295} parent_exec_id:"YXBhcGFnLXVidW50dS1kZXY6MjcwMDAwMDAwOjI=" tid:{value:142}} color:"inUse" refcnt:{value:1} refcntOps:"{process++:1}" process:{exec_id:"YXBhcGFnLXVidW50dS1kZXY6MjY0NTQ5MjAwMDAwMDAwOjM5OTAzNg==" pid:{value:399036} uid:{} binary:"[kworker/4:1-rcu_gp]" flags:"procFS" start_time:{seconds:1711100284 nanos:794077928} auid:{value:4294967295} parent_exec_id:"YXBhcGFnLXVidW50dS1kZXY6MjcwMDAwMDAwOjI=" tid:{value:399036}} color:"inUse" refcnt:{value:1} refcntOps:"{process++:1}" process:{exec_id:"YXBhcGFnLXVidW50dS1kZXY6MzgwMDAwMDAwOjQ=" pid:{value:4} uid:{} binary:"[rcu_par_gp]" flags:"procFS" start_time:{seconds:1710835735 nanos:974077916} auid:{value:4294967295} parent_exec_id:"YXBhcGFnLXVidW50dS1kZXY6MjcwMDAwMDAwOjI=" tid:{value:4}} color:"inUse" refcnt:{value:1} refcntOps:"{process++:1}" process:{exec_id:"YXBhcGFnLXVidW50dS1kZXY6MzgwMDAwMDAwOjQw" pid:{value:40} uid:{} binary:"[ksoftirqd/4]" flags:"procFS" start_time:{seconds:1710835735 nanos:974077932} auid:{value:4294967295} parent_exec_id:"YXBhcGFnLXVidW50dS1kZXY6MjcwMDAwMDAwOjI=" tid:{value:40}} color:"inUse" refcnt:{value:1} refcntOps:"{process++:1}" [...] Signed-off-by: Anastasios Papagiannis <[email protected]>
- Loading branch information