The basic way is this: # ps axf | grep ntop 14291 ? S 0:00 \_ sshd: ntop [priv] 14293 ? S 0:00 \_ sshd: [EMAIL PROTECTED]/0 14387 pts/0 S 0:00 \_ grep ntop 3526 ? S 0:00 /usr/bin/ntop -i eth1,eth2 @/etc/ntop.conf -d --use-syslog local3 # gdb /usr/bin/ntop 3526 GNU gdb Red Hat Linux (6.0post-0.20040223.19rh) Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-redhat-linux-gnu"...Using host libthread_db library "/lib/tls/libthread_db.so.1".
Attaching to program: /usr/bin/ntop, process 3526 ... (gdb) info thread 9 Thread 41262000 (LWP 3529) 0x0096f7a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2 8 Thread 51751856 (LWP 3530) 0x0096f7a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2 7 Thread 68287408 (LWP 3531) 0x0096f7a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2 6 Thread 105622448 (LWP 3532) 0x0096f7a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2 5 Thread 89267120 (LWP 3536) 0x0096f7a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2 4 Thread 116112304 (LWP 3537) 0x0096f7a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2 3 Thread 126602160 (LWP 3538) 0x0096f7a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2 2 Thread -162530384 (LWP 3539) 0x0096f7a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2 1 Thread -151093120 (LWP 3526) 0x0096f7a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2 (gdb) thread 1 [Switching to thread 1 (Thread -151093120 (LWP 3526))]#0 0x0096f7a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2 (gdb) info stack #0 0x0096f7a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2 #1 0x001a9446 in __nanosleep_nocancel () from /lib/tls/libc.so.6 #2 0x001a92c9 in sleep () from /lib/tls/libc.so.6 #3 0x00d24945 in ntop_sleep (secs=10) at util.c:3663 #4 0x0804a9fe in main (argc=6, argv=0xfeeea724) at main.c:569 (gdb) thread 2 [Switching to thread 2 (Thread -162530384 (LWP 3539))]#0 0x0096f7a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2 (gdb) info stack #0 0x0096f7a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2 #1 0x00357308 in recvfrom () from /lib/tls/libpthread.so.0 #2 0x00585788 in pcap_open_live () from /usr/lib/libpcap.so.0.8.3 #3 0x0058712b in pcap_loop () from /usr/lib/libpcap.so.0.8.3 #4 0x00d061a1 in pcapDispatch (_i=0x1) at ntop.c:90 #5 0x0035198c in start_thread () from /lib/tls/libpthread.so.0 #6 0x001de16a in clone () from /lib/tls/libc.so.6 Etc... (gdb) quit The program is running. Quit anyway (and detach it)? (y or n) y Detaching from program: /usr/bin/ntop, process 3526 This shows, for example that one thread is in a sleep() call and another in pcap_loop waiting on a recv. That's normal. It when they're all waiting on each other, etc. that things are ugly. -----Burton -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Nick Buraglio Sent: Monday, January 10, 2005 11:48 AM To: [email protected] Subject: Re: [Ntop] ntop data display timeout So, in poking around with gdb I see that I don't really have a strong grasp of how to use it. If you can get me the commands to issue I'll happily provide the data off list or on list. nb On Jan 10, 2005, at 11:15 AM, Nick Buraglio wrote: > I do not need the nonblocking, it was already in the ntop.sh file and > I have not completed my tweaking since I've been having issues. I > can check the gdb, although I'm pretty unfamiliar with gdb so I may > ned some guidance. > > nb > _______________________________________________ Ntop mailing list [email protected] http://listgateway.unipi.it/mailman/listinfo/ntop
