Page MenuHomeFreeBSD

Improve systat -swap readability and fix display issues
ClosedPublic

Authored by ota_j.email.ne.jp on Dec 7 2020, 12:24 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Aug 19, 11:43 AM
Unknown Object (File)
Sun, Aug 17, 7:24 PM
Unknown Object (File)
Mon, Aug 11, 3:34 AM
Unknown Object (File)
Mon, Jul 28, 2:19 PM
Unknown Object (File)
Jul 11 2025, 10:31 AM
Unknown Object (File)
Jul 6 2025, 10:25 AM
Unknown Object (File)
Jul 5 2025, 6:50 AM
Unknown Object (File)
Jul 1 2025, 12:31 PM

Details

Summary

Improve size readability.
Preserve more space for swap devise names.
Prevent line overflow with long devise name.
Don't draw a bar when swap is not used at all.
Simplify and optimize code.
Change the label to end at end of 100%.

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=251655

Test Plan

systat -swap

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 35227
Build 32170: arc lint + arc unit

Event Timeline

Fix off-by-one error over 60% and stop extra +1 for percentage.

Fix when the number of swap devise is 1.

bcr added a subscriber: bcr.

OK from manpages.

Builds, works and looks OK.

This revision is now accepted and ready to land.Feb 15 2021, 7:22 PM
This revision was automatically updated to reflect the committed changes.