MRTGのインストール
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
]
開始行:
* MRTG のインストール [#n31a2556]
** MRTGとは [#j34ca75e]
ネットワークの回線負荷や、サーバのCPU利用率などを、モニタ...
*** 参考サイト [#hdcc432f]
- [[MRTG本家サイト:http://www.mrtg.jp/doc/]]
- [[MRTGによるネットワーク監視:http://www.iin.gr.jp/~taka...
- [[MRTGによるサーバー監視をしよう:http://ymty.ameblo.jp/...
- [[MRTG-2.9.25 インストールエラー:http://search.luky.org...
** ファイルのダウンロード [#wc3935ef]
[[MRTG本家サイト:http://www.mrtg.jp/doc/]] より、Unix版を...
** インストール [#xd4c6c46]
アーカイブを展開して、configure を実行する。VFライブラリ...
[bokupi@pokota mrtg-2.12.2]$ export LDFLAGS=-lVFlib2
[bokupi@pokota mrtg-2.12.2]$ ./configure --prefix=/usr/l...
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking how to run the C preprocessor... gcc -E
checking whether make sets $(MAKE)... yes
checking for a BSD-compatible install... /usr/bin/instal...
checking for perl... /usr/local/bin/perl
checking for groff... /usr/bin/groff
checking for egrep... grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for inttypes.h... (cached) yes
checking for unsigned long long... yes
checking for long long... yes
checking for strtoll... yes
checking for printf long long format specifier... %lld
checking for pow in -lm... yes
checking for gdImageGif in -lgd... no
checking for gdImagePng in -lgd... yes
checking for gdImagePng_jpg in -lgd... no
checking for gdImagePng_jpg_ft in -lgd... no
checking for gdImageGd in -lgd... yes
checking gd.h usability... yes
checking gd.h presence... yes
checking for gd.h... yes
checking the weather... (cached) it's fine
checking if we can use GCC-specific compiler options... ...
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
ordering CD from http://people.ee.ethz.ch/~oetiker/wish ...
--------------------------------------------------------...
Config is DONE!
Type 'make' to compile the software
... that wishlist mentioned above does really exi...
you feel like showing your appreciation for MRTG, this i...
place to go. I just love CDs and DVDs
-- Tobi Oetiker <oetiker@ee....
--------------------------------------------------------...
make を実行する。
[bokupi@pokota mrtg-2.12.2]$ make
LD_RUN_PATH= gcc bin/rateup.o -o bin/rateup -lVFlib2 -W...
z -Wl,-Bdynamic -lm
/usr/local/bin/perl -0777 -p -i~ -e 's@^#!\s*/\S*perl@#!...
/bin/cfgmaker ./bin/indexmaker ./bin/mrtg
/usr/local/bin/perl -0777 -p -i~ -e 's@GRAPHFMT="...";@G...
rtg ./bin/indexmaker
もし、LDFLAGS を指定しないと、下記のようにリンクエラーが...
[root@pokota mrtg-2.12.2]# make
LD_RUN_PATH= gcc bin/rateup.o -o bin/rateup -Wl,-Bstat...
dynamic -lm
/usr/lib/libgd.a(gd.o): In function `gdImageKanjiChar':
gd.o(.text+0x1448): undefined reference to `VF_Init'
gd.o(.text+0x146e): undefined reference to `VF_OpenFont'
gd.o(.text+0x14de): undefined reference to `VF_GetBitmap'
gd.o(.text+0x1590): undefined reference to `VF_CloseFont'
gd.o(.text+0x1595): undefined reference to `VF_Deinit'
/usr/lib/libgd.a(gd.o): In function `gdImageKanjiCharUp':
gd.o(.text+0x16b8): undefined reference to `VF_Init'
gd.o(.text+0x16de): undefined reference to `VF_OpenFont'
gd.o(.text+0x174e): undefined reference to `VF_GetBitmap'
gd.o(.text+0x180f): undefined reference to `VF_CloseFont'
gd.o(.text+0x1814): undefined reference to `VF_Deinit'
collect2: ld returned 1 exit status
make: *** [bin/rateup] エラー 1
インストールを実行する。
[root@pokota mrtg-2.12.2]# make install
/bin/sh ./mkinstalldirs /usr/local/mrtg-2/bin
mkdir /usr/local/mrtg-2
mkdir /usr/local/mrtg-2/bin
for x in ./bin/mrtg ./bin/cfgmaker ./bin/indexmaker; do \
/usr/bin/install -c -m 755 $x /usr/local/mrtg-2/bin; d...
for x in bin/rateup; do \
/usr/bin/install -c -m 755 $x /usr/local/mrtg-2/bin; d...
/bin/sh ./mkinstalldirs /usr/local/mrtg-2/lib/mrtg2/Pod
mkdir /usr/local/mrtg-2/lib
mkdir /usr/local/mrtg-2/lib/mrtg2
mkdir /usr/local/mrtg-2/lib/mrtg2/Pod
for x in ./lib/mrtg2/*.pm; do \
/usr/bin/install -c -m 644 $x /usr/local/mrtg-2/lib/mr...
for x in ./lib/mrtg2/Pod/*.pm; do \
/usr/bin/install -c -m 644 $x /usr/local/mrtg-2/lib/mr...
/bin/sh ./mkinstalldirs /usr/local/mrtg-2/share/mrtg2/ic...
mkdir /usr/local/mrtg-2/share
mkdir /usr/local/mrtg-2/share/mrtg2
mkdir /usr/local/mrtg-2/share/mrtg2/icons
for x in ./images/*.gif ./images/*.png; do \
/usr/bin/install -c -m 644 $x /usr/local/mrtg-2/share/...
/bin/sh ./mkinstalldirs /usr/local/mrtg-2/share/doc/mrtg2
mkdir /usr/local/mrtg-2/share/doc
mkdir /usr/local/mrtg-2/share/doc/mrtg2
(cd .; for x in COPYING COPYRIGHT README CHANGES THANKS ...
/*.wml doc/*.txt doc/*.png; do \
/usr/bin/install -c -m 644 $x /usr/local/mrtg-2/share/...
/bin/sh ./mkinstalldirs /usr/local/mrtg-2/man/man1
mkdir /usr/local/mrtg-2/man
mkdir /usr/local/mrtg-2/man/man1
for x in ./doc/*.1; do \
/usr/bin/install -c -m 644 $x /usr/local/mrtg-2/man/ma...
** 設定 [#s78885e8]
*** トラフィック帯域の監視 [#l4d36d24]
設定ファイルを作成する。cfgmaker コマンドを使って、テンプ...
[root@pokota conf]# /usr/local/mrtg-2/bin/cfgmaker priva...
l/mrtg-2/conf/traffic.cfg
--base: Get Device Info on private@localhost:
--base: Vendor Id:
--base: Populating confcache
--coca: populate confcache private@localhost:
--coca: store in confcache private@localhost_ Descr lo -...
--coca: store in confcache private@localhost_ Descr dumm...
--coca: store in confcache private@localhost_ Descr bond...
--coca: store in confcache private@localhost_ Descr eql ...
--coca: store in confcache private@localhost_ Descr eth0...
--coca: store in confcache private@localhost_ Type 24 --...
--coca: store in confcache private@localhost_ Type 6 --> 2
--coca: store in confcache private@localhost_ Type 6 -->...
--coca: store in confcache private@localhost_ Type 28 --...
--coca: store in confcache private@localhost_ Type 6 -->...
--coca: store in confcache private@localhost_ Ip 127.0.0...
--coca: store in confcache private@localhost_ Ip 192.168...
--coca: store in confcache private@localhost_ Eth --> 1
--coca: store in confcache private@localhost_ Eth --> 2...
--coca: store in confcache private@localhost_ Eth --> 3...
--coca: store in confcache private@localhost_ Eth --> 4...
--coca: store in confcache private@localhost_ Eth 00-02-...
--base: Get Interface Info
--base: Walking ifIndex
--base: Walking ifType
--base: Walking ifAdminStatus
--base: Walking ifOperStatus
--base: Walking ifMtu
--base: Walking ifSpeed
設定ファイル traffic.cfg のWorkDir を、適宜変更する。また...
# Created by
# /usr/local/mrtg-2/bin/cfgmaker private@localhost
### Global Config Options
# for UNIX
WorkDir: /home/httpd/status
# or for NT
# WorkDir: c:\mrtgdata
### Global Defaults
# to get bits instead of bytes and graphs growing to th...
Options[_]: growright, bits
Language: eucjp
(以下略)
今回は、httpd 配下に status というディレクトリを作成し、...
[root@pokota mrtg-2]# ./bin/mrtg ./conf/traffic.cfg
Rateup WARNING: /usr/local/mrtg-2/bin/rateup could not r...
for localhost_5
Rateup WARNING: /usr/local/mrtg-2/bin/rateup The backup ...
was invalid as well
Rateup WARNING: /usr/local/mrtg-2/bin/rateup Can't remov...
ng log file
Rateup WARNING: /usr/local/mrtg-2/bin/rateup Can't renam...
alhost_5.old updating log file
[root@pokota mrtg-2]# ./bin/mrtg ./conf/traffic.cfg
Rateup WARNING: /usr/local/mrtg-2/bin/rateup Can't remov...
ng log file
[root@pokota mrtg-2]# ./bin/mrtg ./conf/traffic.cfg
[root@pokota mrtg-2]#
3回起動すると、警告が表示されなくなる。これは、過去ログが...
*** その他の監視 [#v5b3fe4c]
CPU使用率、メモリ使用率、ディスク使用率の監視については、...
** cron に登録 [#k0aa0154]
これらの監視は、当然連続的に行なわなくては意味がないので...
0,5,10,15,20,25,30,35,40,45,50,55 * * * * root /usr/loca...
ocal/mrtg-2/conf/traffic.cfg
その後は、設定ファイルに指定した WorkDir に相当する場所を...
[[omoshiro-joho.com の通信負荷状況:http://omoshiro-joho.c...
----
** 履歴 [#lbc65066]
- 2005年7月3日 初版
終了行:
* MRTG のインストール [#n31a2556]
** MRTGとは [#j34ca75e]
ネットワークの回線負荷や、サーバのCPU利用率などを、モニタ...
*** 参考サイト [#hdcc432f]
- [[MRTG本家サイト:http://www.mrtg.jp/doc/]]
- [[MRTGによるネットワーク監視:http://www.iin.gr.jp/~taka...
- [[MRTGによるサーバー監視をしよう:http://ymty.ameblo.jp/...
- [[MRTG-2.9.25 インストールエラー:http://search.luky.org...
** ファイルのダウンロード [#wc3935ef]
[[MRTG本家サイト:http://www.mrtg.jp/doc/]] より、Unix版を...
** インストール [#xd4c6c46]
アーカイブを展開して、configure を実行する。VFライブラリ...
[bokupi@pokota mrtg-2.12.2]$ export LDFLAGS=-lVFlib2
[bokupi@pokota mrtg-2.12.2]$ ./configure --prefix=/usr/l...
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking how to run the C preprocessor... gcc -E
checking whether make sets $(MAKE)... yes
checking for a BSD-compatible install... /usr/bin/instal...
checking for perl... /usr/local/bin/perl
checking for groff... /usr/bin/groff
checking for egrep... grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for inttypes.h... (cached) yes
checking for unsigned long long... yes
checking for long long... yes
checking for strtoll... yes
checking for printf long long format specifier... %lld
checking for pow in -lm... yes
checking for gdImageGif in -lgd... no
checking for gdImagePng in -lgd... yes
checking for gdImagePng_jpg in -lgd... no
checking for gdImagePng_jpg_ft in -lgd... no
checking for gdImageGd in -lgd... yes
checking gd.h usability... yes
checking gd.h presence... yes
checking for gd.h... yes
checking the weather... (cached) it's fine
checking if we can use GCC-specific compiler options... ...
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
ordering CD from http://people.ee.ethz.ch/~oetiker/wish ...
--------------------------------------------------------...
Config is DONE!
Type 'make' to compile the software
... that wishlist mentioned above does really exi...
you feel like showing your appreciation for MRTG, this i...
place to go. I just love CDs and DVDs
-- Tobi Oetiker <oetiker@ee....
--------------------------------------------------------...
make を実行する。
[bokupi@pokota mrtg-2.12.2]$ make
LD_RUN_PATH= gcc bin/rateup.o -o bin/rateup -lVFlib2 -W...
z -Wl,-Bdynamic -lm
/usr/local/bin/perl -0777 -p -i~ -e 's@^#!\s*/\S*perl@#!...
/bin/cfgmaker ./bin/indexmaker ./bin/mrtg
/usr/local/bin/perl -0777 -p -i~ -e 's@GRAPHFMT="...";@G...
rtg ./bin/indexmaker
もし、LDFLAGS を指定しないと、下記のようにリンクエラーが...
[root@pokota mrtg-2.12.2]# make
LD_RUN_PATH= gcc bin/rateup.o -o bin/rateup -Wl,-Bstat...
dynamic -lm
/usr/lib/libgd.a(gd.o): In function `gdImageKanjiChar':
gd.o(.text+0x1448): undefined reference to `VF_Init'
gd.o(.text+0x146e): undefined reference to `VF_OpenFont'
gd.o(.text+0x14de): undefined reference to `VF_GetBitmap'
gd.o(.text+0x1590): undefined reference to `VF_CloseFont'
gd.o(.text+0x1595): undefined reference to `VF_Deinit'
/usr/lib/libgd.a(gd.o): In function `gdImageKanjiCharUp':
gd.o(.text+0x16b8): undefined reference to `VF_Init'
gd.o(.text+0x16de): undefined reference to `VF_OpenFont'
gd.o(.text+0x174e): undefined reference to `VF_GetBitmap'
gd.o(.text+0x180f): undefined reference to `VF_CloseFont'
gd.o(.text+0x1814): undefined reference to `VF_Deinit'
collect2: ld returned 1 exit status
make: *** [bin/rateup] エラー 1
インストールを実行する。
[root@pokota mrtg-2.12.2]# make install
/bin/sh ./mkinstalldirs /usr/local/mrtg-2/bin
mkdir /usr/local/mrtg-2
mkdir /usr/local/mrtg-2/bin
for x in ./bin/mrtg ./bin/cfgmaker ./bin/indexmaker; do \
/usr/bin/install -c -m 755 $x /usr/local/mrtg-2/bin; d...
for x in bin/rateup; do \
/usr/bin/install -c -m 755 $x /usr/local/mrtg-2/bin; d...
/bin/sh ./mkinstalldirs /usr/local/mrtg-2/lib/mrtg2/Pod
mkdir /usr/local/mrtg-2/lib
mkdir /usr/local/mrtg-2/lib/mrtg2
mkdir /usr/local/mrtg-2/lib/mrtg2/Pod
for x in ./lib/mrtg2/*.pm; do \
/usr/bin/install -c -m 644 $x /usr/local/mrtg-2/lib/mr...
for x in ./lib/mrtg2/Pod/*.pm; do \
/usr/bin/install -c -m 644 $x /usr/local/mrtg-2/lib/mr...
/bin/sh ./mkinstalldirs /usr/local/mrtg-2/share/mrtg2/ic...
mkdir /usr/local/mrtg-2/share
mkdir /usr/local/mrtg-2/share/mrtg2
mkdir /usr/local/mrtg-2/share/mrtg2/icons
for x in ./images/*.gif ./images/*.png; do \
/usr/bin/install -c -m 644 $x /usr/local/mrtg-2/share/...
/bin/sh ./mkinstalldirs /usr/local/mrtg-2/share/doc/mrtg2
mkdir /usr/local/mrtg-2/share/doc
mkdir /usr/local/mrtg-2/share/doc/mrtg2
(cd .; for x in COPYING COPYRIGHT README CHANGES THANKS ...
/*.wml doc/*.txt doc/*.png; do \
/usr/bin/install -c -m 644 $x /usr/local/mrtg-2/share/...
/bin/sh ./mkinstalldirs /usr/local/mrtg-2/man/man1
mkdir /usr/local/mrtg-2/man
mkdir /usr/local/mrtg-2/man/man1
for x in ./doc/*.1; do \
/usr/bin/install -c -m 644 $x /usr/local/mrtg-2/man/ma...
** 設定 [#s78885e8]
*** トラフィック帯域の監視 [#l4d36d24]
設定ファイルを作成する。cfgmaker コマンドを使って、テンプ...
[root@pokota conf]# /usr/local/mrtg-2/bin/cfgmaker priva...
l/mrtg-2/conf/traffic.cfg
--base: Get Device Info on private@localhost:
--base: Vendor Id:
--base: Populating confcache
--coca: populate confcache private@localhost:
--coca: store in confcache private@localhost_ Descr lo -...
--coca: store in confcache private@localhost_ Descr dumm...
--coca: store in confcache private@localhost_ Descr bond...
--coca: store in confcache private@localhost_ Descr eql ...
--coca: store in confcache private@localhost_ Descr eth0...
--coca: store in confcache private@localhost_ Type 24 --...
--coca: store in confcache private@localhost_ Type 6 --> 2
--coca: store in confcache private@localhost_ Type 6 -->...
--coca: store in confcache private@localhost_ Type 28 --...
--coca: store in confcache private@localhost_ Type 6 -->...
--coca: store in confcache private@localhost_ Ip 127.0.0...
--coca: store in confcache private@localhost_ Ip 192.168...
--coca: store in confcache private@localhost_ Eth --> 1
--coca: store in confcache private@localhost_ Eth --> 2...
--coca: store in confcache private@localhost_ Eth --> 3...
--coca: store in confcache private@localhost_ Eth --> 4...
--coca: store in confcache private@localhost_ Eth 00-02-...
--base: Get Interface Info
--base: Walking ifIndex
--base: Walking ifType
--base: Walking ifAdminStatus
--base: Walking ifOperStatus
--base: Walking ifMtu
--base: Walking ifSpeed
設定ファイル traffic.cfg のWorkDir を、適宜変更する。また...
# Created by
# /usr/local/mrtg-2/bin/cfgmaker private@localhost
### Global Config Options
# for UNIX
WorkDir: /home/httpd/status
# or for NT
# WorkDir: c:\mrtgdata
### Global Defaults
# to get bits instead of bytes and graphs growing to th...
Options[_]: growright, bits
Language: eucjp
(以下略)
今回は、httpd 配下に status というディレクトリを作成し、...
[root@pokota mrtg-2]# ./bin/mrtg ./conf/traffic.cfg
Rateup WARNING: /usr/local/mrtg-2/bin/rateup could not r...
for localhost_5
Rateup WARNING: /usr/local/mrtg-2/bin/rateup The backup ...
was invalid as well
Rateup WARNING: /usr/local/mrtg-2/bin/rateup Can't remov...
ng log file
Rateup WARNING: /usr/local/mrtg-2/bin/rateup Can't renam...
alhost_5.old updating log file
[root@pokota mrtg-2]# ./bin/mrtg ./conf/traffic.cfg
Rateup WARNING: /usr/local/mrtg-2/bin/rateup Can't remov...
ng log file
[root@pokota mrtg-2]# ./bin/mrtg ./conf/traffic.cfg
[root@pokota mrtg-2]#
3回起動すると、警告が表示されなくなる。これは、過去ログが...
*** その他の監視 [#v5b3fe4c]
CPU使用率、メモリ使用率、ディスク使用率の監視については、...
** cron に登録 [#k0aa0154]
これらの監視は、当然連続的に行なわなくては意味がないので...
0,5,10,15,20,25,30,35,40,45,50,55 * * * * root /usr/loca...
ocal/mrtg-2/conf/traffic.cfg
その後は、設定ファイルに指定した WorkDir に相当する場所を...
[[omoshiro-joho.com の通信負荷状況:http://omoshiro-joho.c...
----
** 履歴 [#lbc65066]
- 2005年7月3日 初版
ページ名: