■RPMでは
/var/www/html/mrtg/
/usr/lib/mrtg2/
/etc/mrtg/
/usr/bin/mrtg, indexmaker, cfgmaker, rateup
# cfgmaker --output=mrtg.cfg public@www.example.local -- global="WorkDir:/var/www/mrtg" --global="Language:eucjp" --global="Op tions[_]: growright,bits" --base: Get Device Info on public@www.example.local: --base: Vendor Id: --base: Populating confcache --snpo: confcache public@www.example.local: Descr MS TCP Loopback interface --> 1 --snpo: confcache public@www.example.local: Descr Intel 8255x-based PCI Ethernet Adapter (10/100) --> 65539 --snpo: confcache public@www.example.local: Descr WAN (PPP/SLIP) Interface --> 1703940 --snpo: confcache public@www.example.local: Type 24 --> 1 --snpo: confcache public@www.example.local: Type 6 --> 65539 --snpo: confcache public@www.example.local: Type 23 --> 1703940 --snpo: confcache public@www.example.local: Ip 10.0.18.166 --> 1703940 --snpo: confcache public@www.example.local: Ip 127.0.0.1 --> 1 --snpo: confcache public@www.example.local: Ip 192.168.101.254 --> 65539 --snpo: confcache public@www.example.local: Eth --> 1 --snpo: confcache public@www.example.local: Eth 00-c0-9f-06-1d-70 --> 65539 --snpo: confcache public@www.example.local: Eth 00-53-45-00-00-00 --> 1703940 --base: Get Interface Info --base: Walking ifIndex --base: Walking ifType --base: Walking ifAdminStatus --base: Walking ifOperStatus --base: Walking ifSpeed --base: Writing ./mrtg.cfg■mrtgコマンド
# mrtg mrtg.cfgでよい。 cfgファイルの中のWorkDirの中にいろんなファイルが出来上がる。
[ホスト名]_[インターフェース名].html [ホスト名]_[インターフェース名]-[期間].png [ホスト名]_[インターフェース名].log [ホスト名]_[インターフェース名].oldとなっている。 最初の2回は必ずえらーが出ます。
【1回目】 pc-hoge:/etc/mrtg# mrtg mrtg.cfg Rateup WARNING: /usr/bin/rateup could not read the primary log file for www.example.local_65539 Rateup WARNING: /usr/bin/rateup The backup log file for www.example.local_65539 was invalid as well Rateup WARNING: /usr/bin/rateup Can't remove www.example.local_65539.old updating log file Rateup WARNING: /usr/bin/rateup Can't rename www.example.local_65539.log to www.example.local_65539.old updating log file Rateup WARNING: /usr/bin/rateup could not read the primary log file for www.example.local_1703940 Rateup WARNING: /usr/bin/rateup The backup log file for www.example.local_1703940 was invalid as well Rateup WARNING: /usr/bin/rateup Can't remove www.example.local_1703940.old updating log file Rateup WARNING: /usr/bin/rateup Can't rename www.example.local_1703940.log to www.example.local_1703940.old updating log file■indexmaker【2回目】
pc-hoge:/etc/mrtg# mrtg mrtg.cfg
Rateup WARNING: /usr/bin/rateup Can't remove www.example.local_65539.old updating log file
Rateup WARNING: /usr/bin/rateup Can't remove www.example.local_1703940.old updating log file
pc-hoge:/etc/mrtg# mrtg mrtg.cfg【3回目】
pc-hoge:/etc/mrtg#
# indexmaker \ --output="/var/www/mrtg/index.html" \ --columns=1 \ --title="Cisco 2514 cc-gw.example.local" \ /etc/mrtg/mrtg.cfg
