Commit Graph

5 Commits

Author SHA1 Message Date
Matt McCormick
4fd854ce16 Give the MEMORY_MODE enum a name.
This improves readability. Also, set the default value in one place in the
declaration.
2016-02-10 16:47:29 -05:00
cousine
0e89998ee4 Add new mode to other platforms and indicate mac only support in README 2016-02-10 17:38:11 +02:00
Tony Narlock
c036017db3 Fix FreeBSD memory usage
Total memory would go out of bounds for machines ~ > 3.5gB of
memory due to the limit of what u_int can hold.

Use ``getpagesize()`` and bitshift pagesize so it fits.

See also: https://github.com/thewtex/tmux-mem-cpu-load/issues/29
2016-01-09 10:41:28 -06:00
Pawel "l0ner" Soltys
869d43f102 Fixed RAM usage calculation on FreeBSD
- Instead of displaying hardware ram quantity, display ram available to be
  allocated by applications. FreeBSD uses some ram for kernel, segment mappings
  and other stuff. Those memory pages are not available for allocation by
  applications.
- Calculate correctly ram usage. Active + Wired (buffers). Nothing else.

For more info see:
- http://www.cyberciti.biz/files/scripts/freebsd-memory.pl.txt
- conky source code on github
- output of top and vmstat on FreeBSD
- http://www.zabbix.com/forum/showthread.php?t=21826
- https://support.zabbix.com/browse/ZBXNEXT-774

htop on FreeBSD uses linux procfs compatibility layer, and thus it's readings
are a little off.
2015-02-13 18:46:28 +01:00
Pawel "l0ner" Soltys
112004f3db FreeBSD and OpenBSD ports
- Removed OpenBSD stuff from freebsd port
- Renamed bsd folder to freebsd since now it contains only
  freebsd-relevant files.
- Changed CMake instructions to account for bsd port changes
- modified main source file to account for openbsd port
2015-01-20 15:03:48 +01:00