From nobody@FreeBSD.org  Sun Oct 20 23:14:10 2013
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by hub.freebsd.org (Postfix) with ESMTP id 18F509E1
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 20 Oct 2013 23:14:10 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from oldred.freebsd.org (oldred.freebsd.org [8.8.178.121])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 066C3277F
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 20 Oct 2013 23:14:10 +0000 (UTC)
Received: from oldred.freebsd.org ([127.0.1.6])
	by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id r9KNE9ZS068812
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 20 Oct 2013 23:14:09 GMT
	(envelope-from nobody@oldred.freebsd.org)
Received: (from nobody@localhost)
	by oldred.freebsd.org (8.14.5/8.14.5/Submit) id r9KNE9K4068808;
	Sun, 20 Oct 2013 23:14:09 GMT
	(envelope-from nobody)
Message-Id: <201310202314.r9KNE9K4068808@oldred.freebsd.org>
Date: Sun, 20 Oct 2013 23:14:09 GMT
From: Adam McDougall <mcdouga9@egr.msu.edu>
To: freebsd-gnats-submit@FreeBSD.org
Subject: top(1) doesn't show results of swapon while running, only swapoff
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         183135
>Category:       bin
>Synopsis:       top(1) doesn't show results of swapon while running, only swapoff
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:
>Keywords:
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Oct 20 23:20:01 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Adam McDougall
>Release:        9.1-STABLE
>Organization:
>Environment:
FreeBSD hostname 9.1-STABLE FreeBSD 9.1-STABLE #1: Sat Jun  1 19:50:16 EDT 2013     mcdouga9@hostname:/usr/obj/usr/src/sys/AMD64-9  amd64

>Description:
If top is running in one terminal and swapoff/swapon is used to eliminate and re-add the current swap device, top reflects the results of the swapoff but not the swapon.  Stop top and re-run top and all is fine.  Not a high priority problem but could be misleading to someone leaving top open for long periods.
>How-To-Repeat:
Before:
% swapinfo
Device          1K-blocks     Used    Avail Capacity
/dev/ada0p2       8388608   407420  7981188     5%

top:
Swap: 8192M Total, 398M Used, 7794M Free, 4% Inuse

# swapoff /dev/ada0p2
top:
Swap: 3184K In

# swapon /dev/ada0p2
top:
Swap: 3184K In

rerun top:
Swap: 8192M Total, 8192M Free
>Fix:


>Release-Note:
>Audit-Trail:
>Unformatted:
