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
F173669862: D27496.id83954.diff
Sun, Sep 27, 2:53 PM
F173669028: D27496.id80741.diff
Sun, Sep 27, 2:45 PM
F173667715: D27496.id80399.diff
Sun, Sep 27, 2:30 PM
F173667227: D27496.id80397.diff
Sun, Sep 27, 2:25 PM
F173660072: D27496.id80396.diff
Sun, Sep 27, 1:16 PM
F173626354: D27496.id.diff
Sun, Sep 27, 6:52 AM
F173625026: D27496.id80398.diff
Sun, Sep 27, 6:38 AM
Unknown Object (File)
Fri, Sep 18, 10:42 AM

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
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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.