Benoit Dejean
119049b8c0
Fix autotools deprecation warning with s/INCLUDES/AM_CPPFLAGS/g.
2015-07-15 18:24:29 +02:00
Benoît Dejean
c33623c097
Provide stats about shared memory and account Slab as cached.
...
This matches exactly `free`.
2015-07-14 11:11:38 +02:00
Benoît Dejean
4c4466292e
Fixed sscanf format string as arguments are unsigned ints.
2015-07-10 20:36:12 +02:00
Ionut Biru
fcc1d9d957
Add support for linux x.y versioning schema
...
Since linux 3.0, a valid version can have two digits
Signed-off-by: Ionut Biru <ibiru@archlinux.org >
2015-07-10 20:36:12 +02:00
Benoît Dejean
0580b2fb2c
Linux >= 3.14 provides a "MemAvailable" field in /proc/meminfo which gives the
...
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
2015-07-10 20:36:12 +02:00
Ting-Wei Lan
a206cfc728
freebsd: rework system memory usage
...
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.
2015-07-03 22:42:07 +08:00
Benoit Dejean
50b5dea402
Implement dev/inode for mapped files on ZFS.
2015-06-26 02:57:41 +03:00
Benoit Dejean
f4b23ef0c6
Split the code that works only with UFS inode. Will ease new code for ZFS.
2015-06-26 02:57:41 +03:00
Benoit Dejean
c7f7e5a1c6
Set the FSUSAGE_(READ|WRITE) flags only we managed to get something. Currently, it doesn't seem to work on ZFS.
2015-06-26 02:57:41 +03:00
Benoit Dejean
b2fee3e111
No special case for pid == 0. As of 2015, with FreeBSD 10.1-RELEASE #0 r274401 on amd64, this really works and sets the name to "kernel" for pid == 0.
2015-06-26 02:57:41 +03:00
Benoit Dejean
d006da7e54
Drop dead file,
2015-06-26 02:57:41 +03:00
Benoit Dejean
a93dc2526d
The DEBUG macro enabled by --enable-debug is actually LIBGTOP_ENABLE_DEBUG.
2015-06-26 02:57:41 +03:00
Benoit Dejean
0057bbbc47
Don't set GLIBTOP_PROC_MEM_SHARE because it's not implemented anymore.
...
https://bugzilla.gnome.org/show_bug.cgi?id=744890
2015-06-21 10:57:11 +08:00
Benoit Dejean
e6d776ee61
It doesn't make any sense to count as shared each and every mmaped file. Disable that code while we figure how to really do it.
...
https://bugzilla.gnome.org/show_bug.cgi?id=744890
2015-06-21 10:56:39 +08:00
Juan RP
c68e077909
Implemented procaffinity for netBSD.
...
https://bugzilla.gnome.org/show_bug.cgi?id=553713
2015-06-20 03:35:56 +03:00
Juan RP
72e46fc6b4
Define some GLIBTOP_SUID constants to build procaffinity on NetBSD
...
https://bugzilla.gnome.org/show_bug.cgi?id=553713
2015-06-20 03:33:42 +03:00
Juan RP
2ea8a156f3
Enable procaffinity.c on sysdeps/bsd/Makefile.am.
...
(Please also double check the author and subject.)
https://bugzilla.gnome.org/show_bug.cgi?id=553713
2015-06-20 03:33:42 +03:00
Ting-Wei Lan
40e1a86d52
freebsd: Add fdescfs to the ignored filesystem list
...
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
2015-06-14 14:19:24 +08:00
Ryan Lortie
bea8b6790a
stub sysdep: add some missing files
...
https://bugzilla.gnome.org/show_bug.cgi?id=724196
2015-01-03 15:12:10 +02:00
Ryan Lortie
5e6c25d29d
stub sysdep: add missing defines
...
https://bugzilla.gnome.org/show_bug.cgi?id=724196
2015-01-03 15:12:10 +02:00
Ryan Lortie
b7e1219e0a
stub sysdep: fix mismatched function vs. prototype
...
https://bugzilla.gnome.org/show_bug.cgi?id=724196
2015-01-03 15:12:10 +02:00
Jasper Lievisse Adriaanse
057dcf77d6
Sync with OpenBSD's uvm_extern.h changes
2014-11-18 19:33:38 +01:00
Jasper Lievisse Adriaanse
b7edd1542e
dkstat.h is going away on OpenBSD, so use sys/sched.h instead for CP_*
2014-09-08 09:36:07 +02:00
Jasper Lievisse Adriaanse
7326f8816d
Add SMP support for OpenBSD
2014-09-01 15:21:31 +02:00
Robert Roth
7a3414d002
Update old FSF address.
...
https://bugzilla.gnome.org/show_bug.cgi?id=721514
2014-08-20 04:44:27 +03:00
Jasper Lievisse Adriaanse
9a887feed2
Unbreak build on OpenBSD after recent header changes.
2014-07-10 13:15:50 +02:00
Steven Chamberlain
d9c01aac4a
Don't include sys/pipe.h on kFreeBSD
...
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
2014-04-29 00:30:07 +03:00
Jasper Lievisse Adriaanse
63ba7b2c12
switch from VM_METER to VM_UVMEXP
2014-04-10 16:32:47 +02:00
Antoine Jacoutot
5371e8ec88
openbsd: drop empty EXTRA_SYSDEPS_LIBS.
...
https://bugzilla.gnome.org/show_bug.cgi?id=727375
2014-03-31 12:50:44 +02:00
Ryan Lortie
2e861977a6
freebsd: don't link to libgeom
...
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
2014-02-20 20:56:57 -05:00
Ting-Wei Lan
a39f290683
Fix build issues on FreeBSD
2014-02-20 20:55:39 -05:00
Antoine Jacoutot
02b55313f3
openbsd: bring glibtop_get_proc_segment from FreeBSD
2014-02-08 11:54:07 +01:00
Antoine Jacoutot
596c42d7f1
openbsd: drop unecessary check
2014-02-08 11:53:26 +01:00
Antoine Jacoutot
4cd3e4fed6
openbsd: merge patches from ports tree
...
Bring OpenBSD closer to FreeBSD to help checking what is missing/different.
Also we make sure to use and build mountlist and fsusage from the
sysdeps/openbsd directory instead of the common one.
https://bugzilla.gnome.org/show_bug.cgi?id=723521
2014-02-03 10:59:05 +01:00
Antoine Jacoutot
c99ceeaa65
openbsd: better handling of p_wchan
2014-02-01 19:09:21 +01:00
Antoine Jacoutot
ecbfade528
openbsd: really drop all lsof related code
2014-01-23 15:03:36 +01:00
Jasper Lievisse Adriaanse
73d4679ad8
Remove OpenBSD RCS ID which bears no meaning here.
2014-01-23 11:24:33 +01:00
Robert Nagy
df1db43032
Fix several issues related to process information on OpenBSD and drop lsof usage.
2014-01-23 10:39:39 +01:00
Jasper Lievisse Adriaanse
ff07ba102f
Some fields have moved in struct proc from timeval to timespec.
2014-01-23 10:34:52 +01:00
Jasper Lievisse Adriaanse
07d2816d5b
Adjust header inclusion on OpenBSD
...
- fixup header inclusion after netinet/in_var.h was made private
- configure fails to define HAVE_NET_IF_VAR_H
2014-01-23 10:30:53 +01:00
Jason Xing
efaaf6eb77
Extending the cpu number from 32 to 1024 (bgo #323354 , bgo #681632 )
...
From: Jason Xing <xinggang861@gmail.com >
In 'Bug 323354 - Support a dynamic number of CPUs', there will be a
solution which can dynamically allocate memory for large number of
CPUs. As libgtop supports multiple operating systems, this work
may take some time.
This patch is a temporary patch, which worked before the whole
solution comes out. It only supports linux platform with CPU number
up to 1024.
There are two Macroes which limit the statistics of CPU. One is
GLIBTOP_NCPU. The other is a buffer size. This buffer used to read
/proc/stat contents into.
https://bugzilla.gnome.org/show_bug.cgi?id=323354
https://bugzilla.gnome.org/show_bug.cgi?id=681632
2013-12-12 22:36:10 +02:00
Robert Roth
47bcd423b5
Linux cpuinfo count fixed for SMP PPC processors (bgo #621831 )
...
libgtop processor count has been simply determined by the number
of sections in /proc/cpuinfo split by \n\n. On PPC processors
supporting SMP after the per-cpu description for each core a
new section is listed (after \n\n) with the common attributes
of the cores [1]. Work around this by only counting a section
as describing a CPU if it contains "processor" to fix bug #621831 [0]
[0] https://bugzilla.gnome.org/show_bug.cgi?id=621831
[1] https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/tree/arch/powerpc/kernel/setup-common.c?id=9fc2105aeaaf56b0cf75296a84702d0f9e64437b#n319
2013-12-09 04:02:38 +02:00
Robert Roth
3147bf2e34
Log error on statvfs failure.
...
When doing stat on a FS and failing, log the error message based
on the errno set to help the user find the reason.
https://bugzilla.gnome.org/show_bug.cgi?id=685172
2013-12-09 01:57:01 +02:00
Antoine Jacoutot
2506662196
OpenBSD: add missing header
...
netinet6/in6_var.h is not included automatically anymore from netinet/in_var.h
on OpenBSD, so explicitely #include <netinet6/in6_var.h>.
2013-10-16 17:09:16 +02:00
Robert Roth
2c08229f04
Merge remote-tracking branch 'origin' into wip/libgtop-ng
2013-08-30 07:34:15 +03:00
Tristan Hill
753d9abb13
proclist, procarg and proctime gtkdoc updates
...
Added gtkdoc for proclist, procarg and proctime.
Author: Tristan Hill <stan@saticed.me.uk >
https://bugzilla.gnome.org/show_bug.cgi?id=616082
2013-08-30 07:31:31 +03:00
Robert Roth
af7e9cd1b6
Increased buffersize to be able to hold larger cpuinfo files (bgo #681632 )
2013-08-22 01:48:12 +03:00
Jasper Lievisse Adriaanse
7a4b2d91ad
unbreak after swapin and swapout were removed from OpenBSD uvm statistics.
2013-05-29 20:59:23 +02:00
Jasper Lievisse Adriaanse
dc7eab4329
Adjust for the fact that regular users cannot read wchan anymore in OpenBSD 5.4.
2013-04-01 13:40:11 +02:00
Cole Robinson
37774dc02d
fsusage: Fix fetching rootfs stats on Fedora 17
...
When fsusage scans mtab, it matches on the first entry, but since 'rootfs'
isn't of the expected format '/dev/<blah>' it bails out.
Match early on any rootfs entries and skip them.
Fixes #685897
2013-01-28 23:02:04 +01:00