FreeBSD 11.1 removes cache memory and adds laundry memory. The MIB of
cache memory still exists, but its value is always set to zero.
According to the man page of top(1), the value of laundry memory means
number of dirty pages queued for laundering, suggesting that it should
be added to the 'user' in libgtop because it cannot be freed immediately
without writing out data. Laundry memory was part of inactive memory in
older FreeBSD releases.
FreeBSD systems running on ZFS usually have a large portion of memory
used as ZFS ARC, which has similar purpose to buffer cache of other
filesystems. ZFS ARC can usually be freed quickly when the system needs
more memory, so we don't want to put it in 'user' in libgtop. However,
both buffer cache and ZFS ARC are parts of wired memory, and wired
memory is counted in 'user'. Therefore, we subtract the size of ZFS ARC
from wired memory when calculating 'user' value, making it more useful
to FreeBSD users.
This patch is based on the patch submiited three years ago by
Benoît Dejean <bdejean@gmail.com>.
https://bugzilla.gnome.org/show_bug.cgi?id=748928https://gitlab.gnome.org/GNOME/libgtop/issues/31
The ioctl call used in this patch doesn't seems to be documented. It is
what ifconfig(8) command uses to display the media type, and its usage
can be learned by reading the source code of ifconfig(8).
https://bugzilla.gnome.org/show_bug.cgi?id=770165
Change the value of memory usage from:
Used = Wired
Free = Total - Wired
Shared = 0
Buffer = 0
Cached = Cache
User = Wired - Cache
Locked = Not Supported
To:
Used = Total - Free
Free = Free
Shared = 0
Buffer = Buf
Cached = Cache
User = Active + Wired
Locked = Not Supported
The left-hand side means fields in the glibtop_mem struct and the right-hand
side means the value showed by `top' command. This change should make the value
showed by gnome-system-monitor, which uses `User' field, become closer to
the real memory usage.
All sysctlbyname code in sysdeps/freebsd/mem.c has been moved to separate
functions to make the code cleaner.
fdescfs is the filesystem mounted on /dev/fd to provide access to file
descriptors via filsystem paths. It is not a real filesystem used on disks.
https://bugzilla.gnome.org/show_bug.cgi?id=748790
Defining _KERNEL to include sys/pipe.h subsequently breaks sys/conf.h;
since sys/pipe.h is not meant to be used in userland, and libgtop2 builds
anyway on kFreeBSD without it, don't include it.
https://bugzilla.gnome.org/show_bug.cgi?id=674067
libgeom declares several symbols in GLib's namespace, including
g_close() and it therefore cannot be used from any program that also
uses GLib.
For now, disable the parts of the FreeBSD sysdep that use libgeom.
Hopefully the libgeom API will be changed soon.
https://bugzilla.gnome.org/show_bug.cgi?id=723685
* Correct calculation of CPU time.
* Fix a bug on newer versions of FreeBSD where computing the process map leads
to a tight error loop.
* Add support for the new procstat API to obtain the list of open files and
cwd.
* Use kvm_openfiles instead of kvm_open to better handle error messages.
* Split some modules out into non-suid modules.
* Properly determine the number of CPUs.
https://bugzilla.gnome.org/show_bug.cgi?id=605431
2007-07-01 Benoît Dejean <benoit@placenet.org>
Fixe some problems as well as implements procwd and procopenfiles
for FreeBSD using a wrapper around lsof. This same backend should
also work on kFreeBSD.
Patch by Joe Marcus Clarke <marcus@freebsd.org>
svn path=/trunk/; revision=2617
2007-04-11 Benoît Dejean <benoit@placenet.org>
* *:
Renamed all glibtop_init_xxx functions
to _glibtop_init_xxx so they get internal visibility.
* configure.in:
Bumped version number.
svn path=/trunk/; revision=2569
2007-02-18 Benoît Dejean <benoit@placenet.org>
* configure.in:
* libgtop-sysdeps.m4:
* sysdeps/Makefile.am:
Huge (k)FreeBSD update.
(k)FreeBSD support is freebsd/
Other BSD are in bsd/
Patch by Joe Marcus Clarke <marcus@freebsd.org>
Alexander Nedotsukov <bland@FreeBSD.org>
Closes#407693.
svn path=/trunk/; revision=2557