Hi
I have plannet to monitor the status of TCP/IP ports status.
So I have created my own MIB txt using NET-SNMP-TUTORIAL.txt as shown below
NSN-MIB DEFINITIONS ::= BEGIN
IMPORTS
netSnmpExamples FROM NET-SNMP-EXAMPLES-MIB
OBJECT-TYPE, Integer32
MODULE-IDENTITY FROM SNMPv2-SMI
MODULE-COMPLIANCE, OBJECT-GROUP FROM SNMPv2-CONF;
nsnPort OBJECT-TYPE
SYNTAX Integer32
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"this is to monitor port1"
::= { netSnmpExamples 10 }
END
then I have created the nsnPort.c and nsnPort.h using mib2c tool
using following commands
MIBS=+NSN-MIB; export
MIBSMIBDIRS=/home/mydir/mibs:/etc/snmp/mibs:/export/home/mavohra/share/snmp/mibs
export MIBDIRS
mib2c -c mib2c.scalar.conf nsnPort
Then i have implemented the functionality in the nsnPort.c file.
After doing all this
I copied the .c and .h file in /net-snmp-5.4.2.1/agent/mibgroups/
and the .txt file in /net-snmp-5.4.2.1/mibs
after doing all this I reconfigured the net-snmp-5.4.2.1
by using
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/export/home/mavohra/lib
export PATH=$PATH:/usr/ccs/bin
/usr/ccs/bin/make clean
./configure --prefix=/export/home/mavohra/ --enable-debugging
--with-mib-modules="nsnPort"
--with-logfile=/export/home/mavohra/var/log/snmpd.log --with-cc=gcc
--with-libs=-lc
make
make install
after this I re-run the the snmp agent
./snmpd -c /etc/sma/snmp/snmpd.conf
but after this when I run the get-command
./snmpget -v 1 -c public localhost NSN-MIB::nsnPort.0
I am getting following output
Timeout: No Response from localhost.
can you help me with this?
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders