Limit the output of the TOP command to a specific process name

后端 未结 17 2641
臣服心动
臣服心动 2020-12-12 09:48

If you call the top command, you get all the running processes. But how can I limit the output only to a certain process name like \"java\"?

I\'ve

17条回答
  •  执念已碎
    2020-12-12 10:15

    Running the below will give continuous update in console:

    bcsmc2rtese001 [~]$ echo $SHELL  
    /bin/bash  
    bcsmc2rtese001 [~]$ top | grep efare  or watch -d 'top | grep efare' or top -p pid
    27728 efare     15   0 75184 3180 1124 S  0.3  0.0 728:28.93 tclsh  
    27728 efare     15   0 75184 3180 1124 S  0.7  0.0 728:28.95 tclsh
    

提交回复
热议问题