[Iftop-users] iftop on openbsd
Chris Lightfoot
chris at ex-parrot.com
Sun, 31 Aug 2003 02:17:14 +0100
On Fri, Aug 29, 2003 at 12:24:09PM -0700, Michael wrote:
> Thanks for the quick reply, this patch compiles successfully
>
> However it still wont accept any keystrokes once iftop is started..
> I've tried the keys to change the display while in iftop, and q to quit, and
> ctrl-z, c, and x, and Break and ctrl-just-about-everything =/ but I
> appreciate the help!
For me, keys work, but response is *incredibly* sluggish.
I think the problem is that OpenBSD's thread support is
userland and therefore I/O in any thread blocks others.
There's some blurb about this here:
http://groups.google.com/groups?selm=19991222000819.24957.qmail_hotmail.com%40ns.sol.net
or see pthreads(3):
In OpenBSD, threads are implemented in a user-level
library. A program using these routines must be
linked with the -pthread option.
In particular, the thread running pcap_dispatch seems to
stop any of the other threads running, much.
Replacing pthread_testcancel() with usleep(10000) makes it
more responsive, but (a) is really ugly, and (b) may do
bad things to the accuracy of the program. Paul--
thoughts?
--
``It just seems to me that you are wilfully entering an arse-kicking
contest with a monstrous entity that has sixteen legs and no arse....''
(seen on the internet)