Bug 230840 - top - proposed enhancements
Summary: top - proposed enhancements
Status: Closed Feedback Timeout
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 11.2-RELEASE
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-bugs (Nobody)
Depends on:
Reported: 2018-08-23 11:30 UTC by vermaden
Modified: 2020-10-28 19:19 UTC (History)
4 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description vermaden 2018-08-23 11:30:09 UTC
Sending PR according to the Eitan Adler suggestion:

ARC: field is displayed only if ZFS is used,

So if something uses tmpfs then such TMPFS: field should be in top.

 ... as we are here ... also SWAP: field should NOT be displayed if system does not have SWAP.

My $0.02 about #FreeBSD top ...

Comment 1 Daniel Ebdrup Jensen freebsd_committer 2018-08-23 14:09:51 UTC
Optionally, make all these fields runtime togglable so that people can enable or disable them regardless of whether the system has ARC, SWAP or TMPFS in order to improve glance-comparisons across multiple systems with different configurations.
Comment 2 vermaden 2018-08-23 14:32:48 UTC
(In reply to D. Ebdrup from comment #1)

IMHO if ARC: can be dynamically shown/not shown then I do not see why it can not be the case for SWAP: or TMPFS: labels but I agree that there should be both runtime and parameter options to force show/disable them.
Comment 3 Michael Dexter 2018-08-24 08:05:48 UTC
Overheard: "top(1) began as a refreshing ps(1)"

File system-related memory consumption by ARC, the L2ARC table, tmpfs(5), "malloc" md(4) devices are keen interest but we should be clear if top(1) is the place to put it.

The first question is: Is the desired information available from the kernel at this time or is it intertwined with other memory statistics?

One thought: While gstat(8) is GEOM-specific, it would be nice if it would be useful if it reported tmpfs(5) and md(4) activity. Following the top(1) model, an optional header with longer-term statistics for ARC, tmpfs, md would be interesting:

ARC: 12G Total, 3250M MFU, 8304M MRU, 1332K Anon, 134M Header, 439M Other
     7572M Compressed, 33G Uncompressed, 4.53:1 Ratio
L2ARC: Table 2G (other stats?)
tmpfs: 34G (other stats?)
md: 2G (other stats?)

dT: 1.008s  w: 1.000s
 L(q)  ops/s    r/s   kBps   ms/r    w/s   kBps   ms/w   %busy Name
    0      0      0      0    0.0      0      0    0.0    0.0| da0
    0      0      0      0    0.0      0      0    0.0    0.0| da1
    0      0      0      0    0.0      0      0    0.0    0.0| da2
    0      0      0      0    0.0      0      0    0.0    0.0| da3
    0      0      0      0    0.0      0      0    0.0    0.0| cd0
    0      0      0      0    0.0      0      0    0.0    0.0| md0
    0      0      0      0    0.0      0      0    0.0    0.0| tmpfsfoo
Comment 4 vermaden 2019-10-14 13:10:58 UTC
Should I close that or leave it as it is?
Comment 5 Michael Dexter 2019-10-16 21:30:33 UTC
(In reply to vermaden from comment #4)
1. Is the necessary information easily obtained from the kernel?
2. Has anyone stepped forward who is interested in implementing it?