小男孩‘自慰网亚洲一区二区,亚洲一级在线播放毛片,亚洲中文字幕av每天更新,黄aⅴ永久免费无码,91成人午夜在线精品,色网站免费在线观看,亚洲欧洲wwwww在线观看

分享

Nmon 工具使用說明

 昵稱7747500 2012-02-16
Nmon 工具使用說明
2009年04月14日 星期二 8:41
本文來自:http://sunligang-chenghaijie./2009/01/nmon.html

Nmon 工具是 IBM 提供的免費的監(jiān)控 AIX 系統(tǒng)與 Linux 系統(tǒng)資源的工具。該工具可將服務(wù)器的系統(tǒng)資源耗用情況收集起來并輸出一個特定的文件,并可利用 excel 分析工具進行數(shù)據(jù)的統(tǒng)計分析,非常利用 UNIX 或者 Linux 系統(tǒng)的性能數(shù)據(jù)分析。Nmon 工具使用起來非常簡單,下面將分步驟介紹如何使用該工具。

一、安裝 nmon
首先我們在 IBM 的官方網(wǎng)站上下載 nmon 工具,下載時需注意要下載對應(yīng)的系統(tǒng)版本。我們這里以 debian31 為例,下載的是 nmon_x86_11f.zip 版本,該版本支持 ubuntu。下載后解壓,改名為 nmon 并上傳到 Linux 中。在 Linux 的終端中輸入 ls 可以看到:
slg@slg-desktop:~/桌面/GVS項目/nmon$ ls
nmon_x86_debian31 nmon_x86_knoppix5 nmon_x86_rhel3 nmon_x86_sles10
nmon_x86_fedora5 nmon_x86_rhel2 nmon_x86_rhel4 nmon_x86_sles9

為了能夠正常的使用 nmon 工具,我們需要修改相關(guān)文件的權(quán)限。我們這里所使用的 Linux 系統(tǒng)是 ubuntu,所以,我們僅修改”nmon_x86_debian31”文件
的權(quán)限即可。為了方便,直接改為 777,命令如下:chmod 777 nmon_x86_debian31修改完成后,我們就完成了 nmon 工具的安裝,接下來介紹一下該工具的使用。

二、使用 nmon
nmon 工具使用非常簡單。首先我們啟動該工具,在 nmon 目錄下,輸入 ./nmon_x86_debian31 打開界面,根據(jù)提示信息即可進行操作,
┌nmon─11f─────────────────────Hostname=slg-desktop──Refresh= 2secs ───10:12.08──────────────────────────────────────────────┐
│ │
│ ------------------------------ For help type H or ... │
│ # # # # #### # # nmon -? - hint │
│ ## # ## ## # # ## # nmon -h - full │
│ # # # # ## # # # # # # │
│ # # # # # # # # # # To start the same way every time │
│ # ## # # # # # ## set the NMON ksh variable │
│ # # # # #### # # │
│ ------------------------------ │
│ │
│ Use these keys to toggle statistics on/off: │
│ c = CPU l = CPU Long-term - = Faster screen updates │
│ m = Memory j = Filesystems + = Slower screen updates │
│ d = Disks n = Network V = Virtual Memory │
│ r = Resource N = NFS v = Verbose hints │
│ k = kernel t = Top-processes . = only busy disks/procs │
│ h = more options q = Quit │
│───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────│

如輸入c顯示cpu信息;
CPU Utilisation ──────────────────────────────────────────────────────────────────────────────────────────────────────────│
│ +-------------------------------------------------+ │
│CPU User% Sys% Wait% Idle|0 |25 |50 |75 100| │
│ | Please wait gathering data │
│ +-------------------------------------------------+ │
│──────────────────────────────────────────────────────────────────────────────────────────


三、輸出文件


上面所講的只是在服務(wù)器監(jiān)控,我們真正需要的是如何收集這些數(shù)據(jù)并處理分析它們。nmon 提供了一個 nmon_analyser 的分析工具,可利用 excel 進行統(tǒng)計結(jié)果的分析。在測試的時候,我們可使用下列命令進行數(shù)據(jù)的輸出:
./ nmon_x86_debian31 –fT –s 5 –c 5
上面命令的含義是,-f 輸出文件,-T 輸出最耗資源的進程,-s 收集數(shù)據(jù)的時間間隔,-c 收集次數(shù)。比如,我們測試場景需要執(zhí)行 20 分鐘,那么我們需要每隔 10 秒監(jiān)控 Linux系統(tǒng)資源就可以寫成:
./ nmon_x86_debian31 –fT –s 10 –c 120
120 是次數(shù),也就是 20 分鐘/10 秒=120 次。完成后會在當前目錄生成一個.nmon 的文
件。如圖:
slg@slg-desktop:~/桌面/GVS項目/nmon$ ls
nmon_x86_debian31 nmon_x86_knoppix5 nmon_x86_rhel3 nmon_x86_sles10 slg-desktop_090113_1024.nmon
nmon_x86_fedora5 nmon_x86_rhel2 nmon_x86_rhel4 nmon_x86_sles9
nmon 輸出文件的命名方式是服務(wù)器名_日期時間.nmon,我們在測試結(jié)束后,可到相應(yīng)的目錄下提取這些文件。


四、分析數(shù)據(jù)

打開nmon analyser v334
設(shè)置宏的安全級別是低 ,之后點擊 Analyser NMON data 按鈕 輸入文件 保存成excel格式即可。

    本站是提供個人知識管理的網(wǎng)絡(luò)存儲空間,所有內(nèi)容均由用戶發(fā)布,不代表本站觀點。請注意甄別內(nèi)容中的聯(lián)系方式、誘導(dǎo)購買等信息,謹防詐騙。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請點擊一鍵舉報。
    轉(zhuǎn)藏 分享 獻花(0

    0條評論

    發(fā)表

    請遵守用戶 評論公約

    類似文章 更多