summaryrefslogtreecommitdiff
path: root/sysdeps/freebsd
Commit message (Collapse)AuthorAgeFilesLines
* Support FreeBSD 13.0-CURRENT >= 1300062 vm_map_entryNeel Chauhan2019-12-151-0/+16
|
* freebsd: Support laundry memory and ZFS ARCTing-Wei Lan2018-10-251-2/+18
| | | | | | | | | | | | | | | | | | | | | | | | | 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=748928 https://gitlab.gnome.org/GNOME/libgtop/issues/31
* Fix build on freebsd and darwin.Benoît Dejean2018-03-071-0/+1
|
* Fix build for FreeBSD 11.1.Benoit Dejean2017-07-291-0/+37
| | | | | The ufs struct inode has changed a requires a different code to get the device number.
* Implement disk_rbytes and disk_wbytes for FreeBSD.Benoit Dejean2017-05-201-1/+38
|
* Renamed procdiskio to procioRobert Roth2017-05-123-8/+8
|
* Add dummy proc_diskio implementation for FreeBSD.Benoit Dejean2017-02-253-0/+45
|
* freebsd: Support GLIBTOP_IF_FLAGS_WIRELESS in netloadTing-Wei Lan2016-08-201-0/+17
| | | | | | | | 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
* freebsd: Rewrite netload implementation with getifaddrs and ioctlGleb Smirnoff2016-08-201-176/+129
| | | | | | | | | | | | | | | | | | | | | | | Instead of using a documented and official API to get information related to a network interface, the old implementation uses kvm library to access kernel memory directly, which is not easy to understand and can be easily broken by changing kernel symbols or structs. Besides, FreeBSD 11 hides severai required kernel struct definitions from userspace programs, which causes compilation error because the definition of 'struct ifaddr' is not available unless _KERNEL is defined. This patch is primarily authored by Gleb Smirnoff <glebius@FreeBSD.org>, with other simple modification made by Antoine Brodin <antoine@FreeBSD.org>, Koop Mast <kwm@FreeBSD.org> and Ting-Wei Lan <lantw@src.gnome.org> applied. It was first submitted to FreeBSD ports and has been used by FreeBSD users for more than 18 months on all supported versions of FreeBSD. https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=194187 https://svnweb.freebsd.org/changeset/ports/371082 https://github.com/freebsd/freebsd-ports-gnome/commit/be884cd https://github.com/freebsd/freebsd-ports-gnome/commit/422a418 https://github.com/freebsd/freebsd-ports-gnome/commit/a4b1913 https://bugzilla.gnome.org/show_bug.cgi?id=770165
* Fix compilation because glibtop_machine definition has moved.Benoit Dejean2015-08-152-0/+3
|
* glibtop_machine is defined in glibtop.h.Benoit Dejean2015-08-151-2/+0
| | | | Don't duplicate the typedef (error unless C11).
* Turn glibtop::machine from a value to a pointer, allocated on init.Benoit Dejean2015-08-0814-43/+43
| | | | This hides the glibtop_machine implementation.
* Exclude the "idle" kernel process when GLIBTOP_EXCLUDE_IDLE.Benoit Dejean2015-08-081-0/+3
|
* Remove useless/meaningless calls to glibtop_init_[prs]() with ↵Benoit Dejean2015-08-0824-48/+0
| | | | sysdeps/{freebsd,linux}.
* More debug messages to trace euid/egid changes.Benoit Dejean2015-08-081-0/+4
|
* Add some debug code to trace effective GID changes.Benoit Dejean2015-08-081-0/+4
|
* Don't install glibtop_private.h.Benoit Dejean2015-07-181-1/+3
|
* Fix utime/stime/cutime/cstime computation.Benoit Dejean2015-07-181-7/+16
|
* Do the math correctly to avoid loss of precision for rtime.Benoit Dejean2015-07-181-3/+1
| | | | | I've noticed this with system-monitor where all processes got a perfectly round CPU time to the second.
* Rework logic by turning two dark while into fors.Benoit Dejean2015-07-151-28/+20
| | | | Also, if kvm_read fail, exit rather than looping forever.
* Check getloadavg() return value and call the function directlyBenoit Dejean2015-07-151-7/+2
| | | | on the glibtop_loadavg buffer member.
* Convert lots of fprintf(stderr, ...) to glibtop_debug*().Benoit Dejean2015-07-151-3/+1
|
* For processes with threads, only reports the pid once.Benoit Dejean2015-07-151-0/+12
| | | | On my system, this brings proclist's output from +300 to 72.
* Fix autotools deprecation warning with s/INCLUDES/AM_CPPFLAGS/g.Benoit Dejean2015-07-151-1/+1
|
* freebsd: rework system memory usageTing-Wei Lan2015-07-031-28/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Implement dev/inode for mapped files on ZFS.Benoit Dejean2015-06-261-1/+39
|
* Split the code that works only with UFS inode. Will ease new code for ZFS.Benoit Dejean2015-06-261-2/+20
|
* Set the FSUSAGE_(READ|WRITE) flags only we managed to get something. ↵Benoit Dejean2015-06-261-1/+3
| | | | Currently, it doesn't seem to work on ZFS.
* No special case for pid == 0. As of 2015, with FreeBSD 10.1-RELEASE #0 ↵Benoit Dejean2015-06-261-3/+0
| | | | r274401 on amd64, this really works and sets the name to "kernel" for pid == 0.
* The DEBUG macro enabled by --enable-debug is actually LIBGTOP_ENABLE_DEBUG.Benoit Dejean2015-06-261-1/+1
|
* Don't set GLIBTOP_PROC_MEM_SHARE because it's not implemented anymore.Benoit Dejean2015-06-211-4/+4
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=744890
* It doesn't make any sense to count as shared each and every mmaped file. ↵Benoit Dejean2015-06-211-0/+6
| | | | | | Disable that code while we figure how to really do it. https://bugzilla.gnome.org/show_bug.cgi?id=744890
* freebsd: Add fdescfs to the ignored filesystem listTing-Wei Lan2015-06-141-0/+1
| | | | | | | 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
* Update old FSF address.Robert Roth2014-08-2035-69/+69
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=721514
* Don't include sys/pipe.h on kFreeBSDLIBGTOP_2_30_0Steven Chamberlain2014-04-291-3/+0
| | | | | | | 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
* freebsd: don't link to libgeomRyan Lortie2014-02-202-4/+4
| | | | | | | | | | | 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
* Fix build issues on FreeBSDTing-Wei Lan2014-02-201-4/+0
|
* kFreeBSD 8.0 build fixPetr Salinger2011-08-301-2/+2
| | | | | fixes a couple of checks for kFreeBSD 8.0. https://bugzilla.gnome.org/show_bug.cgi?id=608518
* Fix numerous bigs in the FreeBSD backendJoe Marcus Clarke2011-06-2710-86/+201
| | | | | | | | | | | | | * 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
* freebsd: Fix get_mem() on 64-bit systems (bgo#630128)Alexander Kojevnikov2010-10-031-2/+2
|
* Improved freebsd port.Benoît Dejean2008-08-189-11/+543
| | | | | | | Patch by Joe Marcus Clarke <marcus@freebsd.org>. Closes #548184. svn path=/trunk/; revision=2767
* Fixed build on GNU/kFreeBSD.Benoît Dejean2008-01-051-2/+4
| | | | | | | Patch by Petr Salinger <Petr.Salinger@seznam.cz>. Closes #507430. svn path=/trunk/; revision=2698
* Fixed unit of vsize and resident.Benoît Dejean2008-01-051-2/+2
| | | | | | | Patch by Kuang-che Wu <kcwu@csie.org>. Closes #506889. svn path=/trunk/; revision=2697
* Forgot to add these files.Benoît Dejean2007-07-023-0/+215
| | | | svn path=/trunk/; revision=2618
* Fixe some problems as well as implements procwd and procopenfiles forBenoît Dejean2007-07-015-14/+158
| | | | | | | | | | | | 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
* Got rid of G_GNUC_INTERNAL.Benoît Dejean2007-05-311-1/+0
| | | | svn path=/trunk/; revision=2601
* Got rid of G_GNUC_INTERNAL.Benoît Dejean2007-05-311-2/+2
| | | | svn path=/trunk/; revision=2600
* Renamed all glibtop_init_xxx functions to _glibtop_init_xxx so they getBenoît Dejean2007-04-1123-23/+23
| | | | | | | | | | | | | | | 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
* Removed noisy $Id$.Benoît Dejean2007-02-1929-58/+0
| | | | | | | | | | 2007-02-20 Benoît Dejean <benoit@placenet.org> * *: Removed noisy $Id$. svn path=/trunk/; revision=2558
* Huge (k)FreeBSD update. (k)FreeBSD support is freebsd/ Other BSD are inBenoît Dejean2007-02-1831-2219/+1062
| | | | | | | | | | | | | | | | | | | 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