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

來源:互聯網
上載者:User

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, 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檔案系統,而是從一個檔案中擷取資料。這意味著所有的選項都是依然可以應用的。這兒也有一個開關可以允許你選擇查看資料的時間段回放。

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.