Bug 183135 - top(1) doesn't show results of swapon while running, only swapoff
Summary: top(1) doesn't show results of swapon while running, only swapoff
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 9.1-STABLE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-21 00:20 UTC by Adam McDougall
Modified: 2018-06-10 05:53 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adam McDougall 2013-10-21 00:20:01 UTC
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
Comment 1 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 07:59:07 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped
Comment 2 Eitan Adler freebsd_committer freebsd_triage 2018-06-10 05:53:54 UTC
Trying this now: it seems top(1) does not reflect *either* the swapon or the swapoff during operation. I'll see what I could do about this.