加入收藏 | 设为首页 | 会员中心 | 我要投稿 辽源站长网 (https://www.0437zz.com/)- 云专线、云连接、智能数据、边缘计算、数据安全!
当前位置: 首页 > 服务器 > 搭建环境 > Linux > 正文

怎样在批处理模式下运行top命令

发布时间:2021-06-11 02:24:13 所属栏目:Linux 来源:互联网
导读:1) 如何在批处理模式下运行 top 命令 默认地, top 命令按照 CPU 的使用率来排序输出结果,所以当你在批处理模式中运行以下命令时,它会执行同样的操作并打印前
副标题[/!--empirenews.page--] 1) 如何在批处理模式下运行 top 命令

默认地,top 命令按照 CPU 的使用率来排序输出结果,所以当你在批处理模式中运行以下命令时,它会执行同样的操作并打印前 35 行:

#top-bc |head-35

 

top-06:41:14 up 8 days,20:24,1 user, load average:0.87,0.77,0.81

Tasks:139 total,1 running,136 sleeping,0 stopped,2 zombie

%Cpu(s):0.0 us,3.2 sy,0.0 ni,96.8id,0.0 wa,0.0 hi,0.0 si,0.0 st

KiBMem:3880940 total,1595932 free,886736 used,1398272 buff/cache

KiBSwap:1048572 total,514640 free,533932 used.2648472 avail Mem

 

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND

1 root 20019114428001596 S 0.00.15:43.63/usr/lib/systemd/systemd--switched-root --system --deserialize 22

2 root 200000 S 0.00.00:00.32[kthreadd]

3 root 200000 S 0.00.00:28.10[ksoftirqd/0]

5 root 0-20000 S 0.00.00:00.00[kworker/0:0H]

7 root rt 0000 S 0.00.00:33.96[migration/0]

8 root 200000 S 0.00.00:00.00[rcu_bh]

9 root 200000 S 0.00.063:05.12[rcu_sched]

10 root 0-20000 S 0.00.00:00.00[lru-add-drain]

11 root rt 0000 S 0.00.00:08.79[watchdog/0]

12 root rt 0000 S 0.00.00:08.82[watchdog/1]

(编辑:辽源站长网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

推荐文章
    热点阅读