Subject: Bug#3873: Xosview hangs when a dummy net device is in the kernel.

From: Philippe Troin <[email-masked]>
Date: Sun, 21 Jul 1996 21:49:48 -0700

Package: xosview
Version: 1.3.2-4.1

The xosview program loops endlessly when a dummy net device is in the kernel.
This is caused because /proc/net/dev doesn't give any statistics:

phil@tantale:~$ cat /proc/net/dev 
Inter-|   Receive                  |  Transmit
 face |packets errs drop fifo frame|packets errs drop fifo colls carrier
    lo:   9604    0    0    0    0     9604    0    0    0     0    0
dummy0: No statistics available.
  ppp0:    481   19   19    0    0      392    0    0    0     0    0

There were some provisions in xosview to take care of this, but it didn't take 
into account dummy0 or dummy1, only dummy (see following patch).

Patch:

*** xosview-1.3.2.orig/linux/netmeter.cc	Thu Feb 23 18:43:57 1995
--- xosview-1.3.2/linux/netmeter.cc	Sun Jul 21 21:32:46 1996
***************
*** 58,64 ****
      stats.getline( buf, 256, ':' );
  
      // discard the dummy line so it does not screw things up.
!     if (strcmp(buf, " dummy") == 0) {
        stats.ignore(256, '\n');
        continue;
      }
--- 58,64 ----
      stats.getline( buf, 256, ':' );
  
      // discard the dummy line so it does not screw things up.
!     if (strstr(buf, "dummy") != NULL) {
        stats.ignore(256, '\n');
        continue;
      }

This should  take care of _any_ dummy device .

Details:

Debian 1.1
Kernel 2.0.7

Package: xosview
Status: install ok installed
Priority: extra
Section: x11
Maintainer: joost witteveen <[email-masked]>
Version: 1.3.2-4.1
Depends: elf-x11r6lib, libc5, libg++
Description: Fun to watch CPU/network usage programme
 you see the usage of CPU/swap/network/interupts statistics in one 
 window. Fun to watch, not much else.

Phil.

---

From: [email-masked] (Kai Henningsen)
Date: 24 Jul 1996 23:33:00 +0200

[email-masked] (Philippe Troin)  wrote on 21.07.96 in <[email-masked]>:

> There were some provisions in xosview to take care of this, but it didn't
> take into account dummy0 or dummy1, only dummy (see following patch).
>
> Patch:
>

A better solution, of course, would be to see if there _is_ statistics  
available, and not rely on the device name.

MfG Kai

---

From: [email-masked] (joost witteveen)
Date: Thu, 25 Jul 1996 20:33:09 +0200 (MET DST)

> > [..]

You are absolutely right. But, unfortunately, I don't have time to
modify xosview to behave that way.

Also, note that xosview-1.4.0 has been released already. Unfortunately,
it doesn't run on my computer, as it has an extra feature that
looks in /proc/net/?, and tries to read info from there. I don't
have the file (not compiled into my kernel), and xosview-1.4.0
dies with the message that it cannot open the /proc file.

Xosview-1.4.1 is supposed to fix this, but doens't work eighter.

-- 
joost witteveen
            [email-masked]
          [email-masked]
--
Use Debian/GNU Linux!