How do i run top for only the processes i am interested in?



  • Man page for top.

    $ top -b -p 4055,4054
    top - 10:36:05 up 18:51,  1 user,  load average: 0.00, 0.01, 0.05
    Tasks:   2 total,   0 running,   2 sleeping,   0 stopped,   0 zombie
    %Cpu(s):  0.0 us,  0.0 sy,  0.0 ni,100.0 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
    KiB Mem :  1013196 total,   430596 free,   103712 used,   478888 buff/cache
    KiB Swap:        0 total,        0 free,        0 used.   731600 avail Mem 
    
      PID USER      PR  NI    VIRT    RES    SHR S %CPU %MEM     TIME+ COMMAND
     4055 prometh+  20   0  178436  46360  18048 S  0.0  4.6   1:06.67 prometheus
     4054 root      20   0  220888   6356   3320 S  0.0  0.6   0:03.02 rsyslogd
    

    You can add -d to change the delay.


Log in to reply
 

© Lightnetics 2019