ProgrammersOfVilnius / pov-check-health

Debian package that runs basic system health monitoring checks hourly from cron
https://launchpad.net/~pov/+archive/ppa
2 stars 0 forks source link

free: invalid option -- 'o' #18

Closed mgedmin closed 8 years ago

mgedmin commented 8 years ago

On Ubuntu 16.04 LTS checkram produces the following

free: invalid option -- 'o'

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).
/usr/sbin/check-health: 331: [: Illegal number: 

See also #13 where the use of free -o was introduced.

mgedmin commented 8 years ago

Oops, my fix is incorrect: not only does the new procps drop support for -o, but it changes the meaning of columns 5 and 6 (instead of buffers and cache you get buffers+cache and available).

This means now checkram is double-counting free memory!

PrakashVeerasamy commented 7 years ago

for me replacing -o with -e is working..

mgedmin commented 7 years ago

My free (from procps 3.3.12) doesn't know about -e.