http://www.running-dog.net/unix/cat20/

bsnmpd

net-mgmt/bsnmp-ucd もインストール

PCBSD# /usr/local/bin/cfgmaker public@localhost > /usr/local/etc/mrtg/mrtg.cfg
--base: Get Device Info on public@localhost:
--base: Vendor Id: Unknown Vendor - 1.3.6.1.4.1.12325.1.1.2.1.1
--base: Populating confcache
--base: Get Interface Info
--base: Walking ifIndex
--snpd:   public@localhost: -> 1 -> ifIndex = 1
--snpd:   public@localhost: -> 2 -> ifIndex = 2
--snpd:   public@localhost: -> 3 -> ifIndex = 3
--snpd:   public@localhost: -> 4 -> ifIndex = 4
--snpd:   public@localhost: -> 5 -> ifIndex = 5
--snpd:   public@localhost: -> 6 -> ifIndex = 6
--snpd:   public@localhost: -> 7 -> ifIndex = 7
--base: Walking ifType
--snpd:   public@localhost: -> 1 -> ifType = 6
--snpd:   public@localhost: -> 2 -> ifType = 160
--snpd:   public@localhost: -> 3 -> ifType = 160
--snpd:   public@localhost: -> 4 -> ifType = 6
--snpd:   public@localhost: -> 5 -> ifType = 144
--snpd:   public@localhost: -> 6 -> ifType = 6
--snpd:   public@localhost: -> 7 -> ifType = 24
--base: Walking ifAdminStatus
--snpd:   public@localhost: -> 1 -> ifAdminStatus = 1
--snpd:   public@localhost: -> 2 -> ifAdminStatus = 1
--snpd:   public@localhost: -> 3 -> ifAdminStatus = 1
--snpd:   public@localhost: -> 4 -> ifAdminStatus = 2
--snpd:   public@localhost: -> 5 -> ifAdminStatus = 2
--snpd:   public@localhost: -> 6 -> ifAdminStatus = 2
--snpd:   public@localhost: -> 7 -> ifAdminStatus = 1
--base: Walking ifOperStatus
--snpd:   public@localhost: -> 1 -> ifOperStatus = 1
--snpd:   public@localhost: -> 2 -> ifOperStatus = 2
--snpd:   public@localhost: -> 3 -> ifOperStatus = 2
--snpd:   public@localhost: -> 4 -> ifOperStatus = 2
--snpd:   public@localhost: -> 5 -> ifOperStatus = 2
--snpd:   public@localhost: -> 6 -> ifOperStatus = 2
--snpd:   public@localhost: -> 7 -> ifOperStatus = 5
--base: Walking ifMtu
--snpd:   public@localhost: -> 1 -> ifMtu = 1500
--snpd:   public@localhost: -> 2 -> ifMtu = 0
--snpd:   public@localhost: -> 3 -> ifMtu = 0
--snpd:   public@localhost: -> 4 -> ifMtu = 1500
--snpd:   public@localhost: -> 5 -> ifMtu = 1500
--snpd:   public@localhost: -> 6 -> ifMtu = 1500
--snpd:   public@localhost: -> 7 -> ifMtu = 16384
--base: Walking ifSpeed
--snpd:   public@localhost: -> 1 -> ifSpeed = 1000000000
--snpd:   public@localhost: -> 2 -> ifSpeed = 0
--snpd:   public@localhost: -> 3 -> ifSpeed = 0
--snpd:   public@localhost: -> 4 -> ifSpeed = 10000000
--snpd:   public@localhost: -> 5 -> ifSpeed = 0
--snpd:   public@localhost: -> 6 -> ifSpeed = 0
--snpd:   public@localhost: -> 7 -> ifSpeed = 0

MRTG

http://weblet.jp/2007/07/mrtg-%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB/

PCBSD# indexmaker /usr/local/etc/mrtg/mrtg.cfg > /usr/local/www/apache22/data/MRTG/index.html
ERROR: "WorkDir" not specified in mrtg config file

/usr/local/etc/mrtg/mrtg.cfg

# WorkDir: /home/http/mrtg
WorkDir: /usr/local/www/apache22/data/MRTG/
PCBSD# indexmaker /usr/local/etc/mrtg/mrtg.cfg > /usr/local/www/apache22/data/MRTG/index.html
PCBSD# mrtg /usr/local/etc/mrtg/mrtg.cfg
2012-08-03 09:34:19, Rateup WARNING: /usr/local/bin/rateup could not read the  primary log file for localhost_1
2012-08-03 09:34:19, Rateup WARNING: /usr/local/bin/rateup The backup log file for localhost_1 was invalid as well
2012-08-03 09:34:19, Rateup WARNING: /usr/local/bin/rateup Can't rename localhost_1.log to localhost_1.old updating log file
PCBSD# mrtg /usr/local/etc/mrtg/mrtg.cfg
PCBSD# top
PCBSD# cd /usr/local/www/apache22/data
 total 3
 drwxr-xr-x  2 root  wheel  13 Aug  3 09:34 MRTG
 -rw-r--r--  1 root  wheel  44 Nov 21  2004 index.html
PCBSD# chown -R mrtg MRTG
PCBSD# ll
 total 3
 drwxr-xr-x  2 mrtg  wheel  13 Aug  3 09:34 MRTG
 -rw-r--r--  1 root  wheel  44 Nov 21  2004 index.html

/etc/snmpd.config

# bsnmp-ucd (8)
begemotSnmpdModulePath."ucd" = "/usr/local/lib/snmp_ucd.so"
%ucd
memMinimumSwap = 1600
memSwapErrorMsg = "No free swap!"

daemon の再起動

%% /usr/local/etc/rc.d/mrtg_daemon restart %%
/etc/rc.d/bsnmpd start

トップ   編集 凍結 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2012-08-03 (金) 15:14:20