Subject: bin/24679: already running top(1) miss all swap removal
To: None <gnats-bugs@gnats.NetBSD.org>
From: None <njoly@pasteur.fr>
List: netbsd-bugs
Date: 03/05/2004 11:36:14
>Number:         24679
>Category:       bin
>Synopsis:       already running top(1) miss all swap removal
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Mar 05 10:42:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator:     Nicolas Joly
>Release:        NetBSD 1.6ZK (-current 20040304)
>Organization:
	Institut Pasteur
>Environment:
System: NetBSD calimero.sis.pasteur.fr 1.6ZK NetBSD 1.6ZK (CALIMERO) #10: Thu Mar 4 17:50:53 CET 2004 njoly@calimero.sis.pasteur.fr:/local/src/NetBSD/obj/amd64/sys/arch/amd64/compile/CALIMERO amd64
Architecture: x86_64
Machine: amd64
>Description:
An already running top(1) program miss all swap devices/files removal :

njoly@calimero [~]# swapctl -l
no swap devices configured

top reports ... Swap: 

root@calimero [~]# swapctl -a /tmp/swapfile 
root@calimero [~]# swapctl -l
Device        512-blocks     Used    Avail Capacity  Priority
/tmp/swapfile     204800        0   204800     0%    0

top reports ... Swap: 100M Total, 100M Free

root@calimero [~]# swapctl -a /dev/sd0b         
root@calimero [~]# swapctl -l
Device        512-blocks     Used    Avail Capacity  Priority
/tmp/swapfile     204800        0   204800     0%    0
/dev/sd0b        8390088        0  8390088     0%    0
Total            8594888        0  8594888     0%

top reports ... Swap: 4197M Total, 4197M Free

root@calimero [~]# swapctl -d /tmp/swapfile 
root@calimero [~]# swapctl -l
Device      512-blocks     Used    Avail Capacity  Priority
/dev/sd0b      8390088        0  8390088     0%    0

top reports ... Swap: 4097M Total, 4097M Free

root@calimero [~]# swapctl -d /dev/sd0b         
root@calimero [~]# swapctl -l
no swap devices configured

top reports ... Swap: 4097M Total, 4097M Free

I made some tests, and it seems to be a display problem (fetched swap
stats are fine).

>How-To-Repeat:
let top(1) run in a window, and remove all swap devices/files.
Then check top output for swap.
>Fix:
unknown
>Release-Note:
>Audit-Trail:
>Unformatted: