I have one question on Linux pid things. How to get pids in one same group? It seems easy to get all pids or pgid with 'ps' command in Linux, but how to get the pids that belong to same group, or in other words, how to get the pids of one same program? Anyone please give me some help on this? Thank you!
from man ps
To print a process tree:
ps -ejH
ps axjf
pstree
can also help
Updated: Use pidof
to find the process pids of the named programs. e.g. pidof chrome
will get all chrome pids.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With