linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ricky Beam <jfbeam@bluetronic.net>
To: Linux Kernel Mail List <linux-kernel@vger.kernel.org>
Subject: /proc/net/* read drops data (was: lost socket)
Date: Wed, 27 Aug 2003 19:58:17 -0400 (EDT)	[thread overview]
Message-ID: <Pine.GSO.4.33.0308271935550.7750-100000@sweetums.bluetronic.net> (raw)
In-Reply-To: <Pine.GSO.4.33.0308271658370.7750-100000@sweetums.bluetronic.net>

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



  reply	other threads:[~2003-08-28  0:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-27 21:27 lost socket Ricky Beam
2003-08-27 23:58 ` Ricky Beam [this message]
2003-08-28  0:34   ` /proc/net/* read drops data YOSHIFUJI Hideaki / 吉藤英明
2003-09-03  7:07   ` YOSHIFUJI Hideaki / 吉藤英明
2003-09-04  7:46     ` David S. Miller
2003-09-04 16:21       ` Ricky Beam
2003-09-04 16:25       ` Ricky Beam
2003-09-04 17:13         ` YOSHIFUJI Hideaki / 吉藤英明

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.GSO.4.33.0308271935550.7750-100000@sweetums.bluetronic.net \
    --to=jfbeam@bluetronic.net \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).