aboutsummaryrefslogtreecommitdiff
path: root/src/print_mem.c
AgeCommit message (Collapse)AuthorFilesLines
2019-11-24print_mem: Fix overflow on 32-bit systemszsugabubus1-81/+70
Values stored as `unsigned long` in "/proc/meminfo" but they were handled as `long`. On 32-bit systems with 4G memory it results in integer overflow.
2019-10-26Introduce memory options 'unit' and 'decimals'MK131-8/+12
Previously the format placeholders were auto-converted to the maximum possible unit, e.g. /proc/meminfo reports MemTotal of 16307104kB which will get converted to 15.6GiB. It is now possible to specifiy the target unit, e.g. Mi, which will be used for the conversion - in the example it would lead to 15924.9MiB. The resulting number can now be further formatted via the decimal option. It allows to specify the number of decimals to use, e.g. 15.6GiB vs. 15GiB or 15924.9MiB vs. 15925MiB.
2019-07-29Improve NetBSD port. (#361)Thomas Klausner1-0/+7
Detect and link against ossaudio. Comment out unused code and functions.
2019-01-23Switch to autotools (#316)Michael Stapelberg1-0/+1
2018-07-13able to print percentageFelix Buehler1-19/+13
its now possible to have percentage before and after a variable. except for the date. But percentage with dates does not make much sense to me, so i skipped it.
2018-06-20Avoid assigning a new value to a var before using the old valueOlivier Gayot1-2/+1
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
2018-05-04Simplify the memory thresholdsBenedikt Heine1-36/+52
2018-05-04Rename ram variables consistentlyBenedikt Heine1-44/+45
2018-04-11Implement support for memory-usage on LinuxFelix Buehler1-0/+208