Is there a way to only list processes of given users in htop? I know that I can select a single user by using htop -u USERNAME
, but is there a way to select more than a one person?
-
Doesn't look like it's possible. File a feature request at github.com/hishamhm/htop/issues– muruNov 30, 2016 at 12:11
1 Answer
Maybe this could help you; First get processid with ps command with u option then, use htop -p commands as below;
#!/bin/bash
n=0;
while (( n++ < 3 )); do
{ sleep 3; killall htop;}&
htop -p $(ps -u root -u youruser | awk 'BEGIN{ORS=","} {print $1}')
done
-
Well, it does not show me, if any new process is started, does it? Nov 30, 2016 at 12:32
-
@AdamHunyadi Yes, you are right, maybe delay option help you, I updated ans. Nov 30, 2016 at 12:39
-
-d only refreshes the htop call, but the process list remains the same. Nov 30, 2016 at 12:48
-