From Tor.Egge@idt.ntnu.no  Sun Oct 13 13:59:35 1996
Received: from pat.idt.unit.no (pat.idt.unit.no [129.241.103.5])
          by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id NAA05632
          for <FreeBSD-gnats-submit@freebsd.org>; Sun, 13 Oct 1996 13:59:29 -0700 (PDT)
Received: from ikke.idt.unit.no (ikke.idt.unit.no [129.241.111.65]) by pat.idt.unit.no (8.7.5/8.7.3) with ESMTP id WAA16794 for <FreeBSD-gnats-submit@freebsd.org>; Sun, 13 Oct 1996 22:58:30 +0200 (MET DST)
Received: (from tegge@localhost) by ikke.idt.unit.no (8.7.6/8.7.3) id WAA14506; Sun, 13 Oct 1996 22:58:29 +0200 (MET DST)
Message-Id: <199610132058.WAA14506@ikke.idt.unit.no>
Date: Sun, 13 Oct 1996 22:58:29 +0200 (MET DST)
From: Tor Egge <Tor.Egge@idt.ntnu.no>
Reply-To: Tor.Egge@idt.ntnu.no
To: FreeBSD-gnats-submit@freebsd.org
Subject: netstat gives negative numbers for tcp bytes transferred
X-Send-Pr-Version: 3.2

>Number:         1788
>Category:       kern
>Synopsis:       netstat gives negative numbers for tcp bytes transferred
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    wollman
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Oct 13 14:00:02 PDT 1996
>Closed-Date:    Mon Feb 8 11:26:14 PST 1999
>Last-Modified:  Mon Feb  8 11:27:20 PST 1999
>Originator:     Tor Egge
>Release:        FreeBSD 2.2-CURRENT i386
>Organization:
Norwegian University of Science and Technology, Trondheim, Norway

>Environment:

	FreeBSD skarven.itea.ntnu.no 2.2-CURRENT FreeBSD 2.2-CURRENT #0: Fri Oct 11 23:58:42  1996     root@skarven.itea.ntnu.no:/usr/src/sys/compile/SKARVEN  i386


>Description:

	Currently 32 bits variables are used to collect tcp statistics.
	With some network load (6 GB/day outgoing HTTP traffic/day),
	the number of tcp bytes transferred as shown by netstat becomes
	negative after 8 hours uptime.

>How-To-Repeat:

	Run netstat -s on a machine that has been up with some network
	load for some time.

>Fix:
	Use 64 bits integers for some of the numbers, e.g. packet 
	and byte counters, and modify netstat to use %qd instead of %ld
        in the corresponding format argument to printf.

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: pst->wollman 
Responsible-Changed-By: pst 
Responsible-Changed-When: Mon Oct 27 10:12:32 PST 1997 
Responsible-Changed-Why:  
Wollman is project leader. 
State-Changed-From-To: suspended->closed 
State-Changed-By: wollman 
State-Changed-When: Mon Feb 8 11:26:14 PST 1999 
State-Changed-Why:  
I don't think we're ever going to have 64-bit statistics counters on 
i386-family platforms.  If you really care, use an Alpha. 
>Unformatted:
