Hi,

"Sung Sik, Bae" wrote:
> 
> Thank you for answering.
> 
> I really hope the day comes as soon as possible.^^
> 
> Hmm...
> 
> But I need the functionality right now.
> 
> So I decided to add my own code to your work -- ntop.
Thanks send me the code.

> My idea is as follows:
> 
>     Method 1. when ntop starts, it reads from the database and rebuilds
>         the "hostTraffic" struct from the datas of database.
>         and go on like original ntop does.

If you use '-S' ntop will resurrect the instances from disk as needed
(i.e. when there's traffic for such hosts).


>     Method 2. replace "DELETE and INSERT" with "UPDATE" sql code
>         and *reset* the member values of "hostTraffic" struct to zero
>         when each data is updated.


> Can I hear your opinion about these ?
> 
> or Can I hear your idea ?
My idea is to integrate -S with DB support (i.e. UPDATE). Anyway the DB
support will be moved out of the ntop core after ntop 2.0 will be
released as the ntopo core is too fat and this functionality can be very
well implemented externally (e.e. using Perl).

Cheers, Luca

> Thank you again.^^
> 
> ----- Original Message -----
> From: "Luca Deri" <[EMAIL PROTECTED]>
> To: "Sung Sik, Bae" <[EMAIL PROTECTED]>
> Sent: Monday, April 16, 2001 6:27 PM
> Subject: Re: [Q] is ntop reset by restarting?
> 
> > Hi,
> > Database support will have to be reworked in future versions. You've hit
> > just one of the problems: please be patient as I plan to change this
> > behaviour.
> >
> > Cheers, Luca
> >
> > > Hi
> > >
> > > I'm using ntop(cvs:7 April, 2001) on RedHat7 with MySQL.
> > >
> > > I use like this:
> > >
> > > $ perl mySQLserver.pl &
> > > $ ntop -i eth0 -d -b localhost:4000
> > >
> > > This works well.
> > >
> > > But when I restart ntop -- stop and start --
> > >
> > > ntop reset previous database data -- DELETE and INSERT.
> > >
> > > the ntop doesn't UPDATE the data in MySQL. it DELETEs and INSERTs the data.
> > >
> > >
> > > Is there any way to use the ntop continuously?
> > >
> > > Is there any way to restart without resetting data in mysql?
> > >
> > > Thanx^^
> > >
> >
> >

-- 
Luca Deri                NETikos S.p.A.
Via Matteucci 34/B       56124 Pisa, Italy.
Ph. +39/050/968.639      Fax. +39/050/968.626
Email: [EMAIL PROTECTED] WWW: http://luca.ntop.org/
ICQ: 68183632
Software is about stuff, about getting hands dirty - Jim Coplien

Reply via email to