Benoit Dejean
4e57a6222d
Don't install glibtop_private.h.
2015-07-18 22:07:59 +02:00
Benoit Dejean
1dbe133a24
Fix utime/stime/cutime/cstime computation.
2015-07-18 20:46:07 +02:00
Benoit Dejean
3bd720ad81
Do the math correctly to avoid loss of precision for rtime.
...
I've noticed this with system-monitor where all processes got
a perfectly round CPU time to the second.
2015-07-18 15:46:26 +02:00
Benoit Dejean
0099cbb6b4
Rework logic by turning two dark while into fors.
...
Also, if kvm_read fail, exit rather than looping forever.
2015-07-15 18:39:06 +02:00
Benoit Dejean
cd5649f326
Print message to stderr at once, to avoid mixups.
2015-07-15 18:39:06 +02:00
Benoit Dejean
185396d674
Check getloadavg() return value and call the function directly
...
on the glibtop_loadavg buffer member.
2015-07-15 18:39:06 +02:00
Benoit Dejean
172f0a50ba
Convert lots of fprintf(stderr, ...) to glibtop_debug*().
2015-07-15 18:38:28 +02:00
Benoit Dejean
887092a05d
Define glibtop_debug(_r) as macros, eventually calling real C function.
...
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.
2015-07-15 18:38:27 +02:00
Benoit Dejean
b2a2f6b5c2
Print client and server pids in messages.
2015-07-15 18:38:27 +02:00
Benoit Dejean
65c5ca842f
Add a level (DEBUG, WARNING, ERROR) to printing functions.
2015-07-15 18:38:27 +02:00
Benoit Dejean
82ff91b74c
Add proper (and private) debug functions glibtop_debug*
2015-07-15 18:38:27 +02:00
Benoit Dejean
ca6cabe41d
For processes with threads, only reports the pid once.
...
On my system, this brings proclist's output from +300 to 72.
2015-07-15 18:38:27 +02:00
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