The RedHat scripts in the rpm seem to work ok for me.  I hacked on 'em for the parameters I wanted to use, but that's normal.
 
If it dies, I guess the best would be a cron, every n-minutes, that checked if ntop was running and restarted it if not.
 
Some of the versions have stability problems - there has been a major rework of the hashing stuff under the covers, etc.  But I've found the last few releases to be much more stable.  However, I don't put a heavy load on ntop.
 
If it's really crashing, the best you can do to help is to run under gdb, and when it dies, print the relevant variables, stack trace and where.  Something like this:
 
...
[New Thread 9226 (LWP 18545)]
12/Feb/2002 18:46:32 [initialize.c:1200] Started thread (9226) for network packet sniffing on eth0.
[New Thread 10251 (LWP 18546)]
12/Feb/2002 18:46:32 [initialize.c:1200] Started thread (10251) for network packet sniffing on eth1.
12/Feb/2002 18:52:44 [hash.c:878] Extending hash size [newSize=64]
12/Feb/2002 19:00:40 [hash.c:878] Extending hash size [newSize=128]
 
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 4101 (LWP 18540)]
0x4027e4a6 in freeHostSessions (hostIdx=13, theDevice=0) at hash.c:125
125           if(theSession && (theSession->next == theSession)) {
(gdb) list
120           } else
121             prevSession = prevSession->next;
122
123           theSession = nextSession;
124
125           if(theSession && (theSession->next == theSession)) {
126             traceEvent(TRACE_WARNING, "Internal Error (1)");
127           }
128         } /* while */
129       }
(gdb) info stack
#0  0x4027e4a6 in freeHostSessions (hostIdx=13, theDevice=0) at hash.c:125
#1  0x4027f5dd in freeHostInfo (theDevice=0, hostIdx=13, refreshHash=0, actualDeviceId=0) at hash.c:478
#2  0x4027fb07 in purgeIdleHosts (ignoreIdleTime=0, actDevice=0) at hash.c:616
#3  0x4028675f in scanIdleLoop (notUsed=0x0) at ntop.c:681
#4  0x404dbc6f in pthread_start_thread (arg=0x42744be0) at manager.c:284
#5  0x404dbd5f in pthread_start_thread_event (arg=0x42744be0) at manager.c:308
(gdb) print theSession
$1 = (IPSession *) 0xc8
(gdb)
 
-----Burton
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Devon Harding - GTHLA
Sent: Monday, February 11, 2002 10:31 AM
To: '[EMAIL PROTECTED]'
Subject: [Ntop] ntopd?

How can I get ntop started as a RedHat daemon in /etc/init.d/ and auto restart if dies?

 

__________________

Devon Harding

System Administrator

Gilat Latin America

954-858-1600


This e-mail is intended for the above named addressee(s), and may contain information which is confidential or privileged. If you are not the intended recipient, please inform us immediately: you should not copy or use this e-mail for any purpose nor disclose its contents to any person.

 

Reply via email to