Linux进程管理常用命令(二)

   htop命令:

        选项:

        -d # : 指定延迟时间间隔;

        -u  UserName :仅显示指定用户的进程;

        -s : COLUME : 以指定字段进行排序;

    子命令 :

        l : 显示选定的进程打开的文件列表;

        s: 跟踪选定的进程的系统调用;

        t: 以cengj关系显示个进程状态;

        a:将选定的进程绑定至某指定的cpu核心;

   vmstat命令:

        vmstat – Report virtual memory statistics

        vmstat [options] [delay [count]]

   procs:

        r: 等待运行的进程的个数;cpu上等待运行的任务的队列长度;

        b:处于不可中断睡眠状态的进程个数;被阻塞的任务的长度;

        memory :

        swpd : 交换内存使用总量;

        free: 空闲的物理内存总量;

        buffer :用于buffer的内存总量:

        cache :用于cache的内存总量;

    swap

        si: 数据进入swap中的数据速率(kb/s)

        so: 数据离开swap的速率(kb/s)

     io :

       bi: 从块设备读入数据到系统的速度(kb/s)

       bo:保存数据之块设备的速率(kb/s)

   system

       in : interrupts, 中断速率;

       cs : context switch , 上下文切断的速率;

    cpu:

        us: user space

        sy: system

        id: idle

         wa:wait

         st: stolen

         选项:

         -s:显示内存统计数据;

    pmap命令:

        -report memory map of a process

        pmap [options] pid […]

        -x : 显示详细格式的信息;

        另一种查看方式: cat /proc/PID/maps

                       

   glances命令:

        -A aross-platform curses-based monitoring tool

        内建命令:

        常用选项:

        -b: 以Byte为单位显示网上数据速率;

        -d: 关闭磁盘I/P模块;

        -m: 关闭mount模块;

        -n: 关闭network模块;

        -t # :刷新时间间隔;

        -1 :每个cpu的相关信息数据单独显示;

        -o {HTML | CSV}: 输出格式;

        -f /PATH/TO/SOMEDIR :设定输出文件的位置;

        C/S模式下运行glances 命令;

        服务模式:

            glances -s -B IPADDR

            IPDDR :本机某地址,用于监听

        客户端模式:

           glances -c IPADDR 连接客户端

   dstat命令:

        -c, –cpu

           enable cpu stats (system, user, idle, wait, hardware interrupt, software interrupt)

        -C 0,3,total

              include cpu0, cpu3 and total (when using -c/–cpu)

        -d, –disk

              enable disk stats (read, write)

        -D total,hda

              include total and hda (when using -d/–disk)

        -g, –page

              enable page stats (page in, page out)

        -i, –int

              enable interrupt stats

        -I 5,10

             include interrupt 5 and 10 (when using -i/–int)

        -l, –load

            enable load average stats (1 min, 5 mins, 15mins)

        -m, –mem

              enable memory stats (used, buffers, cache, free)

        -n, –net

              enable network stats (receive, send)

        -N eth1,total

              include eth1 and total (when using -n/–net)

        -p, –proc

              enable process stats (runnable, uninterruptible, new)

原创文章,作者:shadow,如若转载,请注明出处:http://www.178linux.com/65892

(0)
shadowshadow
上一篇 2017-01-05
下一篇 2017-01-05

相关推荐

  • clsass 10 shell编程(二)及文件查找及压缩

    一、选择执行(条件判断if) 流程控制 过程式编程语言:     顺序执行     选择执行     循环执行 使用read 命令来接受输入 使用read 来把输入值分配给一个或多个shell变量:   &nb…

    Linux干货 2016-08-18
  • 编辑器之神VS神之编辑器

      在linux下有两款非常棒的处理器,它们的功能异常的强大,在普通使用者手中,我们或许仅仅把它们当做文本处理器,但在官方文档中,它们不仅仅被定义为开发工具。正如在windows下,office在我们手中仅仅是文本,表格,PPT等文件的处理工具,而在大神手中,Excel是可以用来作画的!PowerPoint 还可以用来播放视频!  &nb…

    Linux干货 2017-08-05
  • selinux介绍

    本章内容 SELinux概念启用SELinux管理文件安全标签管理端口标签管理SELinux布尔值开关管理日志查看SELinux帮助 SELinux介绍 SELinux: Secure Enhanced Linux,是美国国家安全局「NSA=The National Security Agency」和SCC(Secure Computing Corporat…

    Linux干货 2016-09-19
  • CentOS 7上的性能监控工具

    Linux中基于命令行的性能监控工具:dstat、top、netstat、vmstat、htop、ss、glances 1、dstat – 多类型资源统计工具(需配置epel源)   该命令整合了vmstat,iostat和ifstat三种命令。同时增加了新的特性和功能可以让你能及时看到各种的资源使用情况,从而能够使你对比和整…

    Linux干货 2016-09-07
  • HA Cluste 的配置:keepalived:vrrp协议 双主模型

    keepalived:vrrp协议 双主模型 第一步配置出始环境: 准备两节点: 主节点:172.18.57.7 long1 备节点:172.18.57.8 long2 (1) 各节点时间必须同步; 同步时间: ~]# yum -y install chrony ~]# vim /etc/chrony.conf ~]# systemctl start chr…

    Linux干货 2017-05-15
  • rpm,yum,编译安装应用详解 (Blog 5)

    rpm, yum, 编译安装全解

    2017-11-27

评论列表(1条)

  • luoweiro
    luoweiro 2017-02-23 07:58

    几个工具挺强大的,但是希望能常用起来,熟练掌握工具的同时也要掌握对应的数据指标究竟带来什么问题。