rolandriegel / nload

Real-time network traffic monitor
GNU General Public License v2.0
305 stars 35 forks source link

Series enhancement for unit prefix #6

Open Low-power opened 4 years ago

Low-power commented 4 years ago

This change fix and add followings:

Option -u and -U handling has been changed to support select binary or metric prefix, as following format: [-u h|b|k|m|g|H|B|K|M|G[i|s]] [-U h|b|k|m|g|H|B|K|M|G[i|s]]

The optional second character could be used in argument of -u and -U, that specfiying IEC (i) or SI (s) prefix. Since nload has previously always use binary prefixes for data calculation, IEC binary prefix is the default.

The help message has been updated accordingly.

For example to use human readable metric prefix with bit for data rate, and gibi binary prefix with byte for total amount of data, run: nload -u hs -U Gi

Low-power commented 2 years ago

The latest commit added some additional larger units as requested in #13.