zoukankan      html  css  js  c++  java
  • Top 命令使用

    批处理模式,支持结果重定向到一个文件
        -b : Batch mode operation
            Starts top in 'Batch mode', which could be useful for sending output from top to other programs or to a file. In this mode, top will not accept input and runs until the iterations limit
        you've set with the '-n' command-line option or until killed.
        显示的帧数
        -n : Number of iterations limit as: -n number
            Specifies the maximum number of iterations, or frames, top should produce before ending.

        两帧显示的间隔
        -d : Delay time interval as: -d ss.tt (seconds.tenths)
        Specifies the delay between screen updates, and overrides the corresponding value in one's personal configuration file or the startup default. Later this can be changed with the 'd' or 's'
    interactive commands.

        top配置文件(保存当前状态为top的启动配置)    PERSONAL Configuration File(个性化配置文件)
        This file is written as '$HOME/.your-name-4-top' + 'rc'. Use the 'W' interactive command to create it or update it.

        Here is the general layout:
        global # line 1: the program name/alias notation
        " # line 2: id,altscr,irixps,delay,curwin
        per ea # line a: winname,fieldscur
        window # line b: winflags,sortindx,maxtasks
        " # line c: summclr,msgsclr,headclr,taskclr

        If the $HOME variable is not present, top will try to write the personal configuration file to the current directory, subject to permissions.

    分线程查看指定进程CPU占用

        top -H -p 进程号

  • 相关阅读:
    POJ 1016 不断压缩字符串判断三种结果
    递归的运行机制简单理解
    模拟链表
    输入两个字符串,不用系统提供的函数strcat,自定义函数将两个字符串连接起来。
    信号量多线程同步
    windows 多线程同步技术
    qsort和sort的区别(转)
    大数阶乘位数
    字符串数组qsort排序
    Safecracker
  • 原文地址:https://www.cnblogs.com/dongzhiquan/p/2853870.html
Copyright © 2011-2022 走看看