Raspberry Pi に MRTG を入れてみる (1)

ちょっと MRTG の復習がてら Raspberry Pi に MRTG を入れてみたいと思います。

とりあえずパッケージを最新の状態に。

$ sudo apt-get update

ちなみに 2014-01-07-wheezy-raspbian が入っています。

$ sudo apt-get upgrade

Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages have been kept back:
  wolfram-engine
The following packages will be upgraded:
  curl dpkg dpkg-dev file libcurl3 libcurl3-gnutls libdpkg-perl libgnutls26 libmagic1 libxfont1 libyaml-0-2
  lsb-base python3-pifacedigital-scratch-handler tzdata udisks wget
16 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
Need to get 8,296 kB of archives.
After this operation, 570 kB of additional disk space will be used.
Do you want to continue [Y/n]?

インストール前後のパッケージのリストも取得しておきます。

$ sudo dpkg -l > ~/package_list_before_mrtg.txt

MRTG と SNMP のデーモンとクライアントを入れます。

$ sudo apt-get install snmpd snmp mrtg

Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  libio-socket-inet6-perl libperl5.14 libsensors4 libsnmp-base libsnmp-session-perl libsnmp15
  libsocket6-perl
Suggested packages:
  lm-sensors snmp-mibs-downloader mrtg-contrib
The following NEW packages will be installed:
  libio-socket-inet6-perl libperl5.14 libsensors4 libsnmp-base libsnmp-session-perl libsnmp15
  libsocket6-perl mrtg snmp snmpd
0 upgraded, 10 newly installed, 0 to remove and 1 not upgraded.
Need to get 5,863 kB of archives.
After this operation, 9,507 kB of additional disk space will be used.
Do you want to continue [Y/n]?

途中で "Make /etc/mrtg.cfg owned by and readable only by root?" とか聞かれるので "Yes" と答えておきます。

$ sudo dpkg -l > ~/package_list_after_mrtg.txt

インストール前後のパッケージの差分は次のような感じ。

$ cd
$ diff package_list_after_mrtg.txt package_list_before_mrtg.txt

292d291
< ii  libio-socket-inet6-perl 2.69-2           all   object interface for AF_INET6 domain sockets
357d355
< ii  libperl5.14             5.14.2-21+rpi2   armhf shared Perl library
403d400
< ii  libsensors4:armhf       1:3.3.2-2+deb7u1 armhf library to read temperature/voltage/fan sensors
413,416d409
< ii  libsnmp-base            5.4.3~dfsg-2.7   all   SNMP (Simple Network Management Protocol) MIBs and documentation
< ii  libsnmp-session-perl    1.13-1           all   Perl support for accessing SNMP-aware devices
< ii  libsnmp15               5.4.3~dfsg-2.7   armhf SNMP (Simple Network Management Protocol) library
< ii  libsocket6-perl         0.23-1           armhf Perl extensions for IPv6
549d541
< ii  mrtg                    2.17.4-2         armhf multi router traffic grapher
639,640d630
< ii  snmp                    5.4.3~dfsg-2.7   armhf SNMP (Simple Network Management Protocol) applications
< ii  snmpd                   5.4.3~dfsg-2.7   armhf SNMP (Simple Network Management Protocol) agents

なんか色々と入りました。

今回はここまで。

Google サイト内検索

Amazonアソシエイト