How can I exclude Chrome/Firefox processes from top command output? It's just too messy with them in there, and it isn't important for me to see them there.
2 Answers
The top command is very command-line friendly. Try launching top like this:
top | grep -v firefox
-
1
top | grep -Ev "(firefox|Web|chrome)"works for me on Kubuntu 18.04 with both Firefox and Google Chrome running.Webis forWeb Contentwhich is what Firefox shows when YouTube is playing.DK Bose– DK Bose2018-11-05 01:10:42 +00:00Commented Nov 5, 2018 at 1:10 -
@DKBose: Beautiful!, I don't expect that pipe through grep still make
topmonitor other processes.raring-coffee20– raring-coffee202018-11-05 01:36:02 +00:00Commented Nov 5, 2018 at 1:36
As top is a compiled program, you'd need to modify the source code. Using ps it's easily achieved by using:
ps aux | grep --invert-match firefox
to exclude firefox.
Note: I don't have Chrome, so don't know what the process name is but adding | grep --invert-match chrome at the end of the above command should accomplish both if and only if Chrome's process name is chrome (educated guess)
-
Nice one, how to have the same effect as top with
treeand only show process of a specific user?raring-coffee20– raring-coffee202018-11-04 11:09:28 +00:00Commented Nov 4, 2018 at 11:09 -
treeis for directories, so I don't get it, so if I were you, I'd ask a new question. ;-)Fabby– Fabby2018-11-04 23:09:10 +00:00Commented Nov 4, 2018 at 23:09
killall chromeandkillall firefoxis one way to make them go away ... ;)