capt_get_packet(): check for key press only every 20ms
[iptraf-ng.git] / FAQ
blobd2b61a78c5f021bcfdfb3dfdc630ca4076d6fa62
1 This is the beginning of a FAQ for IPTraf.
2 ---
4 Q: Could you include support for <this-and-that> interface?
6 A: Please read the README.interfaces file for what is needed for a new
7 interface type to be supported.
9 Q: I try to start IPTraf but it tells me that <facility> is already active
10 in another process.  But I'm sure IPTraf isn't running at the time!
12 A: Probably due to a faulty installation or abnormal termination. If
13 you're sure you've installed the software properly, you may have stale
14 lock files from a previous abort.  Just issue the iptraf command with the
15 -f parameter (iptraf -f). This will override stale locks and IPTraf should
16 proceed normally.
18 Q: I want to configure IPTraf but it tells me only the first instance can
19 configure.
21 A: Similar to the previous question.  Issue the iptraf command with the -f
22 parameter.
24 NOTE: Versions prior to 2.6.2 did not properly erase stale lock files
25 when IPTraf aborted due to an insufficient screen size.
27 Q: Is there a way to make IPTraf run in the background and collect
28 statistics to a log file?
30 A: Prior to 2.1.0, there was no elegant way of doing so.  Version 2.1.0
31 and later have the -B command-line parameter to force IPTraf to dump all
32 its screen output into oblivion and move into the background.  See the
33 manual for details on background operation.
35 Q: I get the error message "Unable to open raw socket".
37 A: If you're using IPTraf 2.x, you must be running version 2.2.x of the
38 Linux kernel.  Furthermore, the "Packet Socket" driver must be installed.
39 Most stock kernels include this driver already.  Be sure to include it if
40 you're compiling a custom kernel.
42 Q: I'm getting a "cannot allocate memory" error but I've got loads of
43 memory available.
45 A: The "cannot allocate memory" error is a reponse to the "segmentation
46 fault" condition (SIGSEGV).  If you're sure it's not a memory condition on
47 your machine, please report it to me, and if possible, include a gdb trace
48 or strace output to help me debug.
50 Q: Is there Web/HTTP/HTML/whatever version available?
52 A: I've received several requests for this one.  Perhaps in time, I've
53 been caught up in some work and some personal stuff.  Suggestions on
54 implementation of such a feature are welcome.  (Addition: I hope to get
55 this incorporated into the next major release.  Who knows?  If I have the
56 time, I might be able to WAP it in the near future :))
58 Q: It would be great if the statistics could be sorted.
60 A: As of version 2.3, sorting is now available with the IP traffic
61 monitor, TCP/UDP statistical breakdown, and LAN station monitor.  Sorting
62 is invoked by pressing the S key and selecting a sort criterion.
64 (Note: versions 2.5.0 and later sorts the entries with the Quicksort
65 algorithm, which significantly cuts down the time to sort.)
67 Q: I want to run IPTraf from a Secure Shell terminal but the output of the
68 program causes a heavy load on the network.  What should I do?
70 A: The output of the program is returned over the network, which in turn
71 tells IPTraf about the new traffic, which IPTraf then outputs, which is
72 then sent over the network... in other words, it's a feedback effect.  The
73 solution to this is to set the screen update interval to 1 second or more.
74 To do that, go to Configuration... then select Timers... then Screen
75 update interval... and enter the interval value in seconds. One second
76 should be fine.
78 Q: Does IPTraf run on FreeBSD?
80 A: I wish it did.  IPTraf was designed from the ground up to use the Linux
81 PF_PACKET mechanism, not libpcap.  The main reasons for doing this are
82 less overhead and more control over the captured packets.  Since Linux 
83 kernel 2.2, the raw socket API featured more goodies, like the direction 
84 of the packets.
86 I hope to be able to successfully port to FreeBSD, but I do not have the 
87 resources to do so now.