Commit Graph

318 Commits

Author SHA1 Message Date
ToMe25
079b9e17c5 Fix get_from_pipe potentially reading more bytes than its buffer size 2023-08-04 11:10:55 +00:00
Robert Antoni Buj Gelonch
f7a00681a9 ZFS on Linux don't should be added to ignore list
See https://github.com/mate-desktop/mate-system-monitor/pull/146
2023-01-10 07:58:12 +02:00
Andrea Azzarone
9d385bdd1a Ignore file systems if mounted with x-gdu.hide userspace mount option.
Scan /run/mount/utab file if present and hide all file systems mounted with x-gdu.hide
userspace mount options.

https://gitlab.gnome.org/GNOME/libgtop/issues/38
2023-01-10 05:44:39 +00:00
James Dominic P. Guana
f92f6ea029 Add sysinfo example
Retrieve cpu model via hashtable & number of logical cpu via exposed variable

Signed off: Dr. James Dominic P. Guana <jdpguana@histark.com>
2022-03-28 12:32:26 +00:00
Dr. James Dominic P. Guana
629097436a Exposes the processor model
Accessing processor model becomes easier

Signed off: Dr. James Dominic P. Guana <jdpguana@histark.com>
2022-03-28 12:32:26 +00:00
Dr. James Dominic P. Guana
1e3547406a Add processor model
Add processor model

Signed off: Dr. James Dominic P. Guana <jdpguana@histark.com>
2022-03-28 12:32:26 +00:00
Avinash Sonawane
f5ced2028d Declare functions as static to silence clang warnings 2022-03-28 07:59:57 +00:00
Avinash Sonawane
1cb23c7b83 Place parentheses to silence clang warnings 2022-03-28 07:59:57 +00:00
James Dominic P. Guana
e68d20f739 Skip loop and rom 2022-03-28 04:55:26 +00:00
James Dominic P. Guana
48ad21d329 Skip loop and rom 2022-03-28 04:55:26 +00:00
ToMe25
24555c48d0 Copy stub sysdeps files to other OS impls to reduce compile errors. 2021-04-24 14:58:33 +02:00
James Dominic P. Guana
b738a0ae09 Revert "Revert "Updated config and added reference""
This reverts commit 2229253e11.
2021-04-23 09:48:11 +00:00
James Dominic P. Guana
2ec1815e6c Revert "Revert "Code clean up and add example""
This reverts commit ea08151ae6.
2021-04-23 09:48:11 +00:00
James Dominic P. Guana
48595809ed Revert "Revert "Handle LVM and RAID""
This reverts commit 30bf8d0418.
2021-04-23 09:48:11 +00:00
James Dominic P. Guana
a067db0569 Revert "Revert "New API to retrieve disk stats in Linux""
This reverts commit 7e214414bf.
2021-04-23 09:48:11 +00:00
Michael Catanzaro
7e214414bf Revert "New API to retrieve disk stats in Linux"
This reverts commit 9e62440b31.
2020-11-06 09:52:01 -06:00
Michael Catanzaro
30bf8d0418 Revert "Handle LVM and RAID"
This reverts commit 9cbb3b91f1.
2020-11-06 09:52:00 -06:00
Michael Catanzaro
ea08151ae6 Revert "Code clean up and add example"
This reverts commit 7396970afe.
2020-11-06 09:52:00 -06:00
Michael Catanzaro
2229253e11 Revert "Updated config and added reference"
This reverts commit e9da959773.
2020-11-06 09:51:58 -06:00
James Dominic P. Guana
e9da959773 Updated config and added reference 2020-11-04 13:38:03 +00:00
James Dominic P. Guana
7396970afe Code clean up and add example 2020-11-04 13:38:03 +00:00
James Dominic P. Guana
9cbb3b91f1 Handle LVM and RAID 2020-11-04 13:38:03 +00:00
James Dominic P. Guana
9e62440b31 New API to retrieve disk stats in Linux 2020-11-04 13:38:03 +00:00
Benoît Dejean
7c811a7826 Fixed 3 old compile warnings. 2018-07-22 12:23:11 +02:00
Benoît Dejean
e4335d4db2 glibtop_get_proc_map on Linux doesn't need to be SUID.
Revert this proof of concept.
Add C file with comments to document how to make a call SUID.
2018-03-26 18:15:26 +02:00
Benoît Dejean
ec662d01da Make linux build with server.
Add suid infrastructure.
Demo proc_map.
2018-03-26 17:44:43 +02:00
Benoît Dejean
c65cb3e46b Rename GLIBTOP_SUID_PROC_FILE to GLIBTOP_SUID_PROC_OPEN_FILES.
The previous name is incorrect and inconsistent with the code generated
by lib.pl.
Also add missing hooks.

This symbol, although exposed in public headers is not part of the API
and is only used internally.
2018-03-07 19:44:41 +01:00
Benoît Dejean
f38d9c6523 Regenerate with gperf-3.1. 2017-08-31 18:10:21 +02:00
Robert Roth
5880e04fcc Prepended disk io struct fields with disk_ prefix 2017-05-12 05:14:17 +03:00
Robert Roth
1bf16bfffd Renamed procdiskio to procio 2017-05-12 05:08:41 +03:00
Benoît Dejean
1defc74f07 Set glibtop_proc_diskio.flags.
Check linux version code before reading /proc/PID/io.
2017-02-21 12:50:37 +01:00
Robert Roth
dff7c5588e New API to retrieve process io stats, with Linux implementation 2017-02-12 17:59:08 +02:00
Benoît Dejean
1a103bf142 When parsing /proc/cpuinfo, ignore paragraphs that do not describe a CPU/core. 2017-01-28 09:39:43 +01:00
Benoît Dejean
01a56e2e30 Use g_ascii_isspace instead of isspace because the later is slower and we
only need to deal with ascii.
2017-01-22 10:45:26 +01:00
Benoît Dejean
7afc81f99d Do not cache getpagesize(), it is already. 2017-01-22 10:45:26 +01:00
Benoît Dejean
b0ab056e99 Use a dynamically allocated buffer to read /proc/cpuinfo to handle computers
with a lot of CPUs.

https://bugzilla.gnome.org/show_bug.cgi?id=323354
2017-01-22 10:45:26 +01:00
Robert Roth
70e00a0262 Fixed indentation problem 2016-11-27 20:10:00 +02:00
Florian Müllner
f99bb61446 procstate: Fill in last_processor member on linux
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
2016-11-27 20:07:20 +02:00
Kylie McClain
94968b4406 Fix building on musl-libc
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>
2016-02-16 18:12:00 +01:00
Benoit Dejean
c9e73e52ac glibtop_machine is defined in glibtop.h.
Don't duplicate the typedef (error unless C11).
2015-08-15 10:56:41 +02:00
Benoit Dejean
4c455ac8a0 Implement glibtop_map_entry Pss and Swap.
Regenerate hash function for fast parsing.
2015-08-15 10:39:39 +02:00
Benoît Dejean
ca42f1f3af Define glibtop_machine for Linux as empty because it's not used.
Fix compilation.
2015-08-08 11:11:30 +02:00
Benoit Dejean
8f2f236404 No use for glibtop_machine for now, but who knows in the future. 2015-08-08 11:00:57 +02:00
Benoit Dejean
d817bee619 Remove useless/meaningless calls to glibtop_init_[prs]() with sysdeps/{freebsd,linux}. 2015-08-08 10:56:25 +02:00
Benoit Dejean
d3a247a60f Don't include the ':' in smaps keys.
Regenerate the hashtable.
2015-08-08 10:56:24 +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