NanXiao / free

free command for OpenBSD.
BSD 3-Clause "New" or "Revised" License
26 stars 8 forks source link

seems the -m option isn't available #5

Closed Tcll closed 4 years ago

Tcll commented 4 years ago

on linux I have this command for the genmon xfce plugin: free -m | awk 'FNR>1 && FNR<4 (printf "%s %d / %d MiB\n", $1,$3,$2 )'

which prints part of this nice corner-display on my top-bar: 4

this is possible since the -m or --mebi option represents mebibytes (1024^2), and can be displayed accurately.

NanXiao commented 4 years ago

@Tcll I added `-m' option in this commit (https://github.com/NanXiao/free/commit/62e9c181e7f5b38e5dfb923a23d6cacd20928168). Could you try latest code? Thanks!

Tcll commented 4 years ago

sadly, I can't at this current moment... during the time it took you to respond, I'd made a decision to move to Void Linux on the machine in question since OpenBSD lacked too much functionality I'd intended to use (from Nemo, to ZFS support)

I'll try OpenBSD again when it's a little more mature, but for now Void seems to be my best option.

perhaps someone else can take over on this issue for now :)

EDIT: also just to note, heres the output from $ free --help:

Usage:
 free [options]

Options:
 -b, --bytes         show output in bytes
 -k, --kilo          show output in kilobytes
 -m, --mega          show output in megabytes
 -g, --giga          show output in gigabytes
     --tera          show output in terabytes
 -h, --human         show human-readable output
     --si            use powers of 1000 not 1024
 -l, --lohi          show detailed low and high memory statistics
 -t, --total         show total for RAM + swap
 -s N, --seconds N   repeat printing every N seconds
 -c N, --count N     repeat printing N times, then exit
 -w, --wide          wide output

     --help     display this help and exit
 -V, --version  output version information and exit

For more details see free(1).

EDIT2: apparently the help on my Void installation's version is better:


Usage:
 free [options]

Options:
 -b, --bytes         show output in bytes
     --kilo          show output in kilobytes
     --mega          show output in megabytes
     --giga          show output in gigabytes
     --tera          show output in terabytes
     --peta          show output in petabytes
 -k, --kibi          show output in kibibytes
 -m, --mebi          show output in mebibytes
 -g, --gibi          show output in gibibytes
     --tebi          show output in tebibytes
     --pebi          show output in pebibytes
 -h, --human         show human-readable output
     --si            use powers of 1000 not 1024
 -l, --lohi          show detailed low and high memory statistics
 -t, --total         show total for RAM + swap
 -s N, --seconds N   repeat printing every N seconds
 -c N, --count N     repeat printing N times, then exit
 -w, --wide          wide output

     --help     display this help and exit
 -V, --version  output version information and exit

For more details see free(1).```
NanXiao commented 4 years ago

@Tcll Sure! I will close this issue now. When you have further comments, plz contact me in the future, thanks!