Linux system to view and process management tools

Linux system to view and process management tools

  • ps命令
    ps:report a snapshot of the current processes.
    ps [options]:
    选项有三种风格:
    1 UNIX options, which may be grouped and must be preceded by a dash.
    2 BSD options, which may be grouped and must not be used with a dash.
    3 GNU long options, which are preceded by two dashes.
    选项:
    a:所有与终端相关的进程;
    x:所有与终端无关的进程;
    u:以用户为中心组织进程状态信息显示;
    常用组合之一:aux
           USER:启动进程用户
                 PID:进程号
                 %CPU:进程使用掉的CPU资源百分比
                 %MEN:进程所占用的物理内存百分比
                 TTY:进程在哪个终端运行
                 START:进程被触发的时间
                 TIME:进程实际使用的cpu的时间
                 COMMAND:触发此进程的命令
                  VSZ:虚拟内存集
                  RSS:常驻内存集
                  STAT: R:running,运行状态
                             S:interruptible sleeping,可中断睡眠
                             D:uniterruptible sleeping,不可中断睡眠
                             T:stopped
                             Z:zombie
                    有的进程在进程状态之后有其他字母:其分别代表含义:
                             s:session leader
                             +:前台进程,占据着某终端
                            l:多线程进程
                             <:高优先级进程
                              N:低优先级进程
    常用组合之二,-efH,-eFH
    -e:显示所有进程
    -f:显示完整格式的进程信息
    -F:显示完整格式的进程信息
          c:cpu utilization cpu利用率
                PSR:运行在哪颗CPU上
        -H:以层级结构显示进程的相关信息
    常用组合之三,axo
    -o:表示自定义要显示的字段,以逗号分隔;field1,field2,..
            常用的field:pid, ni, pri, psr, pcpu, stat, comm, tty, ppid, rtprio
                          ppid:父进程号
                          ni:nice值;
                          priority:priority, 优先级;
                          rtprio:real time priority,实时优先级
  • The top command
    top: running state of the dynamic process of continuous monitoring

Guess you like

Origin blog.51cto.com/14418331/2424307