2015年11月13日 星期五

Introduction to Collectl tool

Please excuse my limited English ability.
I just want to practice my English translation skill!


中文原始版本:
http://sam33-home.blogspot.tw/2015/11/linux-collectl.html

--------------------------------------------------------------------------------------------------------

Collectl is a useful tool fr performance monitor in Linux operator system

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.

It allow us to monitor any of a broad set of subsystems which currently include cpu, disk, infiniband, memory, network, swap and so on.

official website
http://collectl.sourceforge.net/
--------------------------------------------------------------------------------------------------------

How to install this tool :

You only need to use single command in your terminal to install collectl (Ubuntu)

sudo apt-get install collectl

if it say collectl not found. Maybe you can update apt-get itself.

--------------------------------------------------------------------------------------------------------

How to use this tool :

collectl <parameters>

You can run collectl with no parameter.
Default setting is monitor cpu, harddisk and network every one second.


--------------------------------------------------------------------------------------------------------

Parameters :

-i <seconds> 

monitor frequency

For example :
collectl -i 0.5 //Monitor once every 0.5 seconds

-s[<subsys>]  what monitor information you want to show

<subsys> is monitor information short name you want to show

You can use follow command to show what monitor information your computer supporting : 

collectl --showsubsys 

For my virtual machine, it support monitor information below :


If you want to monitor cpu and memory information, you can add 'c' and 'm' to <subsys>.

For example :
collectl -scm //show cpu and memory information.
collectl -scmn //show cpu, memory and network information.

In the otherwise, collectl also support high flexibility data information output.
It can send monitor information to any server through the internet, You can write a simple socket programming tcp server by yourself to receive those information, or use some code in github to do that.

--------------------------------------------------------------------------------------------------------

This is first version inforeceiver our team use in TSCC competition. 
It's full text user interface.

https://github.com/x000032001/infoReceiver

This is final version inforeceiver our team use in TSCC competition. 
It's text user control interface but support displayed in the graph with graph.
It also support multiple computer with collectl to send data to it.

https://github.com/SAM33/infoReceiver-guiversion

Next time, I will introduction how to use infoReceiver-guiversion.

--------------------------------------------------------------------------------------------------------

Linux系統監控程式-Collectl

Practice in English :
http://sam33-home.blogspot.tw/2015/11/introduction-to-collectl-tool.html

--------------------------------------------------------------------------------------------------------
簡介:

Collectl是一個Linux作業系統效能監控的好用工具,我們常常需要監控電腦效能的相關資料,用來比較或監控系統,或是嘗試了解你的系統過去做了什麼,又或是你只是想要知道系統現在的狀況。

他能夠讓我們監控現在的處理器、硬碟、 infiniband、記憶體、網路流量、swap等等資訊。

官方網站為
http://collectl.sourceforge.net/

--------------------------------------------------------------------------------------------------------
如何安裝(Ubuntu):

只需要再終端機中輸入指令來安裝collectl

sudo apt-get install collectl

如果他說找不到 collectl的話,可能是apt-get版本太舊了,可以使用如下指令來更新apt-get

sudo apt-get update

--------------------------------------------------------------------------------------------------------
如何使用:

collectl <參數>

你可以不加任何參數來執行,預設為每秒一次監控處理器、硬碟以及網路



--------------------------------------------------------------------------------------------------------
參數說明

-i <秒> 每隔多久監測一次

EX:
collectl -i 0.5

-s[<subsys>]  要呈現那些資訊

<subsys>為要呈現哪些資訊,你可以透過指令
collectl --showsubsys 來顯示你的電腦有哪些資訊能夠被蒐集,以我的虛擬機來說
可以顯示的資料如下圖。
假設我要顯示處理器和記憶體資訊,就需要把c和m加到<subsys>去。
EX:
collectl -scm //顯示處理器和記憶體資訊
collectl -scmn //顯示處理器和記憶體以及網路資訊

另外collectl最強大的功能莫過於他的靈活性,他可以把蒐集的資料透過網路傳送出去,我們只需要透過簡易的socket programming,或是簡單的使用別人寫好的inforeceiver,就能從遠端蒐集collectl回傳的資料,方便我們一次監測多台伺服器的效能。

--------------------------------------------------------------------------------------------------------

去年去比TSCC時我們團隊的最初版本,純文字介面。
https://github.com/x000032001/infoReceiver

去年去比TSCC時我們團隊所撰寫的版本,支援多client連線、圖形化圖表功能:
https://github.com/SAM33/infoReceiver-guiversion

關於infoReceiver-guiversion之後有空會介紹怎麼使用,讀者可以先自行試看看。

--------------------------------------------------------------------------------------------------------