0642c2d610
Turn glibtop::machine from a value to a pointer, allocated on init. This hides the glibtop_machine implementation.
Benoit Dejean2015-07-21 21:25:44 +02:00
42e860e5ad
Add uid/euid/gid/egid members to struct glibtop.
Benoit Dejean2015-07-21 10:02:36 +02:00
8f2f236404
No use for glibtop_machine for now, but who knows in the future.
Benoit Dejean2015-07-21 09:40:56 +02:00
f2e57d9fec
Don't define twice glibtop_global_server and server_features. I don't know how the linker was even able to cope with that.
Benoit Dejean2015-07-18 22:10:05 +02:00
1481823085
Use the server parameter, not the global/default one.
Benoit Dejean2015-07-18 22:08:52 +02:00
5ee8d4cb58
It's been 26 years since C89, let modern compilers do what they want.
Benoit Dejean2015-07-18 15:56:42 +02:00
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.
Benoit Dejean2015-07-18 15:08:08 +02:00
6239438dce
Check the command value even if !LIBGTOP_ENABLE_DEBUG.
Benoit Dejean2015-06-28 16:36:23 +02:00
0099cbb6b4
Rework logic by turning two dark while into fors. Also, if kvm_read fail, exit rather than looping forever.
Benoit Dejean2015-06-28 10:24:33 +02:00
cd5649f326
Print message to stderr at once, to avoid mixups.
Benoit Dejean2015-06-28 00:56:59 +02:00
185396d674
Check getloadavg() return value and call the function directly on the glibtop_loadavg buffer member.
Benoit Dejean2015-06-27 23:17:46 +02:00
172f0a50ba
Convert lots of fprintf(stderr, ...) to glibtop_debug*().
Benoit Dejean2015-06-21 22:39:11 +02:00
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.
Benoit Dejean2015-06-21 22:35:52 +02:00
b2a2f6b5c2
Print client and server pids in messages.
Benoit Dejean2015-06-21 22:35:14 +02:00
6bdb9a76eb
Fixed glibtop_debug for calls without arguments.
Benoit Dejean2015-06-21 21:44:32 +02:00
fd29dae933
Always define LIBGTOP_ENABLE_DEBUG (0|1) to be used in if() statements.
Benoit Dejean2015-06-21 21:43:43 +02:00
65c5ca842f
Add a level (DEBUG, WARNING, ERROR) to printing functions.
Benoit Dejean2015-06-21 21:05:11 +02:00
ca6cabe41d
For processes with threads, only reports the pid once. On my system, this brings proclist's output from +300 to 72.
Benoit Dejean2015-06-21 20:23:27 +02:00
214c3635da
The perl generator for the *_l() functions does not need to know about the glibtop_* struct layout, so drop this from the definitions.
Benoit Dejean2015-06-21 19:13:35 +02:00
fba67da65d
Reorder GI annotations and remove duplicate for _l().
Benoit Dejean2015-06-21 18:17:57 +02:00
598764c171
Add gtk-doc annotations for the glibtop_init functions. Their return value should not be freed. This fixes usage from gnome-instrospection (invalid free).
Benoît Dejean2015-03-11 14:44:29 +01:00
aa7f9df00e
Drop --with-libgtop-smp. No code uses this switch.
Benoît Dejean2015-03-05 23:43:29 +01:00
4c4466292e
Fixed sscanf format string as arguments are unsigned ints.
Benoît Dejean2014-12-29 22:30:20 +01:00
fcc1d9d957
Add support for linux x.y versioning schema
Ionut Biru2011-10-22 21:58:30 +03:00
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.
Benoît Dejean2014-04-14 09:34:52 +02:00