Are there any relatively strightforward options with top to track a specific process?
Ideally by identifying the process by a human readable value? e.g. chrome
or java
.
In other words, I want to view all the typical information top provides, but for the results to be filtered to the parameters provided i.e.. 'chrome' or 'java'
Best Answer
You can simply use
grep
:Run following command to get output which you want (ex-chrome):
Here we are using
grep
with pipelines|
sotop
&grep
run parallel ;top
output given togrep
(as input) andgrep chrome
filters matching lineschrome
untiltop
stopped.