歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> Linux下系統資源監控工具Collectl基本介紹

Linux下系統資源監控工具Collectl基本介紹

日期:2017/2/27 15:59:45   编辑:Linux教程

Collectl 是一個輕量級的性能監控工具,可監控包括 CPU、磁盤、帶寬、內存、網絡、NFS、進程等等信息。

對系統資源的監控,是系統管理員的一個必備的任務,我們經常需要監控系統資源以便解決相應的系統問題。Linux系統也自帶很多的監控工具,如 top、vmstat、iostat、sar等,對這些工具的熟練使用時非常重要的,但是這些工具太散了,有時候我們可能會需要看一些更全面地數 據,Collectl就是一個這樣的超級工具。之前我已經介紹過IBM的監控工具nmon了,nmon監控也是非常全面的,而且可視化做的也非常好,但是 相對nmon的話,collectl是支持socket發送數據,對於很多機器的監控,nmon得開很多的窗口,而collectl只需在一個窗口就能看 到所有機器的數據,所以必須要推薦之!

開源網址:http://collectl.sourceforge.net/

Unlike most monitoring tools that eitherfocus on a small set of statistics, format their output in only one way, runeither 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 currentlyinclude buddyinfo, cpu, disk, Linux/1672.html' target='_blank'>inodes, infiniband, lustre, memory, network, nfs,processes, quadrics, slabs, sockets and tcp.

不同於大多數的監控工具那樣集中於一小部分數據的統計,然後以一種方式格式化輸出數據,以交互的方式或作為一個守護進程後台運行,但是不能同時支持兩種方式,collectl嘗試實現以上所有的功能。你可以選擇監控任何一個廣大子系統的一個子集,這些子系統包括buddyinfo, cpu, disk, inodes, infiniband, lustre,memory, network, nfs, processes, quadrics, slabs, sockets and tcp信息。

下面的框圖顯示,collectl是遠遠超過一個工具,從/ proc中讀取數據,將其結果寫入到一個文件中,或在終端上。花幾分鐘的時間研究這個圖可以幫助更好地了解不同的方式,你可能會更有效地使用 collectl。正如你可以看到,有一個數據可以按照不同的路徑和哪些需要取決於你所選擇的選項。

Interactive Mode
This is the default and in this mode datais read from /proc and passes throughanalyze. It is really nothing morethan a function that looks at the change between the current and previousvalues. It then divides by the duration of the interval (unless you specicify-on) and produces the rate, for those values that are indeed rate based. Thisfunction is also responsible for formatting/disposing the output. More on thatin a little while.

交互模式
這是默認的模式,在這種模式下數據從/ proc讀取並且分析。這實在是沒有什麼特殊的功能,就是著眼於當前和之前值之間的變化。此功能,負責格式化/配置輸出。

Record Mode
Data passes from /proc the same way as InteractiveMode but instead of going through theAnalyze function it written itto a file. By eliminating the calculations and formatting, this is the mostefficient path the data can take and is why collectl it so light-weight whenrun in this way.

錄制模式
數據的收集同交互模式一樣通過/proc目錄,但是該模式會通過分析把結果寫入到一個文件之中。通過排除計算和格式化的輸出,這是最有效的方法收集數據並且為什麼collectl通過此種方式運行時是如此輕量級的。

Playback Mode
Here collectl works virtually identical to InteractiveMode except instead of reading data from /proc it reads it from a file.This means all the switches that control data formatting still apply. There arealso a couple of switches that allow you to select the time period from whichyou want to play back data.

回放模式
這個模式同互動模式類似,只是該軟件獲取數據的途徑不是從/proc文件系統,而是從一個文件中獲取數據。這意味著所有的選項都是依然可以應用的。這兒也有一個開關可以允許你選擇查看數據的時間段回放。

Copyright © Linux教程網 All Rights Reserved