summaryrefslogtreecommitdiff
path: root/sysdeps
Commit message (Collapse)AuthorAgeFilesLines
...
| * Add dummy proc_diskio implementation for FreeBSD.Benoit Dejean2017-02-253-0/+45
| |
| * Set glibtop_proc_diskio.flags.Benoît Dejean2017-02-211-0/+4
| | | | | | | | Check linux version code before reading /proc/PID/io.
| * New API to retrieve process io stats, with Linux implementationRobert Roth2017-02-127-1/+130
| |
* | Add NULL pointer checker (bug found with scan-build).Benoît Dejean2017-05-011-1/+1
|/
* When parsing /proc/cpuinfo, ignore paragraphs that do not describe a CPU/core.Benoît Dejean2017-01-281-6/+14
|
* Use g_ascii_isspace instead of isspace because the later is slower and weBenoît Dejean2017-01-222-2/+2
| | | | only need to deal with ascii.
* Do not cache getpagesize(), it is already.Benoît Dejean2017-01-224-20/+2
|
* Use a dynamically allocated buffer to read /proc/cpuinfo to handle computersBenoît Dejean2017-01-221-2/+6
| | | | | | with a lot of CPUs. https://bugzilla.gnome.org/show_bug.cgi?id=323354
* Fixed indentation problemRobert Roth2016-11-271-1/+1
|
* procstate: Fill in last_processor member on linuxFlorian Müllner2016-11-271-0/+3
| | | | | | | | The field was added almost 20 years ago, but has only been set on Solaris so far. It turns out we have a use for it now in the new "Usage" application, so also fill it in on Linux. https://bugzilla.gnome.org/show_bug.cgi?id=775182
* 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 building on musl-libcKylie McClain2016-02-161-2/+2
| | | | | | | | | | | | libgtop fails to build on musl libc, due to the header resulting in the headers that would be loaded for libc 5 being loaded on musl libc. musl defines headers which are also defined in linux-headers' in.h, causing redefinition errors. https://bugzilla.gnome.org/show_bug.cgi?id=760655 Signed-off-by: Benoît Dejean <bdejean@gmail.com>
* openbsd: only PID 1 is special (init)Antoine Jacoutot2016-01-121-5/+2
|
* Add various headers to unbreak compilationJasper Lievisse Adriaanse2015-12-114-0/+7
|
* PROT_EXECUTE -> PROT_EXECJasper Lievisse Adriaanse2015-12-111-1/+1
|
* Fix compilation because glibtop_machine definition has moved.Jasper Lievisse Adriaanse2015-12-112-1/+3
|
* Fix Darwin build.Benoît Dejean2015-08-182-0/+4
| | | | | Patch by David Evans. Bug https://bugzilla.gnome.org/show_bug.cgi?id=753743 .
* Fix compilation because glibtop_machine definition has moved.Benoit Dejean2015-08-152-0/+3
|
* glibtop_machine is defined in glibtop.h.Benoit Dejean2015-08-1510-20/+0
| | | | Don't duplicate the typedef (error unless C11).
* Implement glibtop_map_entry Pss and Swap.Benoit Dejean2015-08-153-35/+32
| | | | Regenerate hash function for fast parsing.
* server->machine is now a pointer, so propagate the change from . to ->.Benoît Dejean2015-08-0875-322/+322
|
* Define glibtop_machine for Linux as empty because it's not used.Benoît Dejean2015-08-081-5/+1
| | | | Fix compilation.
* Turn glibtop::machine from a value to a pointer, allocated on init.Benoit Dejean2015-08-0814-43/+43
| | | | This hides the glibtop_machine implementation.
* No use for glibtop_machine for now, but who knows in the future.Benoit Dejean2015-08-081-5/+2
|
* 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-0826-50/+0
| | | | sysdeps/{freebsd,linux}.
* Don't include the ':' in smaps keys.Benoit Dejean2015-08-083-62/+60
| | | | Regenerate the hashtable.
* 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.
* Print message to stderr at once, to avoid mixups.Benoit Dejean2015-07-151-27/+29
|
* 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
|
* Define glibtop_debug(_r) as macros, eventually calling real C function.Benoit Dejean2015-07-151-1/+1
| | | | | | | Keep these as macros so that if debug is not enable, although the debug message is parsed, it's not run. It's better this way because the debug message is always parsed and checked instead of being deleted by the preprocessor.
* Print client and server pids in messages.Benoit Dejean2015-07-151-2/+11
|
* Add a level (DEBUG, WARNING, ERROR) to printing functions.Benoit Dejean2015-07-151-8/+31
|
* Add proper (and private) debug functions glibtop_debug*Benoit Dejean2015-07-151-0/+19
|
* 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-1513-13/+13
|
* Provide stats about shared memory and account Slab as cached.Benoît Dejean2015-07-141-2/+3
| | | | This matches exactly `free`.
* Fixed sscanf format string as arguments are unsigned ints.Benoît Dejean2015-07-101-1/+1
|
* Add support for linux x.y versioning schemaIonut Biru2015-07-101-1/+5
| | | | | | Since linux 3.0, a valid version can have two digits Signed-off-by: Ionut Biru <ibiru@archlinux.org>
* Linux >= 3.14 provides a "MemAvailable" field in /proc/meminfo which gives theBenoît Dejean2015-07-101-1/+7
| | | | | | | | estimated amount of memory available for applications. Use this to compute glibtop_mem::user. https://bugzilla.gnome.org/show_bug.cgi?id=727543. https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/fs/proc/meminfo.c?id=34e431b0ae398fc54ea69ff85ec700722c9da773
* 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
|