- ソース を表示
- MacOSX/HigiSierra/mrtg へ行く。
| 3: 2019-06-26 (水) 00:37:47 nobuaki |
現: 2020-08-11 (火) 01:14:11 nobuaki |
||
|---|---|---|---|
| Line 45: | Line 45: | ||
| "private"だとわかった. | "private"だとわかった. | ||
| cfgmakerコマンドを指定し,privateコミュニティの初期設定を行う. | cfgmakerコマンドを指定し,privateコミュニティの初期設定を行う. | ||
| + | |||
| $ cfgmaker private@localhost > mrtg.cfg🆑 | $ cfgmaker private@localhost > mrtg.cfg🆑 | ||
| Subroutine SNMP_Session::pack_sockaddr_in6 redefined at /System/Library/Perl/5.18/Exporter.pm | Subroutine SNMP_Session::pack_sockaddr_in6 redefined at /System/Library/Perl/5.18/Exporter.pm | ||
| Line 134: | Line 134: | ||
| --snpd: private@localhost: -> 12 -> ifSpeed = 100000000 | --snpd: private@localhost: -> 12 -> ifSpeed = 100000000 | ||
| $ | $ | ||
| + | |||
| 自動作成された設定ファイルを確認. | 自動作成された設定ファイルを確認. | ||
| + | |||
| $ cat mrtg.cfg🆑 | $ cat mrtg.cfg🆑 | ||
| # Created by | # Created by | ||
| # /usr/local/bin/cfgmaker private@localhost | # /usr/local/bin/cfgmaker private@localhost | ||
| - | + | ||
| + | |||
| ### Global Config Options | ### Global Config Options | ||
| + | |||
| # for UNIX | # for UNIX | ||
| # WorkDir: /home/http/mrtg | # WorkDir: /home/http/mrtg | ||
| + | |||
| # or for NT | # or for NT | ||
| # WorkDir: c:\mrtgdata | # WorkDir: c:\mrtgdata | ||
| + | |||
| ### Global Defaults | ### Global Defaults | ||
| + | |||
| # to get bits instead of bytes and graphs growing to the right | # to get bits instead of bytes and graphs growing to the right | ||
| # Options[_]: growright, bits | # Options[_]: growright, bits | ||
| + | |||
| EnableIPv6: no | EnableIPv6: no | ||
| + | |||
| ###################################################################### | ###################################################################### | ||
| # System: zeus.local | # System: zeus.local | ||
| Line 164: | Line 164: | ||
| # Location: BCP | # Location: BCP | ||
| ###################################################################### | ###################################################################### | ||
| - | + | ||
| + | |||
| ### Interface 1 >> Descr: 'lo0' | Name: 'lo0' | Ip: '127.0.0.1' | Eth: 'No Ethernet Id' ### | ### Interface 1 >> Descr: 'lo0' | Name: 'lo0' | Ip: '127.0.0.1' | Eth: 'No Ethernet Id' ### | ||
| ### The following interface is commented out because: | ### The following interface is commented out because: | ||
| Line 208: | Line 208: | ||
| # </table> | # </table> | ||
| # </div> | # </div> | ||
| - | + | ||
| + | |||
| ### Interface 2 >> Descr: 'gif0' | Name: 'gif0' | Ip: 'No Ip' | Eth: 'No Ethernet Id' ### | ### Interface 2 >> Descr: 'gif0' | Name: 'gif0' | Ip: 'No Ip' | Eth: 'No Ethernet Id' ### | ||
| ### The following interface is commented out because: | ### The following interface is commented out because: | ||
| Line 253: | Line 253: | ||
| # </table> | # </table> | ||
| # </div> | # </div> | ||
| - | + | ||
| + | |||
| ### Interface 3 >> Descr: 'stf0' | Name: 'stf0' | Ip: 'No Ip' | Eth: 'No Ethernet Id' ### | ### Interface 3 >> Descr: 'stf0' | Name: 'stf0' | Ip: 'No Ip' | Eth: 'No Ethernet Id' ### | ||
| ### The following interface is commented out because: | ### The following interface is commented out because: | ||
| Line 298: | Line 298: | ||
| # </table> | # </table> | ||
| # </div> | # </div> | ||
| - | + | ||
| + | |||
| ### Interface 4 >> Descr: 'EHC253' | Name: 'EHC253' | Ip: 'No Ip' | Eth: 'No Ethernet Id' ### | ### Interface 4 >> Descr: 'EHC253' | Name: 'EHC253' | Ip: 'No Ip' | Eth: 'No Ethernet Id' ### | ||
| ### The following interface is commented out because: | ### The following interface is commented out because: | ||
| Line 343: | Line 343: | ||
| # </table> | # </table> | ||
| # </div> | # </div> | ||
| - | + | ||
| + | |||
| ### Interface 5 >> Descr: 'EHC250' | Name: 'EHC250' | Ip: 'No Ip' | Eth: 'No Ethernet Id' ### | ### Interface 5 >> Descr: 'EHC250' | Name: 'EHC250' | Ip: 'No Ip' | Eth: 'No Ethernet Id' ### | ||
| ### The following interface is commented out because: | ### The following interface is commented out because: | ||
| Line 388: | Line 388: | ||
| # </table> | # </table> | ||
| # </div> | # </div> | ||
| - | + | ||
| + | |||
| ### Interface 6 >> Descr: 'en3' | Name: 'en3' | Ip: '192.168.100.10' | Eth: '00-6c-8f-44-8a-32' ### | ### Interface 6 >> Descr: 'en3' | Name: 'en3' | Ip: '192.168.100.10' | Eth: '00-6c-8f-44-8a-32' ### | ||
| + | |||
| Target[localhost_6]: 6:private@localhost: | Target[localhost_6]: 6:private@localhost: | ||
| SetEnv[localhost_6]: MRTG_INT_IP="192.168.100.10" MRTG_INT_DESCR="en3" | SetEnv[localhost_6]: MRTG_INT_IP="192.168.100.10" MRTG_INT_DESCR="en3" | ||
| Line 429: | Line 429: | ||
| </table> | </table> | ||
| </div> | </div> | ||
| - | + | ||
| + | |||
| ### Interface 7 >> Descr: 'en0' | Name: 'en0' | Ip: 'No Ip' | Eth: 'No Ethernet Id' ### | ### Interface 7 >> Descr: 'en0' | Name: 'en0' | Ip: 'No Ip' | Eth: 'No Ethernet Id' ### | ||
| ### The following interface is commented out because: | ### The following interface is commented out because: | ||
| Line 473: | Line 473: | ||
| # </table> | # </table> | ||
| # </div> | # </div> | ||
| - | + | ||
| + | |||
| ### Interface 8 >> Descr: 'p2p0' | Name: 'p2p0' | Ip: 'No Ip' | Eth: 'No Ethernet Id' ### | ### Interface 8 >> Descr: 'p2p0' | Name: 'p2p0' | Ip: 'No Ip' | Eth: 'No Ethernet Id' ### | ||
| ### The following interface is commented out because: | ### The following interface is commented out because: | ||
| Line 517: | Line 517: | ||
| # </table> | # </table> | ||
| # </div> | # </div> | ||
| - | + | ||
| + | |||
| ### Interface 9 >> Descr: 'en1' | Name: 'en1' | Ip: 'No Ip' | Eth: 'No Ethernet Id' ### | ### Interface 9 >> Descr: 'en1' | Name: 'en1' | Ip: 'No Ip' | Eth: 'No Ethernet Id' ### | ||
| ### The following interface is commented out because: | ### The following interface is commented out because: | ||
| Line 560: | Line 560: | ||
| # </table> | # </table> | ||
| # </div> | # </div> | ||
| - | + | ||
| + | |||
| ### Interface 10 >> Descr: 'bridge0' | Name: 'bridge0' | Ip: 'No Ip' | Eth: 'No Ethernet Id' ### | ### Interface 10 >> Descr: 'bridge0' | Name: 'bridge0' | Ip: 'No Ip' | Eth: 'No Ethernet Id' ### | ||
| ### The following interface is commented out because: | ### The following interface is commented out because: | ||
| Line 603: | Line 603: | ||
| # </table> | # </table> | ||
| # </div> | # </div> | ||
| - | + | ||
| + | |||
| ### Interface 11 >> Descr: 'utun0' | Name: 'utun0' | Ip: 'No Ip' | Eth: 'No Ethernet Id' ### | ### Interface 11 >> Descr: 'utun0' | Name: 'utun0' | Ip: 'No Ip' | Eth: 'No Ethernet Id' ### | ||
| ### The following interface is commented out because: | ### The following interface is commented out because: | ||
| Line 646: | Line 646: | ||
| # </table> | # </table> | ||
| # </div> | # </div> | ||
| - | + | ||
| + | |||
| ### Interface 12 >> Descr: 'ppp0' | Name: 'ppp0' | Ip: '192.168.20.231' | Eth: 'No Ethernet Id' ### | ### Interface 12 >> Descr: 'ppp0' | Name: 'ppp0' | Ip: '192.168.20.231' | Eth: 'No Ethernet Id' ### | ||
| + | |||
| Target[localhost_12]: 12:private@localhost: | Target[localhost_12]: 12:private@localhost: | ||
| SetEnv[localhost_12]: MRTG_INT_IP="192.168.20.231" MRTG_INT_DESCR="ppp0" | SetEnv[localhost_12]: MRTG_INT_IP="192.168.20.231" MRTG_INT_DESCR="ppp0" | ||
| Line 687: | Line 687: | ||
| </table> | </table> | ||
| </div> | </div> | ||
| - | + | ||
| + | |||
| $ | $ | ||
| Line 696: | Line 696: | ||
| $ cat mrtg.cfg🆑 | $ cat mrtg.cfg🆑 | ||
| ### Global Config Options | ### Global Config Options | ||
| + | |||
| # for UNIX | # for UNIX | ||
| WorkDir: /Users/ujpadmin/mrtg🈁 | WorkDir: /Users/ujpadmin/mrtg🈁 | ||
| - | + | ||
| + | |||
| ### Global Defaults | ### Global Defaults | ||
| + | |||
| # to get bits instead of bytes and graphs growing to the right | # to get bits instead of bytes and graphs growing to the right | ||
| Options[_]: growright, bits | Options[_]: growright, bits | ||
| + | |||
| EnableIPv6: no | EnableIPv6: no | ||
| + | |||
| ###################################################################### | ###################################################################### | ||
| # System: zeus.local | # System: zeus.local | ||
| Line 713: | Line 713: | ||
| # Location: BCP | # Location: BCP | ||
| ###################################################################### | ###################################################################### | ||
| + | |||
| ###################################################################### | ###################################################################### | ||
| #Thunderbolt LAN | #Thunderbolt LAN | ||
| ###################################################################### | ###################################################################### | ||
| ### Interface 6 >> Descr: 'en3' | Name: 'en3' | Ip: '192.168.100.10' | Eth: '00-6c-8f-44-8a-32' ### | ### Interface 6 >> Descr: 'en3' | Name: 'en3' | Ip: '192.168.100.10' | Eth: '00-6c-8f-44-8a-32' ### | ||
| + | |||
| Target[ThunderboltLAN]: 6:private@localhost: | Target[ThunderboltLAN]: 6:private@localhost: | ||
| SetEnv[ThunderboltLAN]: MRTG_INT_IP="192.168.100.10" MRTG_INT_DESCR="en3" | SetEnv[ThunderboltLAN]: MRTG_INT_IP="192.168.100.10" MRTG_INT_DESCR="en3" | ||
| Line 756: | Line 756: | ||
| </table> | </table> | ||
| </div> | </div> | ||
| + | |||
| ###################################################################### | ###################################################################### | ||
| #VPN | #VPN | ||
| ###################################################################### | ###################################################################### | ||
| ### Interface 12 >> Descr: 'ppp0' | Name: 'ppp0' | Ip: '192.168.20.231' | Eth: 'No Ethernet Id' ### | ### Interface 12 >> Descr: 'ppp0' | Name: 'ppp0' | Ip: '192.168.20.231' | Eth: 'No Ethernet Id' ### | ||
| + | |||
| Target[VPN]: 12:private@localhost: | Target[VPN]: 12:private@localhost: | ||
| SetEnv[VPN]: MRTG_INT_IP="192.168.20.231" MRTG_INT_DESCR="ppp0" | SetEnv[VPN]: MRTG_INT_IP="192.168.20.231" MRTG_INT_DESCR="ppp0" | ||
| Line 799: | Line 799: | ||
| </table> | </table> | ||
| </div> | </div> | ||
| - | + | ||
| + | |||
| $ | $ | ||
| これで問題ないと思う. | これで問題ないと思う. | ||
| Line 813: | Line 813: | ||
| variable LANG is set to UTF-8. Please run mrtg in an environment | variable LANG is set to UTF-8. Please run mrtg in an environment | ||
| where this is not the case. Try the following command to start: | where this is not the case. Try the following command to start: | ||
| + | |||
| env LANG=C /usr/local/bin/mrtg mrtg.cfg🈁 | env LANG=C /usr/local/bin/mrtg mrtg.cfg🈁 | ||
| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ||
| $ | $ | ||
| + | |||
| 環境変数がCである必要がある. | 環境変数がCである必要がある. | ||
| 指定して3回実行. | 指定して3回実行. | ||
| Line 934: | Line 934: | ||
| Usage: | Usage: | ||
| indexmaker [options] mrtg.cfg [other.cfg ...] | indexmaker [options] mrtg.cfg [other.cfg ...] | ||
| + | |||
| Options: | Options: | ||
| --output=filename set output filename (default: stdout) | --output=filename set output filename (default: stdout) | ||
| + | |||
| --filter title=~regexp select targets by matching regexp against titles | --filter title=~regexp select targets by matching regexp against titles | ||
| --filter pagetop=~regexp select targets by matching regexp against pagetop | --filter pagetop=~regexp select targets by matching regexp against pagetop | ||
| --filter name=~regexp select targets by matchin regexp against name | --filter name=~regexp select targets by matchin regexp against name | ||
| + | |||
| --addhead=text insert this text between </TITLE> and </HEAD> | --addhead=text insert this text between </TITLE> and </HEAD> | ||
| --title=text set title of generated index file | --title=text set title of generated index file | ||
| Line 951: | Line 951: | ||
| --pagetopend=text use this text for pagetop or pageend if undefined | --pagetopend=text use this text for pagetop or pageend if undefined | ||
| --nolegend do not add the Mrtg legend at the end of the page | --nolegend do not add the Mrtg legend at the end of the page | ||
| + | |||
| --columns=number show graphs in a table with x columns (default: 2) | --columns=number show graphs in a table with x columns (default: 2) | ||
| --perhost show graphs of the same host on a row | --perhost show graphs of the same host on a row | ||
| --compact try to make a vertically more compact page | --compact try to make a vertically more compact page | ||
| --optlog log the used command line in the page (default: log) | --optlog log the used command line in the page (default: log) | ||
| + | |||
| --sort=title sort graphs by title | --sort=title sort graphs by title | ||
| --sort=name sort graphs by their name | --sort=name sort graphs by their name | ||
| --sort=descr sort graphs by their description | --sort=descr sort graphs by their description | ||
| --sort=original leave as is (default) | --sort=original leave as is (default) | ||
| + | |||
| --enumerate add a sequence number to the title of each graph | --enumerate add a sequence number to the title of each graph | ||
| + | |||
| --picfirst place pictures before text (default: text first) | --picfirst place pictures before text (default: text first) | ||
| --width=number set width of graphs (default: not set) | --width=number set width of graphs (default: not set) | ||
| Line 970: | Line 970: | ||
| --bold use bold text (default: bold) | --bold use bold text (default: bold) | ||
| --clicktext make the text link to the inner page (like the image) | --clicktext make the text link to the inner page (like the image) | ||
| + | |||
| --show=day pick which graph to show in the index (default) | --show=day pick which graph to show in the index (default) | ||
| --show=week | --show=week | ||
| Line 976: | Line 976: | ||
| --show=year | --show=year | ||
| --show=none | --show=none | ||
| + | |||
| --section=h1 h1 tag from pagetop as section heading (default) | --section=h1 h1 tag from pagetop as section heading (default) | ||
| --section=title title as section headings for graphs | --section=title title as section headings for graphs | ||
| Line 984: | Line 984: | ||
| --section=portname port name entry in pagetop as section heading | --section=portname port name entry in pagetop as section heading | ||
| --sectionhost Try to prepend the host to the section heading if missing | --sectionhost Try to prepend the host to the section heading if missing | ||
| + | |||
| --rrdviewer=path path to rrdviewer (default: /cgi-bin/14all.cgi) | --rrdviewer=path path to rrdviewer (default: /cgi-bin/14all.cgi) | ||
| --icondir=path path to icondir | --icondir=path path to icondir | ||
| Line 990: | Line 990: | ||
| --headeradd=string add string to the html page header | --headeradd=string add string to the html page header | ||
| --autoprefix try to set prefix automatically | --autoprefix try to set prefix automatically | ||
| + | |||
| --<opt>-file=file read string argument for option <opt> from file | --<opt>-file=file read string argument for option <opt> from file | ||
| + | |||
| $ | $ | ||
| 今回は,パラメータを指定せずに,デフォルトで実行. | 今回は,パラメータを指定せずに,デフォルトで実行. | ||
| Line 1002: | Line 1002: | ||
| $ | $ | ||
| あとは,作成されたHTMLをWebブラウザで表示させる. | あとは,作成されたHTMLをWebブラウザで表示させる. | ||
| + | |||
| + | **番外 [#cd02c172] | ||
| + | |||
| + | こんなエラーがでるとき. | ||
| + | |||
| + | $ mrtg mrtg.cfg | ||
| + | Subroutine SNMP_Session::pack_sockaddr_in6 redefined at /System/Library/Perl/5.18/Exporter.pm line 66. | ||
| + | at /usr/local/bin/../lib/mrtg2/SNMP_Session.pm line 149. | ||
| + | Subroutine SNMPv1_Session::pack_sockaddr_in6 redefined at /System/Library/Perl/5.18/Exporter.pm line 66. | ||
| + | at /usr/local/bin/../lib/mrtg2/SNMP_Session.pm line 604. | ||
| + | 2020-08-11 00:55:54, Rateup WARNING: /usr/local/bin/rateup could not read the primary log file for gaia_lan | ||
| + | 2020-08-11 00:55:54, Rateup WARNING: /usr/local/bin/rateup The backup log file for gaia_lan was invalid as well | ||
| + | 2020-08-11 00:55:54, Rateup WARNING: /usr/local/bin/rateup Can't rename gaia_lan.log to gaia_lan.old updating log file | ||
| + | $ | ||
| + | |||
| + | vi /usr/bin/mrtgで開いて,次のように書き換える. | ||
| + | |||
| + | 変更前:import Socket6 | ||
| + | 変更後:Socket6->import(qw(inet_pton getaddrinfo)); | ||
| + | |||
| + | 次に,vi /usr/local/bin/../lib/mrtg2/SNMP_Session.pm で | ||
| + | |||
| + | 変更前:if (eval {local $SIG{__DIE__};require Socket6;} && | ||
| + | 変更後:if (eval {local $SIG{__DIE__};Socket6->import(qw(inet_pton getaddrinfo));} && | ||
| + | |||
| + | 原因は,Perlのバージョンアップとのこと. | ||
- MacOSX/HigiSierra/mrtg のバックアップ一覧
- MacOSX/HigiSierra/mrtg のバックアップ差分(No. All)
- 1: 2019-05-29 (水) 18:36:04 nobuaki
- 2: 2019-05-29 (水) 18:40:39 nobuaki
- 3: 2019-06-26 (水) 00:37:47 nobuaki
- 現: 2020-08-11 (火) 01:14:11 nobuaki
Counter: 1625,
today: 2,
yesterday: 1

