自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

監(jiān)測(cè)Linux上面的流量MRTG-安裝MRTG

運(yùn)維 系統(tǒng)運(yùn)維
監(jiān)測(cè)Linux上面的流量MRTG:MRTG是一個(gè)監(jiān)控網(wǎng)絡(luò)鏈路流量負(fù)載的工具軟件,通過(guò)snmp協(xié)議得到設(shè)備的流量信息,并將流量負(fù)載以包含PNG格式的圖形的HTML 文檔方式顯示給用戶,本文講述的是安裝MRTG。

  監(jiān)測(cè)Linux上面的流量MRTG-安裝MRTG

  本文講述的是監(jiān)測(cè)Linux上面的流量MRTG:前言、安裝MRTG準(zhǔn)備工作、安裝MRTG

                       監(jiān)測(cè)網(wǎng)路卡流量、mrtg.cfg參數(shù)的含義監(jiān)測(cè)CPU負(fù)載量

  開(kāi)始安裝 MRTG

  由于 MRTG 是透過(guò) SNMP 通訊協(xié)定來(lái)要求資料,因此你的 Linux 上面需要先安裝相關(guān)的軟體,通常我們都是安裝 ucd-snmp 這套軟體的,那就來(lái)安裝吧!

  下載 ucd-snmp-4.2.1.tar.gz, mrtg-2.9.17.tar.gz ;

  安裝 ucd-snmp-4.2.1.tar.gz: [root @tsai /root]# cd /usr/local/src

  1.   [root @tsai src]# cp /root/ucd-snmp-4.2.1.tar.gz .  
  2.  
  3.   [root @tsai src]# tar -zxvf ucd-snmp-4.2.1.tar.gz  
  4.  
  5.   [root @tsai src]# cd ucd-snmp-4.2.1  
  6.  
  7.   [root @tsai ucd-snmp-4.2.1]# ./configure --prefix=/usr/local/snmp  
  8.  
  9.   .......(過(guò)程我就省略了)  
  10.  
  11.   ************** Configuration Section **************  
  12.  
  13.   You are about to be prompted by a series of questions. Answer  
  14.  
  15.   them carefully, as they determine how the snmp agent and related  
  16.  
  17.   applications are to function.  
  18.  
  19.   After the configure script finishes, you can browse the newly  
  20.  
  21.   created config.h file for further - less important - parameters to  
  22.  
  23.   modify. Be careful if you re-run configure though since config.h will  
  24.  
  25.   be over written.  
  26.  
  27.   -Press return to continue- (這裡按 enter 吧)  
  28.  
  29.   disabling above prompt for future runs... yes  
  30.  
  31.   checking System Contact Information...  
  32.  
  33.   *** System Contact Information:  
  34.  
  35.   Describes who should be contacted about the host the agent is  
  36.  
  37.   running on. This information is available in the MIB-II tree. This  
  38.  
  39.   Can Also Be Over-Ridden Using The "syscontact" Syntax In The Agent'S  
  40.  
  41.   Configuration Files.  
  42.  
  43.   System Contact Information (root@):root@tsai.adsldns.org (這裡輸入你的 e-mail)  
  44.  
  45.   setting System Contact Information to... root@tsai.adsldns.org  
  46.  
  47.   checking System Location...  
  48.  
  49.   *** System Location:  
  50.  
  51.   Describes the location of the system. This information is  
  52.  
  53.   available in the MIB-II tree. This Can also be over-ridden using the  
  54.  
  55.   "syslocation" syntax in the agent's configuration files.  
  56.  
  57.   System Location (Unknown):RedHat 6.1 (這裡可以隨便輸入,不正確也沒(méi)關(guān)係)  
  58.  
  59.   setting System Location to... RedHat 6.1  
  60.  
  61.   checking Location to write logfile...  
  62.  
  63.   *** Logfile location:  
  64.  
  65.   Enter the default location for the snmpd agent to dump  
  66.  
  67.   information & errors to. If not defined (enter the keyword "none"  
  68.  
  69.   at the prompt below) the agent will use stdout and stderr instead.  
  70.  
  71.   (Note: This value can be over-ridden using command line options.)  
  72.  
  73.   Location to write logfile (/var/log/snmpd.log):(按 enter 即可)  
  74.  
  75.   setting Location to write logfile to... /var/log/snmpd.log  
  76.  
  77.   checking Location to write persistent information...  
  78.  
  79.   *** snmpd persistent storage location:  
  80.  
  81.   Enter a directory for the snmp library to store persistent  
  82.  
  83.   data in the form of a configuration file.  
  84.  
  85.   Location to write persistent information (/var/ucd-snmp):(按 enter 即可)  
  86.  
  87.   [root @tsai ucd-snmp-4.2.1]# make  
  88.  
  89.   [root @tsai ucd-snmp-4.2.1]# make install  
  90.  

  上面輸入的資訊,在進(jìn)行 MRTG 的製圖時(shí),會(huì)顯示在圖表上面,不過(guò),這也是可以改的資訊,所以,如果不小心輸入錯(cuò)誤也沒(méi)關(guān)係的。這樣就將 ucd-snmp 安裝妥當(dāng)了!

  啟動(dòng) ucd-snmp :

  直接在 shell 下面打上 /usr/local/snmp/sbin/snmpd 即可!或者直接加在 /etc/rc.d/rc.local 當(dāng)中,就可以自動(dòng)開(kāi)機(jī)時(shí)啟動(dòng)了!

  安裝 MRTG

  1.    [root @tsai /root]# cd /usr/local/src  
  2.  
  3.   [root @tsai src]# cp /root/mrtg-2.9.17.tar.gz .  
  4.  
  5.   [root @tsai src]# tar -zxvf mrtg-2.9.17.tar.gz  
  6.  
  7.   [root @tsai src]# cd mrtg-2.9.17  
  8.  
  9.   [root @tsai mrtg-2.9.17]# ./configure --prefix=/usr/local/mrtg-2 \  
  10.  
  11.   > --with-gd=/usr/include \  
  12.  
  13.   > --with-gd-lib=/usr/lib \  
  14.  
  15.   > --with-gd-inc=/usr/include \  
  16.  
  17.   > --with-png=/usr/include \  
  18.  
  19.   > --with-zlib=/usr/include  
  20.  
  21.   [root @tsai mrtg-2.9.17]# make; make install  
  22.  

  [root @tsai mrtg-2.9.17]# mkdir /usr/local/apache/htdocs/mrtg (請(qǐng)注意,這裡與你的 WWW 主頁(yè)的放置地點(diǎn)有關(guān),請(qǐng)依你的系統(tǒng)來(lái)設(shè)定,另外,由于我們需要設(shè)定 網(wǎng)路流量、CPU與RAM使用率,因此在 mrtg 中,可以再建立叁個(gè)子目錄,比較容易管理啦!)

  1.   [root @tsai mrtg-2.9.17]# mkdir /usr/local/apache/htdocs/mrtg/net  
  2.  
  3.   [root @tsai mrtg-2.9.17]# cp images/* /usr/local/apache/htdocs/mrtg/net (將一些影像檔拷貝到即將使用的目錄中去備用)  
  4.  

  就樣就安裝妥當(dāng)了!再來(lái)就是開(kāi)始要設(shè)定 MRTG 的組態(tài)啰!

【編輯推薦】

RedHat上安裝MRTG監(jiān)控本機(jī)網(wǎng)卡流量

Linux下的mrtg使用

cacti 匯總流量圖-將數(shù)據(jù)合并后作圖

責(zé)任編輯:zhaolei 來(lái)源: vbird
相關(guān)推薦

2011-03-30 11:31:10

MRTG

2011-03-30 11:34:26

流量MRTG

2011-03-30 11:31:10

MRTG

2011-03-30 13:29:49

MRTG

2011-03-30 11:31:10

MRTG

2011-03-31 11:14:29

MRTG監(jiān)測(cè)

2011-03-31 13:40:48

MRTGsquid流量

2011-03-31 10:24:15

2010-06-01 10:32:04

linux Mrtg

2010-06-01 11:20:39

Mrtg window

2011-04-01 09:18:03

FreeBSD安裝MRTG

2010-06-01 12:51:00

2011-03-31 11:14:28

2011-03-31 11:20:10

MRTG監(jiān)測(cè)

2010-06-01 14:30:06

Mrtg教程

2011-03-30 13:29:55

MRTG

2010-05-31 18:08:26

Ubuntu mrtg

2011-03-30 13:40:21

MRTG

2011-03-30 13:29:51

MRTG

2011-04-06 13:50:34

LinuxMRTG監(jiān)控
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號(hào)