{"id":740,"date":"2013-05-06T20:13:58","date_gmt":"2013-05-07T00:13:58","guid":{"rendered":"http:\/\/blog.alanporter.com\/?p=740"},"modified":"2013-05-06T20:13:58","modified_gmt":"2013-05-07T00:13:58","slug":"mrtg-on-wheezy","status":"publish","type":"post","link":"https:\/\/alanporter.com\/blog\/2013\/05\/06\/mrtg-on-wheezy\/","title":{"rendered":"mrtg on Wheezy"},"content":{"rendered":"<p>I just upgraded my home server (a &#8220;<a href=\"\/blog\/2008-12-18\/fit-pc\">Fit PC 1.0<\/a>&#8220;) to <strong>Debian 7.0 &#8220;Wheezy&#8221;<\/strong>. \u00a0Most of it went smoothly, but there were a few small snags.<\/p>\n<p>I use a package called &#8220;mrtg&#8221; to create nice graphs of my network usage. \u00a0See the pretty picture below.<\/p>\n<p><a href=\"\/blog\/wp-content\/uploads\/2013\/05\/mrtg-graph.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-741\" alt=\"mrtg-graph\" src=\"\/blog\/wp-content\/uploads\/2013\/05\/mrtg-graph-300x121.png\" width=\"300\" height=\"121\" \/><\/a><\/p>\n<p>However, after the upgrade from Debian 6.0 &#8220;Squeeze&#8221; to 7.0 &#8220;Wheezy&#8221;, mrtg was reporting errors:<\/p>\n<pre>\nSubroutine SNMP_Session::pack_sockaddr_in6 redefined at \/usr\/share\/perl\/5.14\/Exporter.pm line 67.\nat \/usr\/share\/perl5\/SNMP_Session.pm line 149\nSubroutine SNMP_Session::unpack_sockaddr_in6 redefined at \/usr\/share\/perl\/5.14\/Exporter.pm line 67.\nat \/usr\/share\/perl5\/SNMP_Session.pm line 149\nSubroutine SNMP_Session::sockaddr_in6 redefined at \/usr\/share\/perl\/5.14\/Exporter.pm line 67.\nat \/usr\/share\/perl5\/SNMP_Session.pm line 149\nSubroutine SNMPv1_Session::pack_sockaddr_in6 redefined at \/usr\/share\/perl\/5.14\/Exporter.pm line 67.\nat \/usr\/share\/perl5\/SNMP_Session.pm line 608\nSubroutine SNMPv1_Session::unpack_sockaddr_in6 redefined at \/usr\/share\/perl\/5.14\/Exporter.pm line 67.\nat \/usr\/share\/perl5\/SNMP_Session.pm line 608\nSubroutine SNMPv1_Session::sockaddr_in6 redefined at \/usr\/share\/perl\/5.14\/Exporter.pm line 67.\nat \/usr\/share\/perl5\/SNMP_Session.pm line 608\nSubroutine SNMP_Session::pack_sockaddr_in6 redefined at \/usr\/share\/perl\/5.14\/Exporter.pm line 67.\n<\/pre>\n<p>I am not sure what caused this problem, but I found a solution on a <a href=\"http:\/\/www.raspberrypi.org\/phpBB3\/viewtopic.php?f=36&amp;t=13044\">Raspberry Pi discussion board<\/a>.<\/p>\n<p>Simply patch this one <strong>SNMP_Session.pm<\/strong> file like this:<\/p>\n<pre>\n--- SNMP_Session.pm.orig   2011-06-01 15:48:06.000000000 +0200\n+++ SNMP_Session.pm   2011-06-01 15:56:19.000000000 +0200\n@@ -146,7 +146,7 @@\n\n     if (eval {local $SIG{__DIE__};require Socket6;} &&\n        eval {local $SIG{__DIE__};require IO::Socket::INET6; IO::Socket::INET6->VERSION(\"1.26\");}) {\n-   import Socket6;\n+   Socket6->import(qw(inet_pton getaddrinfo));\n    $ipv6_addr_len = length(pack_sockaddr_in6(161, inet_pton(AF_INET6(), \"::1\")));\n    $SNMP_Session::ipv6available = 1;\n     }\n@@ -605,7 +605,7 @@\n BEGIN {\n     if($SNMP_Session::ipv6available) {\n    import IO::Socket::INET6;\n-   import Socket6;\n+   Socket6->import(qw(inet_pton getaddrinfo));\n     }\n }\n<\/pre>\n<p>This quick fix worked for me. Let&#8217;s hope it gets included in the upstream package, <strong>libsnmp-session-perl<\/strong>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I just upgraded my home server (a &#8220;Fit PC 1.0&#8220;) to Debian 7.0 &#8220;Wheezy&#8221;. \u00a0Most of it went smoothly, but there were a few small snags. I use a package called &#8220;mrtg&#8221; to create nice graphs of my network usage. \u00a0See the pretty picture below. However, after the upgrade from Debian 6.0 &#8220;Squeeze&#8221; to 7.0 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-740","post","type-post","status-publish","format-standard","hentry","category-software","count-0","even alt","author-alan","last"],"_links":{"self":[{"href":"https:\/\/alanporter.com\/blog\/wp-json\/wp\/v2\/posts\/740","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/alanporter.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/alanporter.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/alanporter.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/alanporter.com\/blog\/wp-json\/wp\/v2\/comments?post=740"}],"version-history":[{"count":0,"href":"https:\/\/alanporter.com\/blog\/wp-json\/wp\/v2\/posts\/740\/revisions"}],"wp:attachment":[{"href":"https:\/\/alanporter.com\/blog\/wp-json\/wp\/v2\/media?parent=740"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/alanporter.com\/blog\/wp-json\/wp\/v2\/categories?post=740"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/alanporter.com\/blog\/wp-json\/wp\/v2\/tags?post=740"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}