/proc/net/* read drops data (was: lost socket)

From: Ricky Beam (jfbeam_at_bluetronic.net)
Date: 08/28/03

  • Next message: S. Baker: "PCI resource allocation bug"
    Date:	Wed, 27 Aug 2003 19:58:17 -0400 (EDT)
    To: Linux Kernel Mail List <linux-kernel@vger.kernel.org>
    
    

    On Wed, 27 Aug 2003, Ricky Beam wrote:
    >This smells like a simple "off by one" bug, but I've been too busy to go
    >look at the code.

    Ah hah! it's a block size problem... netstat reads 1024 at a time.

    Using dd...

    [root:pts/5{9}]gir:~/[7:55pm]:dd if=/proc/net/udp bs=1024 | wc
    2+1 records in
    2+1 records out
         18 216 2304
    [root:pts/5{9}]gir:~/[7:56pm]:dd if=/proc/net/udp bs=2048 | wc
    1+1 records in
    1+1 records out
         19 228 2432
    [root:pts/5{9}]gir:~/[7:56pm]:dd if=/proc/net/udp bs=4096 | wc
    0+1 records in
    0+1 records out
         20 240 2560
    [root:pts/5{9}]gir:~/[7:56pm]:dd if=/proc/net/udp bs=8192 | wc
    0+1 records in
    0+1 records out
         20 240 2560
    [root:pts/5{9}]gir:~/[7:56pm]:dd if=/proc/net/udp bs=32768 | wc
    0+1 records in
    0+1 records out
         20 240 2560
    [root:pts/5{9}]gir:~/[7:56pm]:dd if=/proc/net/udp bs=1 | wc
    2432+0 records in
    2432+0 records out
         19 228 2432

    --Ricky

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/


  • Next message: S. Baker: "PCI resource allocation bug"

    Relevant Pages

    • Re: Insults in the kernel-sources
      ... we don't want microshit's source in Linux!! ... Hah. ... how can this amount to anything? ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: Insults in the kernel-sources
      ... we don't want microshit's source in Linux!! ... Hah. ... how can this amount to anything? ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [PATCH] Format Unit can take many hours
      ... On Tue, May 11 2004, Ricky Beam wrote: ... > IOCTL interface does not export that capability. ... Noone should use that interface, ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: ftp.kernel.org
      ... By author: Ricky Beam ... In newsgroup: linux.dev.kernel ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [PATCH] Format Unit can take many hours
      ... Ricky Beam wrote: ... > If you execute a FORMAT_UNIT properly, the timeout is irrelevant. ... > IMMED bit so the command returns as soon as the drive begins processing it. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)