summaryrefslogtreecommitdiff
path: root/sysdeps/linux
Commit message (Collapse)AuthorAgeFilesLines
* Code clean up and add exampleJames Dominic P. Guana2020-11-042-10/+25
|
* Handle LVM and RAIDJames Dominic P. Guana2020-11-043-32/+217
|
* New API to retrieve disk stats in LinuxJames Dominic P. Guana2020-11-045-1/+119
|
* Fixed 3 old compile warnings.Benoît Dejean2018-07-222-3/+3
|
* glibtop_get_proc_map on Linux doesn't need to be SUID.Benoît Dejean2018-03-263-11/+337
| | | | | Revert this proof of concept. Add C file with comments to document how to make a call SUID.
* Make linux build with server.Benoît Dejean2018-03-266-5/+148
| | | | | Add suid infrastructure. Demo proc_map.
* Rename GLIBTOP_SUID_PROC_FILE to GLIBTOP_SUID_PROC_OPEN_FILES.Benoît Dejean2018-03-071-1/+1
| | | | | | | | | 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.
* Regenerate with gperf-3.1.Benoît Dejean2017-08-311-21/+14
|
* Prepended disk io struct fields with disk_ prefixRobert Roth2017-05-121-6/+6
|
* Renamed procdiskio to procioRobert Roth2017-05-123-11/+11
|
* 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-123-1/+68
|
* 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
* 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>
* glibtop_machine is defined in glibtop.h.Benoit Dejean2015-08-151-2/+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.
* Define glibtop_machine for Linux as empty because it's not used.Benoît Dejean2015-08-081-5/+1
| | | | Fix compilation.
* No use for glibtop_machine for now, but who knows in the future.Benoit Dejean2015-08-081-5/+2
|
* Remove useless/meaningless calls to glibtop_init_[prs]() with ↵Benoit Dejean2015-08-082-2/+0
| | | | sysdeps/{freebsd,linux}.
* Don't include the ':' in smaps keys.Benoit Dejean2015-08-083-62/+60
| | | | Regenerate the hashtable.
* Fix autotools deprecation warning with s/INCLUDES/AM_CPPFLAGS/g.Benoit Dejean2015-07-151-1/+1
|
* 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
* Update old FSF address.Robert Roth2014-08-2032-63/+63
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=721514
* Extending the cpu number from 32 to 1024 (bgo #323354, bgo #681632)Jason Xing2013-12-122-2/+4
| | | | | | | | | | | | | | | | | | | | 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
* Linux cpuinfo count fixed for SMP PPC processors (bgo #621831)Robert Roth2013-12-091-1/+2
| | | | | | | | | | | 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
* Log error on statvfs failure.Robert Roth2013-12-091-1/+2
| | | | | | 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
* Increased buffersize to be able to hold larger cpuinfo files (bgo #681632)Robert Roth2013-08-221-1/+1
|
* fsusage: Fix fetching rootfs stats on Fedora 17Cole Robinson2013-01-281-0/+4
| | | | | | | | | 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
* Add missing #include <config.h>Kjartan Maraas2012-01-231-0/+4
|
* Don't printf a string directly but use %s insteadChristian Persch2009-05-082-2/+2
| | | | | | Bug #581725. Signed-off-by: Benoît Dejean <benoit@placenet.org>
* Killed debug message.Benoît Dejean2009-05-031-2/+0
|
* Oops, fix segfault in linux/proc_map.Benoît Dejean2009-05-031-5/+8
| | | | I've commited the wrong patch, got lost in the svn->git change.
* Looks for smaps member using a gperf table instead of usingBenoît Dejean2009-05-034-42/+218
| | | | | bsearch. Brings a 25% boost.
* Don't use sscanf anymore when parsins smaps.Benoît Dejean2009-05-031-1/+70
| | | | That's more code but it brings a 20% speed improvement.
* Always ignore "none" FS type.Benoît Dejean2009-03-311-0/+2
| | | | | | See #577537. svn path=/trunk/; revision=2816
* r2790 | bdejean | 2009-01-12 19:39:44 +0100 (lun 12 jan 2009) | 3 linesBenoît Dejean2009-02-161-4/+24
| | | | | | | Fixed read(2) usage. Closes #468495. svn path=/trunk/; revision=2801
* Fixed potential memory leak.Benoît Dejean2009-01-081-6/+6
| | | | | | | Patch by Vincent Untz <vuntz@gnome.org>. Closes #566611. svn path=/trunk/; revision=2787
* Fixed I/O stats so it works for unpartionned devices (e.g. cdrom).Benoît Dejean2008-06-221-41/+45
| | | | svn path=/trunk/; revision=2757
* Handle new /sys/block/.../stat format for linux >= 2.6.25.Benoît Dejean2008-06-221-4/+36
| | | | | | Closes #539360. svn path=/trunk/; revision=2755
* Put back the old behaviour (no smart pss for now).Benoît Dejean2008-05-241-1/+10
| | | | svn path=/trunk/; revision=2749
* New API to retrieve process CPU affinity.Benoît Dejean2008-05-243-1/+71
| | | | | | Linux implementation. svn path=/trunk/; revision=2748
* Fixed parsing of big /proc/stat for uptime.Benoît Dejean2008-04-281-11/+18
| | | | svn path=/trunk/; revision=2741