Mailing List Archive

How do I get RMON (ucd-snmp-4.2.1) support compiled into Ntop (CVS 01-08-15) with FreeBSD 4.3-RELEASE ?
Dear Ladies and Gentlemen,

I am writing to ask your help with building ntop (01-08-15 CVS) with the
RMON plugin.

I have attempted to follow the directions in docs/RMON/README.RMON but
after downloading and installing UCD-SNMP 4.2.1,

1 Ntops configure failed to detect both the SNMP libraries (on this
machine, installed in /usr/local/lib) and the headers
(/usr/local/includes).

I tried this 'patch' to configure (1) with the result that configure
would detect the libraries and headers but

2 With SNMP built and installed (but without the UCD-SNMP agent being
started), ntop starts without the RMON plugin support

'22/Aug/2001:12:57:35 Searching plugins in
/usr/local/ntop-01-08-15/lib/ntop/plugins
22/Aug/2001:12:57:35 Welcome to icmpWatchPlugin. (C) 1999 by Luca Deri.
22/Aug/2001:12:57:35 Welcome to LastSeenWatchPlugin. (C) 1999 by Andrea
Marangoni.
22/Aug/2001:12:57:35 INFO: semaphore 0x284A9000 [lastSeenPlugin.c:427]
locked for 0 secs
22/Aug/2001:12:57:35 Welcome to nfsWatchPlugin. (C) 1999 by Luca Deri.
22/Aug/2001:12:57:35 Welcome to ntopRmon. (C) 2000 by Luca Deri.
22/Aug/2001:12:57:35 WARNING: plugin disabled [missing NET-SNMP]
22/Aug/2001:12:57:35 Welcome to WAPPlugin. (C) 2000 by Luca Deri.
'

Now, the SNMP libraries are located on this FreeBSD 4.3-RELEASE machine
in /usr/local/lib. They are all there. System call tracing with 'truss'
does not show any attempts to access __any__ snmp libraries.

It looks like the symbol HAVE_SNMP is not set (so the rmonPlugin
displays that message).

What should I do ?

Thank you,

Yours sincerely.

--
------------------------------------------------------------------------
Stanley Hopcroft IP Australia
Network Specialist
+61 2 6283 3189 +61 2 6281 1353 (FAX) Stanley.Hopcroft@IPAustralia.Gov.AU
------------------------------------------------------------------------
He thought he saw an albatross
That fluttered 'round the lamp.
He looked again and saw it was
A penny postage stamp.
"You'd best be getting home," he said,
"The nights are rather damp."

Notes

1 Hacks to configure to get ucd-snmp detected

stan> diff -c configure configure.orig
*** configure Tue Aug 21 22:36:49 2001
--- configure.orig Tue Aug 21 22:10:14 2001
***************
*** 3165,3171 ****
#include "confdefs.h"
#include <$ac_hdr>
EOF
! ac_try="$ac_cpp conftest.$ac_ext -I /usr/local/include >/dev/null
2>conftest.out"
{ (eval echo configure:3170: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
--- 3165,3171 ----
#include "confdefs.h"
#include <$ac_hdr>
EOF
! ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:3170: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
***************
*** 5319,5325 ****
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_save_LIBS="$LIBS"
! LIBS="-L /usr/local/lib -lucdagent -lsnmp -lucdagent -lucdmibs $LIBS
$MORELIBS $LIBS"
cat > conftest.$ac_ext <<EOF
#line 5325 "configure"
#include "confdefs.h"
--- 5319,5325 ----
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_save_LIBS="$LIBS"
! LIBS="-lucdagent -lsnmp -lucdagent -lucdmibs $LIBS $MORELIBS $LIBS"
cat > conftest.$ac_ext <<EOF
#line 5325 "configure"
#include "confdefs.h"
Re: How do I get RMON (ucd-snmp-4.2.1) support compiled into Ntop (CVS 01-08-15) with FreeBSD 4.3-RELEASE ? [ In reply to ]
Dear Ladies and Gentlemen,

I am writing with some furthr information about my futile attempts to
get an nop with RMON plugin support.

After configuring with the patches in the former letter (and seeing
messagees that configure has locaed the headers and SNMP libraries), it
turns out that rmonPlugin.c does __not__ have HAVE_SNMP defined (gcc -E
rmonPlugin.c shows only the negative #else clause), so the message

WARNING: plugin disabled [missing NET-SNMP]

is unsuprising.

After adding a #define HAVE_SNMP 1 in rmonPlugin.c and repeating the
(g)make process, the message disappears only to be replaced by

22/Aug/2001:18:39:39 WARNING: unable to load plugin
'./plugins/rmonPlugin.so'
[./plugins/rmonPlugin.so: Undefined symbol "debugmsgtoken"]


This AFAIK is reasonable since in the /lib directory of the ntop
installation,

stan# nm -D *.so | grep -i debug
U debugmsg
U debugmsgtoken
U snmp_get_do_debugging

and this (?) means the symbols are undefined.

Your help will be appreciated.

Thank you,

Yours sincerely.


--
------------------------------------------------------------------------
Stanley Hopcroft IP Australia
Network Specialist
+61 2 6283 3189 +61 2 6281 1353 (FAX) Stanley.Hopcroft@IPAustralia.Gov.AU
------------------------------------------------------------------------
It is not enough to succeed. Others must fail.
-- Gore Vidal