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)
Sun, Oct 20, 4:00 PM
Unknown Object (File)
Mon, Oct 14, 2:55 PM
Unknown Object (File)
Oct 4 2024, 4:11 AM
Unknown Object (File)
Oct 3 2024, 10:21 AM
Unknown Object (File)
Oct 1 2024, 2:57 PM
Unknown Object (File)
Sep 29 2024, 2:39 AM
Unknown Object (File)
Sep 13 2024, 5:43 AM
Unknown Object (File)
Sep 10 2024, 10:22 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
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.