<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://mars.merhot.dk/w/index.php?action=history&amp;feed=atom&amp;title=Net%3A%3ASNMP_example_1</id>
		<title>Net::SNMP example 1 - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://mars.merhot.dk/w/index.php?action=history&amp;feed=atom&amp;title=Net%3A%3ASNMP_example_1"/>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=Net::SNMP_example_1&amp;action=history"/>
		<updated>2026-05-01T01:39:58Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.29.0</generator>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=Net::SNMP_example_1&amp;diff=11460&amp;oldid=prev</id>
		<title>Heth at 08:17, 1 April 2010</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=Net::SNMP_example_1&amp;diff=11460&amp;oldid=prev"/>
				<updated>2010-04-01T08:17:17Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;' lang='en'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 08:17, 1 April 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l50&quot; &gt;Line 50:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 50:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/source&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/source&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Network Management]][[Category:Perl]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Category:&lt;/ins&gt;Network Management]][[Category:Perl]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Heth</name></author>	</entry>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=Net::SNMP_example_1&amp;diff=11459&amp;oldid=prev</id>
		<title>Heth at 08:17, 1 April 2010</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=Net::SNMP_example_1&amp;diff=11459&amp;oldid=prev"/>
				<updated>2010-04-01T08:17:01Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;' lang='en'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 08:17, 1 April 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l50&quot; &gt;Line 50:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 50:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/source&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/source&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Network Management]][[Category:Perl]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Heth</name></author>	</entry>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=Net::SNMP_example_1&amp;diff=9891&amp;oldid=prev</id>
		<title>Heth: New page: &lt;source lang=perl&gt; #!/usr/bin/perl ###################################### # Author: Henrik Thomsen / EUC MIDT  # # Email.: heth@eucmidt.dk            # ####################################...</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=Net::SNMP_example_1&amp;diff=9891&amp;oldid=prev"/>
				<updated>2009-11-09T12:57:34Z</updated>
		
		<summary type="html">&lt;p&gt;New page: &amp;lt;source lang=perl&amp;gt; #!/usr/bin/perl ###################################### # Author: Henrik Thomsen / EUC MIDT  # # Email.: heth@eucmidt.dk            # ####################################...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;source lang=perl&amp;gt;&lt;br /&gt;
#!/usr/bin/perl&lt;br /&gt;
######################################&lt;br /&gt;
# Author: Henrik Thomsen / EUC MIDT  #&lt;br /&gt;
# Email.: heth@eucmidt.dk            #&lt;br /&gt;
######################################&lt;br /&gt;
#&lt;br /&gt;
### Pragma's&lt;br /&gt;
use strict;&lt;br /&gt;
use warnings;&lt;br /&gt;
use locale;&lt;br /&gt;
#use diagnostics; # Only for debugging purposes.&lt;br /&gt;
### Module's&lt;br /&gt;
use Net::SNMP qw(:snmp);&lt;br /&gt;
&lt;br /&gt;
my @devices = ('192.168.22.201','192.168.22.202');&lt;br /&gt;
&lt;br /&gt;
my $ifTable = '1.3.6.1.2.1.2.2.1.2';&lt;br /&gt;
&lt;br /&gt;
foreach my $device (@devices) {&lt;br /&gt;
my ($session, $error) = Net::SNMP-&amp;gt;session(&lt;br /&gt;
			 -hostname =&amp;gt; $device,&lt;br /&gt;
             -version  =&amp;gt; '2c', );&lt;br /&gt;
&lt;br /&gt;
  if (!defined($session)) {&lt;br /&gt;
    printf(&amp;quot;Kan ikke åbne session til $device fejl: $error\n&amp;quot;);&lt;br /&gt;
    next;&lt;br /&gt;
  }&lt;br /&gt;
  print &amp;quot;Henter interfaces fra $device\n&amp;quot;;&lt;br /&gt;
  print &amp;quot;=============================\n&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
  my $result = $session-&amp;gt;get_next_request(&lt;br /&gt;
  		-varbindlist =&amp;gt; [$ifTable] );&lt;br /&gt;
  my ($key,$value);&lt;br /&gt;
  my $lastkey;&lt;br /&gt;
&lt;br /&gt;
  while (defined($result) ) {&lt;br /&gt;
    while ( ($key,$value) = each %{$result} ) {&lt;br /&gt;
      if ( !oid_base_match($ifTable, $key)) {&lt;br /&gt;
        $session-&amp;gt;close;&lt;br /&gt;
        undef $result;&lt;br /&gt;
        last;&lt;br /&gt;
      }&lt;br /&gt;
     print &amp;quot;  OID: $key = $value\n&amp;quot;;&lt;br /&gt;
     $lastkey=$key;&lt;br /&gt;
    }&lt;br /&gt;
    $result = $session-&amp;gt;get_next_request( -varbindlist =&amp;gt; [$lastkey] );&lt;br /&gt;
    print &amp;quot;--&amp;gt;&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Heth</name></author>	</entry>

	</feed>