<?xml version="1.0"?>
<paste-with-annotations>
  <paste>
    <number>
      <integer>77950</integer>
    </number>
    <user>
      <string>bancus</string>
    </user>
    <title>
      <string>Net::SNMP attempt</string>
    </title>
    <contents>
      <string>#!/usr/bin/perl
#!/usr/bin/perl

use Net::SNMP;

$ENV{'MIBS'}=&quot;RFC1213-MIB&quot;;
$SNMP_TARGET = &quot;serenity&quot;;
$SNMP_COMMUNITY = &quot;public&quot;;

$SESSION = new SNMP::Session (DestHost =&gt; $SNMP_TARGET, Community =&gt; $SNMP_COMMUNITY, Version =&gt; 1);

$VLIST = new SNMP::VarList(['ifInOctets.21'],['ifOutOctets.21']);

@INFO = $SESSION-&gt;getnext($VLIST);

print &quot;Bytes In: ${VLIST[0]}&quot;;
print &quot;Bytes Out: ${VLIST[1]}&quot;;</string>
    </contents>
    <universal-time>
      <integer>3447695088</integer>
    </universal-time>
    <channel>
      <string>#swhack</string>
    </channel>
    <colorization-mode>
      <string>None</string>
    </colorization-mode>
    <maybe-spam>
      <null/>
    </maybe-spam>
    <is-unicode>
      <keyword>TRUE</keyword>
    </is-unicode>
    <deletion-requested>
      <null/>
    </deletion-requested>
    <deletion-requested-email>
      <null/>
    </deletion-requested-email>
    <expiration-time>
      <null/>
    </expiration-time>
  </paste>
  <annotation>
    <number>
      <integer>2</integer>
    </number>
    <user>
      <string>bancus</string>
    </user>
    <title>
      <string>New Version</string>
    </title>
    <contents>
      <string>
#!/usr/bin/perl -w

use strict;
use Net::SNMP;

my $session = new Net::SNMP-&gt;session (-hostname =&gt; &quot;serenity&quot;, -community =&gt; &quot;public&quot;);

my $ifInOctets = &quot;ifInOctets.21&quot;;
my $ifOutOctets = &quot;ifOutOctets.21&quot;;

my $result = $session-&gt;get_request(-varbindlist =&gt; [$ifInOctets, $ifOutOctets]);

printf (&quot;Bytes In: %s\n Bytes Out: %s&quot;, $result-&gt;{$ifInOctets}, $result-&gt;{$ifOutOctets});

$session-&gt;close;

exit 0;</string>
    </contents>
    <universal-time>
      <integer>3447697011</integer>
    </universal-time>
    <channel>
      <string>#swhack</string>
    </channel>
    <colorization-mode>
      <string></string>
    </colorization-mode>
    <maybe-spam>
      <null/>
    </maybe-spam>
    <is-unicode>
      <keyword>TRUE</keyword>
    </is-unicode>
    <deletion-requested>
      <null/>
    </deletion-requested>
    <deletion-requested-email>
      <null/>
    </deletion-requested-email>
    <expiration-time>
      <null/>
    </expiration-time>
  </annotation>
  <annotation>
    <number>
      <integer>1</integer>
    </number>
    <user>
      <string>xover</string>
    </user>
    <title>
      <string>Working Net::SNMP example.</string>
    </title>
    <contents>
      <string>#!/usr/bin/perl

use strict;
use warnings;

use SNMP;

use constant OIDsysObjectID =&gt; '.1.3.6.1.2.1.1.2.0';

my $snmp = new SNMP::Session(
  DestHost       =&gt; 'host.example.com',
  Community      =&gt; 'snmp_community_string',
  Version        =&gt; '2c',
  UseSprintValue =&gt; 1,
);

my $sysOID = $id-&gt;get(OIDsysObjectID);
</string>
    </contents>
    <universal-time>
      <integer>3447695785</integer>
    </universal-time>
    <channel>
      <string>#swhack</string>
    </channel>
    <colorization-mode>
      <string></string>
    </colorization-mode>
    <maybe-spam>
      <null/>
    </maybe-spam>
    <is-unicode>
      <keyword>TRUE</keyword>
    </is-unicode>
    <deletion-requested>
      <null/>
    </deletion-requested>
    <deletion-requested-email>
      <null/>
    </deletion-requested-email>
    <expiration-time>
      <null/>
    </expiration-time>
  </annotation>
</paste-with-annotations>
