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

cacti、rrd 相關(guān)

運(yùn)維 系統(tǒng)運(yùn)維
Cacti是一套基于PHP,MySQL,SNMP及RRDTool開發(fā)的網(wǎng)絡(luò)流量監(jiān)測(cè)圖形分析工具。本文仔細(xì)為大家講下cacti相關(guān)和rrd 相關(guān)!

cacti是一款網(wǎng)絡(luò)流量監(jiān)控系統(tǒng),非常好用,誰用誰知道!下面講下cacti、rrd 相關(guān)

  cacti數(shù)據(jù)庫

  1.結(jié)構(gòu)

  host 主機(jī)表

  data_local 數(shù)據(jù)表

  data_template 數(shù)據(jù)模板表

  data_template_data 數(shù)據(jù)信息表

  2.關(guān)系

  `host`.`id` 與 `data_local`.`host_id`關(guān)聯(lián)

  `data_local`、`data_tempate_data`.data_template_id 與 `data_template`.id關(guān)聯(lián)

  `data_template_data`.local_data_id 和 `data_local`.id 關(guān)聯(lián)

  3.作用

  基于上述信息可以查到任意一個(gè)給定主機(jī)的所有RRA文件信息

  4.范例

  select dl.id, dl.data_template_id, dt.name, dl.host_id, host.hostname, dl.snmp_query_id, dl.snmp_index,dtd.data_template_id, dtd.data_input_id, dtd.data_source_path, dtd.name_cache from data_local as dl,host,data_template as dt,data_template_data as dtd where dl.host_id= {$host_id} and dl.host_id=host.id and dt.id=dl.data_template_id and dl.id=dtd.local_data_id;

#p#

  rrd 文件格式

  1.文件頭

  包含一些版本信息和一些于數(shù)據(jù)存儲(chǔ)區(qū)相關(guān)的一些信息。例如:RRD的版本號(hào),DS數(shù)量,DS名稱,DS類型,RRA數(shù)量,RRA類型,PDP數(shù)據(jù)區(qū),CDP數(shù)據(jù)區(qū),最后更新時(shí)間,RRA目前更新到的位置等等信息

  2.數(shù)據(jù)區(qū)

  該區(qū)域存儲(chǔ)了實(shí)際的數(shù)據(jù)。數(shù)據(jù)的來源是根據(jù)在創(chuàng)建RRD文件時(shí)DS的類型及相關(guān)RRA定義,并通過相關(guān)的計(jì)算得出的(CF,DST)。注意:數(shù)據(jù)源(DS)是存儲(chǔ)的實(shí)體,而RRA是數(shù)據(jù)存儲(chǔ)的載體。在邏輯上,每個(gè)RRA都有所有DS的數(shù)據(jù)(計(jì)算)

  3.特點(diǎn)

  環(huán)狀數(shù)據(jù)庫,可記錄條數(shù)在創(chuàng)建的時(shí)候就確定,可存儲(chǔ)空間滿了以后舊數(shù)據(jù)覆蓋新數(shù)據(jù),可以實(shí)現(xiàn)簡(jiǎn)單的計(jì)算功能,自定義功能比較豐富,適合對(duì)時(shí)效性要求不高的數(shù)值型存儲(chǔ)。

  rrdtool 命令

  1.info:查看文件結(jié)構(gòu)

  2.lastupdate:最后更新時(shí)間及值

  3.last:最后更新值

  4.dunp:查看文件內(nèi)容

  5.fetch:查看數(shù)據(jù)

  rrdtool fetch [options]

  CF值通過dump內(nèi)數(shù)據(jù)查看

  -s 起始時(shí)間,可以是時(shí)間戳也可以是時(shí)間戳?xí)r差 -1h, -1d 等。默認(rèn)是 -1d

  -e 結(jié)束時(shí)間,同上。默認(rèn)是 now

  -r 時(shí)間間隔

  獲取CF為AVERAGE,時(shí)間間隔為1800秒,過去1小時(shí)到過去10分鐘內(nèi)的數(shù)據(jù)

  rrdtool fetch test.rrd AVERAGE -r 1800 -s -1h -e -10m

通過文章的介紹,我們知道了cacti、rrd 相關(guān)有哪些,希望本文對(duì)你們有用!

【編輯推薦】

  1. 用Linux上的cacti去監(jiān)控Windows服務(wù)器
  2. Cacti的數(shù)據(jù)備份與遷移
  3. CACTI基本設(shè)置之安全篇
  4. CACTI基本設(shè)置之測(cè)試SNMP服務(wù)
  5. CACTI基本設(shè)置之設(shè)置交換設(shè)備
  6. CACTI基本設(shè)置之設(shè)置Net-SNMP
責(zé)任編輯:趙鵬 來源: 網(wǎng)絡(luò)轉(zhuǎn)載
相關(guān)推薦

2011-04-02 16:38:49

Cactirrd

2011-03-31 15:23:39

Cactirrd

2011-04-06 08:54:28

CactiRRD

2010-03-01 16:31:59

Linux SNMP

2011-04-02 15:30:41

Cacti安裝

2010-06-09 16:55:04

2011-03-31 15:41:51

Cacti數(shù)據(jù)表結(jié)構(gòu)

2010-06-13 17:07:10

Cacti使用手冊(cè)

2010-05-31 17:38:55

Cacti使用手冊(cè)

2010-06-17 17:22:30

Cacti 監(jiān)控Lin

2011-03-24 14:05:17

Cacti監(jiān)控

2011-03-24 15:35:01

Cacti

2011-03-29 09:08:50

Linux

2011-03-29 16:30:06

cacti

2011-04-02 14:21:51

Cacti安裝

2011-03-31 10:41:37

Cacti架構(gòu)

2011-03-29 09:14:37

2011-03-25 09:00:34

Cacti

2010-05-26 15:43:45

cacti 監(jiān)控lin

2011-03-24 14:05:16

CACTI
點(diǎn)贊
收藏

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