未加星标

Collectl An Awesome All in one Performance Analysis Tool in Linux

字体大小 | |
[系统(linux) 所属分类 系统(linux) | 发布者 店小二05 | 时间 2017 | 作者 红领巾 ] 0人收藏点击收藏

Collectl is a light-weight performance monitoring tool capable of reporting interactively as well as logging to disk. It reports statistics on buddyinfo, cpu, disk, inodes, infiniband, lustre, memory, network, nfs, processes, quadrics, slabs, sockets and tcp in easy to read format. Unlike most monitoring tools that either focus on a small set of statistics, format their output in only one way, run either interactively or as a daemon but not both, collectl can monitor different parameters at the same time and report them in a suitable manner.

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.

The following block diagram shows that collectl is much more than a tool that reads data from /proc and writes its results into a file or on the terminal. (for more details visit: Collectl )


Collectl   An Awesome All in one Performance Analysis Tool in Linux
Installation

To install collect on Redhat/Centos

# yum install collectl y

To install on debian family like Ubuntu etc

# apt-get install collectl y

Once install you can run collect to get the current status of the server, here you will get CPU, disk and network status as below,

# collectl


Collectl   An Awesome All in one Performance Analysis Tool in Linux
Usage: Collectl Subsystem Theory:

If you write data for CPUs and DISKs to a raw file and play it back with -sc, you will only see CPU data. If you play it back with -scm you will still only see CPU data since memory data was not collected. However, when used with -P, collectl will always honor the subsystems specified with this switch so in the previous example you will see CPU data plus memory data of all 0s. To see the current set of default subsystems, which are a subset of this full list, use -h.

You can also use + or to add or subtract subsystems to/from the default values. For example, “-s-cdn+N”< will remove cpu, disk and network monitoring from the defaults while adding network detail.


Collectl   An Awesome All in one Performance Analysis Tool in Linux

The default is “cdn”, which stands for CPU, Disk and Network summary data.

Monitor CPU Usage:

To monitor the summary of cpu usage use “-sc” along with collect

# collectl sc


Collectl   An Awesome All in one Performance Analysis Tool in Linux

To check each cpu individually, use “C”. It will output multiple lines together, one for each cpu.

# collectl sC


Collectl   An Awesome All in one Performance Analysis Tool in Linux

To collect combined result of both, you can use both c & C in single commend;

# collectl scC

Monitor Memory

Use the m subsystem to check the memory

# collectl sm


Collectl   An Awesome All in one Performance Analysis Tool in Linux

The M option would give further details about the memory.

# collect sM


Collectl   An Awesome All in one Performance Analysis Tool in Linux
Check disk usage

The d and D options provide the summary and details on disk usage.


Collectl   An Awesome All in one Performance Analysis Tool in Linux
Collectl   An Awesome All in one Performance Analysis Tool in Linux
4. Report multiple systems together

So let’s say you want a report of cpu, memory and disk io together, then use the subsystems together.

# collect scmd
Collectl   An Awesome All in one Performance Analysis Tool in Linux
5. Display time with the stats

To display the time in each line along with the measurements, use the T option. And over that, to specify options, you need to use the “-o” switch.

# collect scmd oT
Collectl   An Awesome All in one Performance Analysis Tool in Linux

You could also display the time in milliseconds with “-oTm”.

Change sample count

Every row the collectl reports is a snapshot or sample. And it takes these snapshots at regular intervals, say 1 second. The i option sets the interval and c option sets the sample count.

# collectl -c1 -sm


Collectl   An Awesome All in one Performance Analysis Tool in Linux

#collectl -sm i5


Collectl   An Awesome All in one Performance Analysis Tool in Linux
More examples

To get top output,

# collectl -top


Collectl   An Awesome All in one Performance Analysis Tool in Linux

# collect -vmstat


Collectl   An Awesome All in one Performance Analysis Tool in Linux

本文系统(linux)相关术语:linux系统 鸟哥的linux私房菜 linux命令大全 linux操作系统

主题: CPULinuxUbuntu
分页:12
转载请注明
本文标题:Collectl An Awesome All in one Performance Analysis Tool in Linux
本站链接:http://www.codesec.net/view/534359.html
分享请点击:


1.凡CodeSecTeam转载的文章,均出自其它媒体或其他官网介绍,目的在于传递更多的信息,并不代表本站赞同其观点和其真实性负责;
2.转载的文章仅代表原创作者观点,与本站无关。其原创性以及文中陈述文字和内容未经本站证实,本站对该文以及其中全部或者部分内容、文字的真实性、完整性、及时性,不作出任何保证或承若;
3.如本站转载稿涉及版权等问题,请作者及时联系本站,我们会及时处理。
登录后可拥有收藏文章、关注作者等权限...
技术大类 技术大类 | 系统(linux) | 评论(0) | 阅读(36)