nmon 的下一代工具 njmon

njmon

njmon = nmon + JSON format + real-time push to a stats database + instant graphing of “all the stats you can eat” (AIX and Linux)

This njmon is a major overhaul of nmon for the next 10 years:

  • Load more stats
  • JSON format is self documenting, flexible and the performance stats format for many new tools
  • Direct real-time loading of the JSON into modern open source time aware databases
  • New age browser based graphing tools allow dynamic data choice and graph style per VM, per server or across the estateAll this will be covered and more including many demo’s.

與 nmon 類似,但輸出爲 JSON 格式,可以用於服務器性能統計。

在這裏插入圖片描述

原圖鏈接:http://nmon.sourceforge.net/docs/nmon_why.png

與 nmon 對比

nmon 與 njmon 功能對比:
在這裏插入圖片描述
分析工具對比:
在這裏插入圖片描述

安裝


# 下載
$ wget http://sourceforge.net/projects/nmon/files/njmon_linux_binaries_v53.zip

# 解壓
$ unzip njmon_linux_binaries_v53.zip

# 選擇相應版本,放到 local 的 bin 下
$ mv njmon_linux_RHEL7_AMD64_v53 /usr/local/bin/njmon

# 驗證
$ njmon -?

常用命令

查看幫助

$ njmon -?

間隔 5 分鐘,採集一天

$ njmon -s 300 -c 288 -f -m /tmp

說明:

  • -s:採集間隔時間,單位秒,默認 60 秒
  • -c:採集次數,默認永久
  • -f:輸出到文件,數據內容:hostname_.json,錯誤內容:hostname_.err
  • -m:文件存儲目錄

默認間隔時間(-s 60),保存 json 結果

$ njmon > daodaotest.json

使用 njmon2chart 生成報告

# 下載
$ wget http://sourceforge.net/projects/nmon/files/njmonchart_v40.zip

# 解壓
$ unzip njmonchart_v40.zip

# 選擇相應版本,放到 local 的 bin 下
$ mv njmonchart_linux_v40.py /usr/local/bin/njmonchart

# 添加執行權限
$ chmod +x /usr/local/bin/njmonchart

# 生成 html 報告
$ njmonchart daodaotest.json daodaotest.html

報告截圖
在這裏插入圖片描述

CPU 圖表
在這裏插入圖片描述

內存圖表
在這裏插入圖片描述

工具地圖

在這裏插入圖片描述

參考資料

  • 官網鏈接:http://nmon.sourceforge.net/pmwiki.php?n=Site.Njmon
  • https://www.readkong.com/page/njmon-is-nmon-but-saving-to-json-format-for-modern-4222619
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章