meow-watermelon / memdoor

Real-time process information tool for Linux OOM debugging
2 stars 1 forks source link

Process Tree View #10

Closed kennbr34 closed 2 months ago

kennbr34 commented 3 months ago

It would be really cool to have a process tree that's sorted by which processes are exerting the most memory pressure.

meow-watermelon commented 2 months ago

hi @kennbr34 - sorry for the long time delay and I just got a chance to look into this feature this weekend. i created a new version 1.4.0 to add process tree information in reverse order. i feel like if we sorted the process via memory usage might be a bit confusing so i left the process tree in the normal order.

the process tree information part includes the following information:

Example output:

##### PROCESS TREE INFORMATION #####
20175 (oom) - OOM score: 1251 - OOM adjustment score: 0 - RSS: 3706188 kB - PSS: 3706184 kB
9361 (bash) - OOM score: 666 - OOM adjustment score: 0 - RSS: 1896 kB - PSS: 1892 kB
9359 (ld-linux-x86-64) - OOM score: 666 - OOM adjustment score: 0 - RSS: 1508 kB - PSS: 1504 kB
535 (ld-linux-x86-64) - OOM score: 666 - OOM adjustment score: 0 - RSS: 4596 kB - PSS: 4454 kB
176 (systemd) - OOM score: 666 - OOM adjustment score: 0 - RSS: 1984 kB - PSS: 1980 kB
1 (systemd) - OOM score: 666 - OOM adjustment score: 0 - RSS: -1 kB - PSS: -1 kB

hope this patch is useful in your case and please let me know if you have any questions or concerns. thanks.