NetBSD Problem Report #59034

From wcm@hecuba.sigwinch.xyz  Tue Jan 28 01:24:06 2025
Return-Path: <wcm@hecuba.sigwinch.xyz>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits)
	 client-signature RSA-PSS (2048 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id E5CC51A923A
	for <gnats-bugs@gnats.NetBSD.org>; Tue, 28 Jan 2025 01:24:05 +0000 (UTC)
Message-Id: <20250128011634.E0ED96917D7@hecuba.sigwinch.xyz>
Date: Mon, 27 Jan 2025 20:16:34 -0500 (EST)
From: wcm@hecuba.sigwinch.xyz
Reply-To: wcm@hecuba.sigwinch.xyz
To: gnats-bugs@NetBSD.org
Subject: systat(1) inet.* data resets on refresh
X-Send-Pr-Version: 3.95

>Number:         59034
>Category:       bin
>Synopsis:       systat(1) inet.* data resets on refresh
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jan 28 01:25:00 +0000 2025
>Last-Modified:  Tue Jan 28 07:25:00 +0000 2025
>Originator:     wcm@hecuba.sigwinch.xyz
>Release:        NetBSD 10.1
>Organization:
Wolfgang Corcoran-Mathe  <wcm@sigwinch.xyz>
>Environment:
System: NetBSD hecuba.sigwinch.xyz 10.1 NetBSD 10.1 (GENERIC) #0: Mon Dec 16 13:08:11 UTC 2024 mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/amd64/compile/GENERIC amd64
Architecture: x86_64
Machine: amd64
>Description:
	Information incorrectly resets after refresh in the inet.*
	lower-window displays offered by the systat(1) program.
	For example, 'systat inet.tcp' shows correct information when
	it is first run, but all fields reset when the program refreshes:
	in my test run, "total TCP packets received" begins at 17873, then
	changes to 2 when systat refreshes. Other cumulative fields show
	the same behavior: counters reset on refresh, instead of ticking
	up.

	All of systat's inet.* displays seem to be affected by this bug.
	Other displays (e.g. bufcache, iostat, etc.) work correctly.

>How-To-Repeat:
	Run 'systat inet.tcp', 'systat inet.icmp', etc.
>Fix:


>Audit-Trail:
From: mlelstv@serpens.de (Michael van Elst)
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: bin/59034: systat(1) inet.* data resets on refresh
Date: Tue, 28 Jan 2025 07:19:59 -0000 (UTC)

 wcm@hecuba.sigwinch.xyz writes:

 >	Information incorrectly resets after refresh in the inet.*
 >	lower-window displays offered by the systat(1) program.
 >	For example, 'systat inet.tcp' shows correct information when
 >	it is first run, but all fields reset when the program refreshes:
 >	in my test run, "total TCP packets received" begins at 17873, then
 >	changes to 2 when systat refreshes. Other cumulative fields show
 >	the same behavior: counters reset on refresh, instead of ticking
 >	up.

 That's a feature.

 The standard display is 'time' to show the change rate. You can use the
 systat commands boot, run, time, zero to change the display.

 boot shows the cumulative statistics since boot (what you expect).
 run  shows the increment to values when systart started.
 time shows the change rate.
 zero resets the start value to the current counters.

 The initial values shown in the default 'time' mode are an artefact
 caused by starting from a zero reference value. On the other hand,
 there is no 'change rate' defined for the initial display. Starting
 with a 'change rate since boot' or just with zero is as wrong.

 Chosing the mode should be a command line option...

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2025 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.