I know how to hide kernel threads from ps
:
/bin/ps --pid 2 --ppid 2 --deselect -o user:10,pid,stat,pcpu,pmem,tty,start_time,cmd
and I know how to show only processes owned by root:
/bin/ps -U root -o user:10,pid,stat,pcpu,pmem,tty,start_time,cmd
but how do I show only processes owned by root, while excluding kernel threads?
Combining the two above commands does not work:
/bin/ps --pid 2 --ppid 2 --deselect -U root -o user:10,pid,stat,pcpu,pmem,tty,start_time,cmd