你好,游客 登录 注册 搜索
背景:
阅读新闻

Linux服务器性能检测工具之 Collectl

[日期:2013-05-22] 来源:Linux社区  作者:opsmysql [字体:大 中 小]

NAME

collectl - Collects data that describes the current system status.

简单翻译成中文就是:收集当前系统状态数据并予以显示

Collectl是一个系统指标收集工具。可以守护进程方式和交互方式运行。支持从一系列的子系统中收集数据。包含一个Graphite接口,使得数据可以轻易地传递给Graphite进行存储。

下面是官方的介绍:

There are a number of times in which you find yourself needing performance data. These can include benchmarking, monitoring a system's general heath or trying to determine what your system was doing at some time in the past. Sometimes you just want to know what the system is doing right now. Depending on what you're doing, you often end up using different tools, each designed to for that specific situation. Unlike most monitoring tools that either focus on a small set of statistics, format their output in only one way, run either interatively or as a daemon but not both, collectl tries to do it all. You can choose to monitor any of a broad set of subsystems which currently include buddyinfo, cpu, disk, inodes, infiniband, lustre, memory, network, nfs, processes, quadrics, slabs, sockets and tcp.

下载: http://sourceforge.net/projects/collectl/files/

安装就不啰嗦了,非常简单!rpn包或源码安装!

使用使用介绍


collectl有三种运行模式:

1. Interactive Mode(交互模式): This is the default and in this mode data is read from /proc and passes through analyze.


2. Record Mode(记录模式):read data from live system and write to file or display on terminal

使用语法:collectl [-f file] [options]


3. Playback Mode(回放模式):read data from one or more raw data files and display on terminal

使用语法:collectl -p file1 [file2 ...] [options]


众多监控工具中、collectl支持的性能数据种类应该是最全的一个,监控的子系统项类型:

SUMMARY SUBSYSTEMS --摘要子系统:显示的比较简单.


              b - buddy info (memory fragmentation)

              c - CPU

              d - Disk

              f - NFS V3 Data

              i - Inode and File System

              j - Interrupts

              l - Lustre

              m - Memory

              n - Networks

              s - Sockets

              t - TCP

              x - Interconnect

              y - Slabs (system object caches)


DETAIL SUBSYSTEMS --细节子系统:显示比较详细的信息.

      C - CPU

              D - Disk

              E - Environmental data (fan, power, temp),  via ipmitool

              F - NFS Data

              J - Interrupts

              L - Lustre OST detail OR client Filesystem detail

              M - Memory node data, which is also known as numa data

              N - Networks

              T - 65 TCP counters only available in plot format

              X - Interconnect

              Y - Slabs (system object caches)

              Z - Processes

 

上面这些监控项目必须要以 -s 参数来指定,如:collectl -ss ,并且是运行在回放模式下.

常用的参数及说明:

collect 默认不带参数的情况下显示如下:

[root@twexdb1 qzhijun]# collectl

waiting for 1 second sample...

#<----CPU[HYPER]-----><----------Disks-----------><----------Network---------->

#cpu sys inter  ctxsw KBRead  Reads KBWrit Writes  KBIn  PktIn  KBOut  PktOut

  0  0  1032    439      0      0      0      0      2    23      6      21

  0  0  1049    345      8    16    265    10      0      3      1      6

  0  0  1074    229      0      0      0      0      3    25      6      23

  0  0  1091    226      0      0      0      0      2    19      3      16

可以看到显示的内容:CPU/Disks/Network,显示的比较简单。


-s 显示子系统

1.显示摘要子系统信息指定项目信息:

举例:

1).只显示CPU的简单信息

[root@twexdb1 qzhijun]# collectl -sc

waiting for 1 second sample...

#<----CPU[HYPER]----->

#cpu sys inter  ctxsw

  0  0  1099    342

  0  0  1060    355

  0  0  1115    266

  0  0  1032    147

Ouch!


2).同时显示内存和磁盘的简单信息

[root@twexdb1 qzhijun]# collectl -sdm

waiting for 1 second sample...

#<-----------Memory-----------><----------Disks----------->

#Free Buff Cach Inac Slab  Map KBRead  Reads KBWrit Writes

118M 270M  5G  5G 223M  1G      0      0    264      8

118M 270M  5G  5G 223M  1G      0      0      0      0

118M 270M  5G  5G 223M  1G      0      0    52    10

119M 270M  5G  5G 223M  1G      8    16  1157    52

119M 270M  5G  5G 223M  1G      0      0      0      0

Ouch!

这个子系统也可以原来collectl这个命令不带任何参数的情况下追加或减少显示的信息,用+/-.

3).增加内存的显示信息:

[root@twexdb1 qzhijun]# collectl -s+m

waiting for 1 second sample...

#<----CPU[HYPER]-----><-----------Memory-----------><----------Disks-----------><----------Network---------->

#cpu sys inter  ctxsw Free Buff Cach Inac Slab  Map KBRead  Reads KBWrit Writes  KBIn  PktIn  KBOut  PktOut

  0  0  2348  1851 116M 270M  5G  5G 223M  1G      0      0      0      0      2    22      4      19

  1  0  3513  3354 116M 270M  5G  5G 223M  1G      0      0    316    18    78    777    120    701

  0  0  1108    304 116M 270M  5G  5G 223M  1G      8    16      1      1    142  1605    184    1368

  0  0  1151    683 115M 270M  5G  5G 223M  1G      0      0    28      4      9    65    31      60

Ouch!

linux
相关资讯       Collectl 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款