netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* UDP-Lite and /proc/net/snmp
@ 2007-11-10 13:14 Herbert Xu
  2007-11-10 13:32 ` YOSHIFUJI Hideaki / 吉藤英明
  0 siblings, 1 reply; 10+ messages in thread
From: Herbert Xu @ 2007-11-10 13:14 UTC (permalink / raw)
  To: David S. Miller, netdev

Hi Dave:

It looks like the addition of UDP-Lite has upset netstat:

$ netstat -s
Ip:
    1257344 total packets received
    6 with invalid addresses
    0 forwarded
    0 incoming packets discarded
    1257338 incoming packets delivered
    1257151 requests sent out
Icmp:
    0 ICMP messages received
    0 input ICMP message failed.
    ICMP input histogram:
    0 ICMP messages sent
    0 ICMP messages failed
    ICMP output histogram:
Tcp:
    2 active connections openings
    3 passive connection openings
    0 failed connection attempts
    0 connection resets received
    1 connections established
    1257288 segments received
    1257134 segments send out
    0 segments retransmited
    0 bad segments received.
    0 resets sent
Udp:
    30 packets received
    0 packets to unknown port received.
    0 packet receive errors
    17 packets sent
UdpLite:
error parsing /proc/net/snmp: Success
$

Should we remove it again or let it stay this time?

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: UDP-Lite and /proc/net/snmp
  2007-11-10 13:14 UDP-Lite and /proc/net/snmp Herbert Xu
@ 2007-11-10 13:32 ` YOSHIFUJI Hideaki / 吉藤英明
  2007-11-10 13:55   ` Eric Dumazet
  2007-11-10 14:33   ` Herbert Xu
  0 siblings, 2 replies; 10+ messages in thread
From: YOSHIFUJI Hideaki / 吉藤英明 @ 2007-11-10 13:32 UTC (permalink / raw)
  To: herbert; +Cc: davem, netdev, yoshfuji

In article <20071110131428.GA6447@gondor.apana.org.au> (at Sat, 10 Nov 2007 21:14:29 +0800), Herbert Xu <herbert@gondor.apana.org.au> says:

> It looks like the addition of UDP-Lite has upset netstat:
> 
> $ netstat -s
> Ip:
:
> Udp:
>     30 packets received
>     0 packets to unknown port received.
>     0 packet receive errors
>     17 packets sent
> UdpLite:
> error parsing /proc/net/snmp: Success
> $
> 
> Should we remove it again or let it stay this time?

Hmm?  netstat 1.42 (net-tools 1.60) seems fine.
Which netstat are you using?

--yoshfuji

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: UDP-Lite and /proc/net/snmp
  2007-11-10 13:32 ` YOSHIFUJI Hideaki / 吉藤英明
@ 2007-11-10 13:55   ` Eric Dumazet
  2007-11-10 14:33   ` Herbert Xu
  1 sibling, 0 replies; 10+ messages in thread
From: Eric Dumazet @ 2007-11-10 13:55 UTC (permalink / raw)
  To: YOSHIFUJI Hideaki / 吉藤英明
  Cc: herbert, davem, netdev

YOSHIFUJI Hideaki / 吉藤英明 a écrit :
> In article <20071110131428.GA6447@gondor.apana.org.au> (at Sat, 10 Nov 2007 21:14:29 +0800), Herbert Xu <herbert@gondor.apana.org.au> says:
> 
>> It looks like the addition of UDP-Lite has upset netstat:
>>
>> $ netstat -s
>> Ip:
> :
>> Udp:
>>     30 packets received
>>     0 packets to unknown port received.
>>     0 packet receive errors
>>     17 packets sent
>> UdpLite:
>> error parsing /proc/net/snmp: Success
>> $
>>
>> Should we remove it again or let it stay this time?
> 
> Hmm?  netstat 1.42 (net-tools 1.60) seems fine.
> Which netstat are you using?
> 

I have the same problem with a netstat 1.42 (debian x86_64 lenny/sid)




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: UDP-Lite and /proc/net/snmp
  2007-11-10 13:32 ` YOSHIFUJI Hideaki / 吉藤英明
  2007-11-10 13:55   ` Eric Dumazet
@ 2007-11-10 14:33   ` Herbert Xu
  2007-11-10 14:48     ` YOSHIFUJI Hideaki / 吉藤英明
  1 sibling, 1 reply; 10+ messages in thread
From: Herbert Xu @ 2007-11-10 14:33 UTC (permalink / raw)
  To: YOSHIFUJI Hideaki / 吉藤英明; +Cc: davem, netdev

On Sat, Nov 10, 2007 at 10:32:43PM +0900, YOSHIFUJI Hideaki / 吉藤英明 wrote:
>
> Hmm?  netstat 1.42 (net-tools 1.60) seems fine.
> Which netstat are you using?

The one from Debian etch:

$ netstat -V
net-tools 1.60
netstat 1.42 (2001-04-15)
Fred Baumgarten, Alan Cox, Bernd Eckenfels, Phil Blundell, Tuan Hoang and others
+NEW_ADDRT +RTF_IRTT +RTF_REJECT +FW_MASQUERADE +I18N
AF: (inet) +UNIX +INET +INET6 +IPX +AX25 +NETROM +X25 +ATALK +ECONET +ROSE
HW:  +ETHER +ARC +SLIP +PPP +TUNNEL +TR +AX25 +NETROM +X25 +FR +ROSE +ASH +SIT +FDDI +HIPPI +HDLC/LAPB +EUI64
$

BTW, netstat only breaks if you run it with -s as otherwise
it doesn't look at /proc/net/snmp.

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: UDP-Lite and /proc/net/snmp
  2007-11-10 14:33   ` Herbert Xu
@ 2007-11-10 14:48     ` YOSHIFUJI Hideaki / 吉藤英明
  2007-11-10 14:55       ` Herbert Xu
  0 siblings, 1 reply; 10+ messages in thread
From: YOSHIFUJI Hideaki / 吉藤英明 @ 2007-11-10 14:48 UTC (permalink / raw)
  To: herbert; +Cc: davem, netdev, yoshfuji

In article <20071110143325.GA6888@gondor.apana.org.au> (at Sat, 10 Nov 2007 22:33:25 +0800), Herbert Xu <herbert@gondor.apana.org.au> says:

> On Sat, Nov 10, 2007 at 10:32:43PM +0900, YOSHIFUJI Hideaki / 吉藤英明 wrote:
> >
> > Hmm?  netstat 1.42 (net-tools 1.60) seems fine.
> > Which netstat are you using?
> 
> The one from Debian etch:

Hmm..... "netstat -s" from etch (i386) and etch (x86_64) work
fine for me.  Same version, same architecture.  Strange...

--yoshfuji

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: UDP-Lite and /proc/net/snmp
  2007-11-10 14:48     ` YOSHIFUJI Hideaki / 吉藤英明
@ 2007-11-10 14:55       ` Herbert Xu
  2007-11-10 15:06         ` Eric Dumazet
  0 siblings, 1 reply; 10+ messages in thread
From: Herbert Xu @ 2007-11-10 14:55 UTC (permalink / raw)
  To: YOSHIFUJI Hideaki / 吉藤英明; +Cc: davem, netdev

On Sat, Nov 10, 2007 at 11:48:54PM +0900, YOSHIFUJI Hideaki / 吉藤英明 wrote:
>
> Hmm..... "netstat -s" from etch (i386) and etch (x86_64) work
> fine for me.  Same version, same architecture.  Strange...

Interesting.  What does your /proc/net/snmp file look like?
And what does netstat -s actually produce?

Thanks,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: UDP-Lite and /proc/net/snmp
  2007-11-10 14:55       ` Herbert Xu
@ 2007-11-10 15:06         ` Eric Dumazet
  2007-11-10 15:16           ` Eric Dumazet
  0 siblings, 1 reply; 10+ messages in thread
From: Eric Dumazet @ 2007-11-10 15:06 UTC (permalink / raw)
  To: Herbert Xu
  Cc: YOSHIFUJI Hideaki / 吉藤英明, davem,
	netdev

Herbert Xu a écrit :
> On Sat, Nov 10, 2007 at 11:48:54PM +0900, YOSHIFUJI Hideaki / 吉藤英明 wrote:
>> Hmm..... "netstat -s" from etch (i386) and etch (x86_64) work
>> fine for me.  Same version, same architecture.  Strange...
> 
> Interesting.  What does your /proc/net/snmp file look like?
> And what does netstat -s actually produce?
> 
> Thanks,

Quite easy :)

A failing one is > 1024 bytes :

Ip: Forwarding DefaultTTL InReceives InHdrErrors InAddrErrors ForwDatagrams 
InUnknownProtos InDiscards InDelivers OutRequests OutDiscards OutNoRoutes 
ReasmTimeout ReasmReqds ReasmOKs ReasmFails FragOKs FragFails FragCreates
Ip: 2 64 6954137412 0 23489 0 125 0 6790615249 6423886499 2706 0 13881 
164999330 1503683 34165124 1219558 188 54871924
Icmp: InMsgs InErrors InDestUnreachs InTimeExcds InParmProbs InSrcQuenchs 
InRedirects InEchos InEchoReps InTimestamps InTimestampReps InAddrMasks 
InAddrMaskReps OutMsgs OutErrors OutDestUnreachs OutTimeExcds OutParmProbs 
OutSrcQuenchs OutRedirects OutEchos OutEchoReps OutTimestamps OutTimestampReps 
OutAddrMasks OutAddrMaskReps
Icmp: 6392743 1256162 3894707 401904 83 20702 172602 1415531 0 3 0 3 0 
106773069 0 3894707 401904 83 20702 172602 1415531 0 3 0 3 0
IcmpMsg: InType3 InType4 InType5 InType8 InType11 InType12 InType13 InType17 
OutType0 OutType3 OutType11 OutType14
IcmpMsg: 3894707 20702 172602 1415531 401904 83 3 3 1414557 105347007 11502 3
Tcp: RtoAlgorithm RtoMin RtoMax MaxConn ActiveOpens PassiveOpens AttemptFails 
EstabResets CurrEstab InSegs OutSegs RetransSegs InErrs OutRsts
Tcp: 1 200 120000 -1 62967275 66063269 17969333 24912734 1278435 6041838336 
5717892916 279078174 361708 35913131
Udp: InDatagrams NoPorts InErrors OutDatagrams RcvbufErrors SndbufErrors
Udp: 640604836 101598293 193394 421746699 133903 0
UdpLite: InDatagrams NoPorts InErrors OutDatagrams RcvbufErrors SndbufErrors
UdpLite: 0 0 0 0 0 0


So netstat fails because line 344 in statistics.c :

buf1=TcpExt: SyncookiesSent SyncookiesRecv SyncookiesFailed EmbryonicRsts 
PruneCalled RcvPruned OfoPruned OutOfWindowIcmps LockDroppedIcmps ArpFilter TW 
TWRecycled TWKilled PAWSPassive PAWSActive PAWSEstab DelayedACKs 
DelayedACKLocked DelayedACKLost ListenOverflows ListenDrops TCPPrequeued 
TCPDirectCopyFromBacklog TCPDirectCopyFromPrequeue TCPPrequeueDropped 
TCPHPHits TCPHPHitsToUser TCPPureAcks TCPHPAcks TCPRenoRecovery 
TCPSackRecovery TCPSACKReneging TCPFACKReorder TCPSACKReorder TCPRenoReorder 
TCPTSReorder TCPFullUndo TCPPartialUndo TCPDSACKUndo TCPLossUndo TCPLoss 
TCPLostRetransmit TCPRenoFailures TCPSackFailures TCPLossFailures 
TCPFastRetrans TCPForwardRetrans TCPSlowStartRetrans TCPTimeouts 
TCPRenoRecoveryFail TCPSackRecoveryFail TCPSchedulerFailed TCPRcvCollapsed 
TCPDSACKOldSent TCPDSACKOfoSent TCPDSACKRecv TCPDSACKOfoRecv TCPAbortOnSyn 
TCPAbortOnData TCPAbortOnClose TCPAbortOnMemory TCPAbortOnTimeout 
TCPAbortOnLinger TCPAbortFailed TCPMemoryPressures TCPSACKDiscard 
TCPDSACKIgnoredOld TCPDSACKIgnoredNoUndo buf2= TCPSpuriousRTOs


So this is an existing kernel bug, not related to UDPlite

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: UDP-Lite and /proc/net/snmp
  2007-11-10 15:06         ` Eric Dumazet
@ 2007-11-10 15:16           ` Eric Dumazet
  2007-11-10 15:43             ` Herbert Xu
  2007-11-10 20:48             ` Andi Kleen
  0 siblings, 2 replies; 10+ messages in thread
From: Eric Dumazet @ 2007-11-10 15:16 UTC (permalink / raw)
  To: Herbert Xu
  Cc: YOSHIFUJI Hideaki / 吉藤英明, davem,
	netdev

Eric Dumazet a écrit :
> Herbert Xu a écrit :
>> On Sat, Nov 10, 2007 at 11:48:54PM +0900, YOSHIFUJI Hideaki / 吉藤英明 
>> wrote:
>>> Hmm..... "netstat -s" from etch (i386) and etch (x86_64) work
>>> fine for me.  Same version, same architecture.  Strange...
>>
>> Interesting.  What does your /proc/net/snmp file look like?
>> And what does netstat -s actually produce?
>>
>> Thanks,
> 
> Quite easy :)
> 
> A failing one is > 1024 bytes :
> 
> Ip: Forwarding DefaultTTL InReceives InHdrErrors InAddrErrors 
> ForwDatagrams InUnknownProtos InDiscards InDelivers OutRequests 
> OutDiscards OutNoRoutes ReasmTimeout ReasmReqds ReasmOKs ReasmFails 
> FragOKs FragFails FragCreates
> Ip: 2 64 6954137412 0 23489 0 125 0 6790615249 6423886499 2706 0 13881 
> 164999330 1503683 34165124 1219558 188 54871924
> Icmp: InMsgs InErrors InDestUnreachs InTimeExcds InParmProbs 
> InSrcQuenchs InRedirects InEchos InEchoReps InTimestamps InTimestampReps 
> InAddrMasks InAddrMaskReps OutMsgs OutErrors OutDestUnreachs 
> OutTimeExcds OutParmProbs OutSrcQuenchs OutRedirects OutEchos 
> OutEchoReps OutTimestamps OutTimestampReps OutAddrMasks OutAddrMaskReps
> Icmp: 6392743 1256162 3894707 401904 83 20702 172602 1415531 0 3 0 3 0 
> 106773069 0 3894707 401904 83 20702 172602 1415531 0 3 0 3 0
> IcmpMsg: InType3 InType4 InType5 InType8 InType11 InType12 InType13 
> InType17 OutType0 OutType3 OutType11 OutType14
> IcmpMsg: 3894707 20702 172602 1415531 401904 83 3 3 1414557 105347007 
> 11502 3
> Tcp: RtoAlgorithm RtoMin RtoMax MaxConn ActiveOpens PassiveOpens 
> AttemptFails EstabResets CurrEstab InSegs OutSegs RetransSegs InErrs 
> OutRsts
> Tcp: 1 200 120000 -1 62967275 66063269 17969333 24912734 1278435 
> 6041838336 5717892916 279078174 361708 35913131
> Udp: InDatagrams NoPorts InErrors OutDatagrams RcvbufErrors SndbufErrors
> Udp: 640604836 101598293 193394 421746699 133903 0
> UdpLite: InDatagrams NoPorts InErrors OutDatagrams RcvbufErrors 
> SndbufErrors
> UdpLite: 0 0 0 0 0 0
> 
> 
> So netstat fails because line 344 in statistics.c :
> 
> buf1=TcpExt: SyncookiesSent SyncookiesRecv SyncookiesFailed 
> EmbryonicRsts PruneCalled RcvPruned OfoPruned OutOfWindowIcmps 
> LockDroppedIcmps ArpFilter TW TWRecycled TWKilled PAWSPassive PAWSActive 
> PAWSEstab DelayedACKs DelayedACKLocked DelayedACKLost ListenOverflows 
> ListenDrops TCPPrequeued TCPDirectCopyFromBacklog 
> TCPDirectCopyFromPrequeue TCPPrequeueDropped TCPHPHits TCPHPHitsToUser 
> TCPPureAcks TCPHPAcks TCPRenoRecovery TCPSackRecovery TCPSACKReneging 
> TCPFACKReorder TCPSACKReorder TCPRenoReorder TCPTSReorder TCPFullUndo 
> TCPPartialUndo TCPDSACKUndo TCPLossUndo TCPLoss TCPLostRetransmit 
> TCPRenoFailures TCPSackFailures TCPLossFailures TCPFastRetrans 
> TCPForwardRetrans TCPSlowStartRetrans TCPTimeouts TCPRenoRecoveryFail 
> TCPSackRecoveryFail TCPSchedulerFailed TCPRcvCollapsed TCPDSACKOldSent 
> TCPDSACKOfoSent TCPDSACKRecv TCPDSACKOfoRecv TCPAbortOnSyn 
> TCPAbortOnData TCPAbortOnClose TCPAbortOnMemory TCPAbortOnTimeout 
> TCPAbortOnLinger TCPAbortFailed TCPMemoryPressures TCPSACKDiscard 
> TCPDSACKIgnoredOld TCPDSACKIgnoredNoUndo buf2= TCPSpuriousRTOs
> 
> 
> So this is an existing kernel bug, not related to UDPlite

I meant a netstat bug of course, sorry :(

It fails to parse /proc/net/netstat , because TcpExt line is bigger than 1024 
chars.

To correct it, we might enlarge buf1[] and buf2[] from 1024 to 2048 in 
statistics.c, process_fd() function.



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: UDP-Lite and /proc/net/snmp
  2007-11-10 15:16           ` Eric Dumazet
@ 2007-11-10 15:43             ` Herbert Xu
  2007-11-10 20:48             ` Andi Kleen
  1 sibling, 0 replies; 10+ messages in thread
From: Herbert Xu @ 2007-11-10 15:43 UTC (permalink / raw)
  To: Eric Dumazet
  Cc: YOSHIFUJI Hideaki / 吉藤英明, davem,
	netdev

On Sat, Nov 10, 2007 at 04:16:41PM +0100, Eric Dumazet wrote:
>
> It fails to parse /proc/net/netstat , because TcpExt line is bigger than 
> 1024 chars.

Good catch.  Perhaps it's time someone rewrote this in netlink
or add this to ss.

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: UDP-Lite and /proc/net/snmp
  2007-11-10 15:16           ` Eric Dumazet
  2007-11-10 15:43             ` Herbert Xu
@ 2007-11-10 20:48             ` Andi Kleen
  1 sibling, 0 replies; 10+ messages in thread
From: Andi Kleen @ 2007-11-10 20:48 UTC (permalink / raw)
  To: Eric Dumazet
  Cc: Herbert Xu, YOSHIFUJI Hideaki / 吉藤英明,
	davem, netdev

Eric Dumazet <dada1@cosmosbay.com> writes:
>
> I meant a netstat bug of course, sorry :(
>
> It fails to parse /proc/net/netstat , because TcpExt line is bigger
> than 1024 chars.

guilty -- i wrote that code a long time ago.

>
> To correct it, we might enlarge buf1[] and buf2[] from 1024 to 2048 in
> statistics.c, process_fd() function.

Or just split TcpExt: into multiple lines, e.g. with a TcpExt2: 
No reason to have it all on a single line anyways.
I think that would be the better fix.

-Andi

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2007-11-10 20:48 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-10 13:14 UDP-Lite and /proc/net/snmp Herbert Xu
2007-11-10 13:32 ` YOSHIFUJI Hideaki / 吉藤英明
2007-11-10 13:55   ` Eric Dumazet
2007-11-10 14:33   ` Herbert Xu
2007-11-10 14:48     ` YOSHIFUJI Hideaki / 吉藤英明
2007-11-10 14:55       ` Herbert Xu
2007-11-10 15:06         ` Eric Dumazet
2007-11-10 15:16           ` Eric Dumazet
2007-11-10 15:43             ` Herbert Xu
2007-11-10 20:48             ` Andi Kleen

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).