V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
Gcourage
V2EX  ›  Linux

Busybox 里面怎么监控一个进程的 CPU 跟 MEM 得好用的命令

  •  
  •   Gcourage · Dec 16, 2018 · 4410 views
    This topic created in 2692 days ago, the information mentioned may be changed or developed.
    之前在 Linux 上使用 ps — no-header -o %cpu,%mem -p $pid

    但是 busybox 里面,ps 功能比较弱
    大家都是直接用 top -n1 再 grep 挑选下?
    3 replies    2018-12-20 10:52:06 +08:00
    lieh222
        1
    lieh222  
       Dec 16, 2018
    sar
    vuuv
        2
    vuuv  
       Dec 17, 2018 via Android
    top -b 可以启用批量模式。
    好像也没其他命令可以保证效果了。
    Gcourage
        3
    Gcourage  
    OP
       Dec 20, 2018 via Android
    @lieh222 @vuuv 多谢两位,最后还是用 top 再 grep 了,很多命令都缺失了
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5633 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 36ms · UTC 06:30 · PVG 14:30 · LAX 23:30 · JFK 02:30
    ♥ Do have faith in what you're doing.