Update of /export/home/ntop/ntop
In directory jabber:/tmp/cvs-serv1234

Modified Files:
        globals-core.h util.c main.c ntop.c pbuf.c webInterface.c 
        address.c ntop.h globals.h 
Log Message:

Implement an ntop "heartbeat":

  HEARTBEAT(000005581)[ntop.c:634]: scanIdleLoop(), sleep(60)... 
  HEARTBEAT(000006082)[rrdPlugin.c:1058]: rrdMainLoop(), sleep(299)...

These messages appear periodically in the log to show that ntop is
up and working.  This is basically just a counter that is incremented
in various places within ntop.

THE NUMBER DOES NOT MEAN ANYTHING...  On some messages, there are
other values printed.

What is significant is that it keeps increasing.

The heartbeat is enabled in ntop.h -- the #define can be set to
0 - some periodic messages
1 - more messages
2 - lots and lots of messages (every packet) - painful...

Adding a heartbeat location is trivial, just add this:

    HEARTBEAT(0, "rrdMainLoop(), sleep(%d)...", sleep_tm);
    HEARTBEAT(2, "pcapDispatch()",              NULL);
              ^- minimum level to print this message at
                 ^- message text
                                                ^- variables

(variables are used for printf() style substituion in the text)

If the heartbeat variable isn't defined, this generates NO code.

-----Burton (ref 176)



_______________________________________________
Ntop-dev mailing list
[EMAIL PROTECTED]
http://listgateway.unipi.it/mailman/listinfo/ntop-dev

Reply via email to