Chinaunix首页 | 论坛 | 博客
  • 博客访问: 17695528
  • 博文数量: 7460
  • 博客积分: 10434
  • 博客等级: 上将
  • 技术积分: 78178
  • 用 户 组: 普通用户
  • 注册时间: 2008-03-02 22:54
文章分类

全部博文(7460)

文章存档

2011年(1)

2009年(669)

2008年(6790)

分类: BSD

2008-04-09 09:38:06

Description :

使用 MRTG 監控 CPU 溫度有個好處,除了可以確定 Server 上 CPU 的風扇有無掛點之外,我們也可以用於無人管理之機房,若機房內之冷氣出問題或不冷時我們亦可判斷,MRTG 真是網管人員的好幫手。


Step 1.

安裝監控系統之監控軟體,此軟體可查出 CPU 溫度,所以我們安裝它。

#cd /usr/ports/sysutils/xmbmon
#make install WITHOUT_X11="yes"

Setp 2.

寫個 shell script 方便我們 MRTG 抓系統溫度資料。

#vi /xxx-path-xxx/tempmon.sh

#!/bin/sh

/usr/local/bin/mbmon -c 1 -i -T 4 -u -n
exit 0

Setp 3.

設定 MRTG 裡的 .cfg 設定檔,溫度資料輸出環境,這邊我們使用台灣慣用的攝氏 Centigrade 刻度。

#vi /xxx-path-xxx/ntut.cfg

#  ----- temperature ----

Target[temp]: `/xxx-path-xxx/tempmon.sh`
MaxBytes[temp]: 100
Title[temp]: FreeBSD System Temperature
PageTop[temp]:

System Temperature


Options[temp]: gauge,absolute,unknaszero,growright
YLegend[temp]: Temperature(C)
ShortLegend[temp]: (C)
Legend1[temp]: CPU Temperature
Legend2[temp]: M/B Temperature
LegendI[temp]: CPU Temp.
LegendO[temp]: M/B Temp.

我的 MRTG 溫度表:


阅读(541) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~