top命令查看单个进程


  • 获取进程pid
➜  ~  pgrep zsh  
2433
2720
11961
12318
  • 查看指定进程
➜  ~  top -p 12318

输出

top - 21:57:06 up  5:35,  5 users,  load average: 0.27, 0.16, 0.15
Tasks:   1 total,   0 running,   1 sleeping,   0 stopped,   0 zombie
%Cpu(s):  6.6 us,  0.7 sy,  0.0 ni, 91.5 id,  1.1 wa,  0.0 hi,  0.0 si,  0.0 st
KiB Mem:   4048232 total,  2410336 used,  1637896 free,   265268 buffers
KiB Swap:  4079612 total,        0 used,  4079612 free,  1342440 cached

  PID USER      PR  NI    VIRT    RES    SHR S %CPU %MEM     TIME+ COMMAND      
12318 wyq       20   0  141596   6120   3788 S  0.0  0.2   0:00.09 zsh          


上篇: 浏览器拦截js弹出框 下篇: 查看linux运行级别