Re: [tkined] Tiny agent sample requested

Peter Polkinghorne (Peter.Polkinghorne@brunel.ac.uk)
Fri, 26 Nov 1999 16:22:06 +0000

This is a multipart MIME message.

--===_0_Fri_Nov_26_16:21:10_GMT_1999
Content-Type: text/plain; charset=us-ascii

> Hello Friends,
>
> A while back I asked this and got no response, so I'll try again:
>
> Can someone send/post/give URL for how to set up the snmp session parameters in Tnm (2.1.10 and/or 3.0.0) to create an agent? I've used the snmp command lots of times to talk to other agents but have never implemented an agent in scotty.
>
> Thanks a 1E6 (million)
>
> Cheers
> S. Austin
>

Well it is described in the Man pages and in the source code there is some
example agents in tnm/agents/ directory.

Here is a minimal snmpV1 agent as a mime part.

Using UCD-SNMP command snmpwalk -v 1 -p 1161 moomin public
where moomin is my workstation name got:

system.sysDescr.0 = scotty agent version 2.1.7 (sun4u-SunOS-5.7)
system.sysObjectID.0 = OID: enterprises.1575.1.1
system.sysUpTime.0 = Timeticks: (14500) 0:02:25.00
system.sysContact.0 =
system.sysName.0 =
system.sysLocation.0 =
system.sysServices.0 = 72
snmp.snmpInPkts.0 = 8
snmp.snmpOutPkts.0 = 8
snmp.snmpInBadVersions.0 = 0
snmp.snmpInBadCommunityNames.0 = 0
snmp.snmpInBadCommunityUses.0 = 0
snmp.snmpInASNParseErrs.0 = 0
snmp.snmpInTooBigs.0 = 0
snmp.snmpInNoSuchNames.0 = 0
snmp.snmpInBadValues.0 = 0
snmp.snmpInReadOnlys.0 = 0
snmp.snmpInGenErrs.0 = 0
snmp.snmpInTotalReqVars.0 = 18
snmp.snmpInTotalSetVars.0 = 0
snmp.snmpInGetRequests.0 = 0
snmp.snmpInGetNexts.0 = 22
snmp.snmpInSetRequests.0 = 0
snmp.snmpInGetResponses.0 = 0
snmp.snmpInTraps.0 = 0
snmp.snmpOutTooBigs.0 = 0
snmp.snmpOutNoSuchNames.0 = 0
snmp.snmpOutBadValues.0 = 0
snmp.snmpOutGenErrs.0 = 0
snmp.snmpOutGetRequests.0 = 0
snmp.snmpOutGetNexts.0 = 0
snmp.snmpOutSetRequests.0 = 0
snmp.snmpOutGetResponses.0 = 32
snmp.snmpOutTraps.0 = 0

so you you do not have to do much to get some result!

-- 
-----------------------------------------------------------------------------
| Peter Polkinghorne, Computer Centre, Brunel University, Uxbridge, UB8 3PH,|
| Peter.Polkinghorne@brunel.ac.uk   +44 1895 274000 x2561       UK          |
-----------------------------------------------------------------------------

--===_0_Fri_Nov_26_16:21:10_GMT_1999 Content-Type: application/x-tcl Content-Description: agent.tcl

#!/bin/sh # the next line restarts using scotty -*- tcl -*- \ exec scotty "$0" "$@" # # agent.tcl - # # Trivial agent - listens on port 1161 SNMPv1. # # Copyright (c) 1999 Peter Polkinghorne, Brunel University #

package require Tnm 2.1

# set up agent - very simply

set agent [snmp session -agent {} -port 1161]

--===_0_Fri_Nov_26_16:21:10_GMT_1999--

--
!! This message is brought to you via the `tkined & scotty' mailing list.
!! Please do not reply to this message to unsubscribe. To subscribe or
!! unsubscribe, send a mail message to <tkined-request@ibr.cs.tu-bs.de>.
!! See http://wwwsnmp.cs.utwente.nl/~schoenw/scotty/ for more information.