Commit graph

126 commits

Author SHA1 Message Date
aristocratos b87772611c Added definition GPU_SUPPORT to toggle GPU related code 2023-11-25 20:44:45 +01:00
aristocratos 08abf0b930 Quickfixes for MacOS and FreeBSD compilation. 2023-08-27 01:28:36 +02:00
aristocratos a9bc0874d4 Added show_gpu_info setting and Auto options for cpu graphs 2023-08-27 00:31:07 +02:00
aristocratos bd5d697830 Squashed commit of the following:
commit c296ac13cd
Merge: 9a1e760 091c30a
Author: Jakob P. Liljenberg <admin@qvantnet.com>
Date:   Sat Aug 26 19:29:57 2023 +0200

    Merge pull request #590 from nobounce/dangling-reference-config

    Convert parameters and config keys to std::string_view

commit 9a1e760a66
Merge: 9c8af4d 22e64ca
Author: Jakob P. Liljenberg <admin@qvantnet.com>
Date:   Sat Aug 26 19:20:18 2023 +0200

    Merge pull request #602 from jfouquart/main

    Fix getting zfs pool name with '.' char in freebsd

commit 9c8af4df43
Merge: 8a49d8c 2217cbe
Author: Jakob P. Liljenberg <admin@qvantnet.com>
Date:   Sat Aug 26 19:18:55 2023 +0200

    Merge pull request #601 from joske/cleanup

    [macos] don't check /sys on macos

commit 8a49d8cf45
Merge: 1556388 008fcd8
Author: Jakob P. Liljenberg <admin@qvantnet.com>
Date:   Sat Aug 26 19:18:07 2023 +0200

    Merge pull request #600 from joske/makefile

    [macos/freebsd] support gcc13

commit 1556388c83
Merge: 1b126f5 d17e1a2
Author: Jakob P. Liljenberg <admin@qvantnet.com>
Date:   Sat Aug 26 19:14:00 2023 +0200

    Merge pull request #599 from joske/main

    [macos] fix temp sensor on system with many cores

commit d17e1a2dac
Author: Jos Dehaes <jos.dehaes@gmail.com>
Date:   Fri Aug 25 16:18:39 2023 +0200

    fix some warnings

commit 4d8aa6b118
Author: Jos Dehaes <jos.dehaes@gmail.com>
Date:   Fri Aug 25 15:52:58 2023 +0200

    fix core check

commit 22e64caaff
Author: Jonathan Fouquart <jfouquart@hotmail.fr>
Date:   Fri Aug 25 09:37:49 2023 +0200

    Fix getting zfs pool name with '.' char in freebsd

commit 2217cbe143
Author: Jos Dehaes <jos.dehaes@gmail.com>
Date:   Wed Aug 23 16:01:04 2023 +0200

    [macos] don't check /sys on macos

commit 008fcd889e
Author: Jos Dehaes <jos.dehaes@gmail.com>
Date:   Wed Aug 23 16:05:00 2023 +0200

    also add g++13

commit 0fdca5eb03
Author: Jos Dehaes <jos.dehaes@gmail.com>
Date:   Wed Aug 23 15:54:07 2023 +0200

    support gcc13

commit dcbdb7360d
Author: Jos Dehaes <jos.dehaes@gmail.com>
Date:   Wed Aug 23 15:46:47 2023 +0200

    [macos] fix temp sensor on system with many cores

commit 1b126f55e3
Author: aristocratos <gnmjpl@gmail.com>
Date:   Fri Aug 4 01:08:27 2023 +0200

    Update Makefile for partial static compilation on freebsd

commit c8ec6bbb00
Author: aristocratos <gnmjpl@gmail.com>
Date:   Thu Aug 3 23:08:33 2023 +0200

    Fix freebsd nullptr changes and makefile for gcc12 and newer

commit 8a33aab588
Merge: 94e5c02 e4abcef
Author: Jakob P. Liljenberg <admin@qvantnet.com>
Date:   Sun Jul 30 13:21:48 2023 +0200

    Merge pull request #539 from nobounce/replace-NULL-nullptr

    Modernize using nullptr.

commit 94e5c02d11
Author: aristocratos <gnmjpl@gmail.com>
Date:   Thu Jul 27 20:51:21 2023 +0200

    Better text editing

commit 091c30ab2b
Author: nobounce <steffen.winter@proton.me>
Date:   Thu Jul 27 14:17:54 2023 +0200

    Convert parameters and config keys to std::string_view

    Using std::string_view instead of std::string& silences a new warning
    from GCC 13, -Wdangling-reference

    Also switch return type of `getI` from int& to int, trivial types are
    cheaper to copy by value

commit e4abcefbf9
Author: nobounce <steffen.winter@proton.me>
Date:   Wed Jul 26 16:19:17 2023 +0200

    Use nullptr instead of NULL.

    See https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2431.pdf
    TLDR: NULL is of type int and relies on proper implicit pointer
    conversion which may lead to issues when using overloaded functions

    It is also considered a 'best practise' for modern C++ and
    conveys the programmers intention more precisly.

commit d53307f14c
Author: nobounce <steffen.winter@proton.me>
Date:   Sun Jul 23 19:53:36 2023 +0200

    Fix path to Linux CI file in itself

    The CI file has a list of dependent files including itself. The path was
    not updated when the CI was split into different files

commit 594f42b9eb
Merge: aca2e4b 53d6eba
Author: Jakob P. Liljenberg <admin@qvantnet.com>
Date:   Wed Jul 26 15:38:01 2023 +0200

    Merge pull request #584 from nobounce/nb/fix-ci-path

    Fix path to Linux CI file in itself

commit aca2e4be75
Author: aristocratos <gnmjpl@gmail.com>
Date:   Wed Jul 26 14:38:48 2023 +0200

    Fix whitespace indent -> tab indent

commit 33faa01910
Author: aristocratos <gnmjpl@gmail.com>
Date:   Wed Jul 26 14:34:15 2023 +0200

    Revert fmt submodule to static fmt folder in include

commit 53d6ebabc0
Author: nobounce <steffen.winter@proton.me>
Date:   Sun Jul 23 19:53:36 2023 +0200

    Fix path to Linux CI file in itself

    The CI file has a list of dependent files including itself. The path was
    not updated when the CI was split into different files
2023-08-26 20:29:43 +02:00
romner 85fb28cee6 Fix RSMI_STATIC=true and add GPU section to README.md 2023-07-14 02:39:44 +02:00
romner-set 3fad8a6fde Add GPU options 2023-06-26 13:10:31 +02:00
romner-set 746f716a02 Remove lib/rocm_smi_lib and add instructions for obtaining it to README 2023-06-16 11:11:57 +02:00
romner d8ebbe1181 Join NVML PCIe threads only if PCIe TX/RX is supported by GPU 2023-06-08 20:24:01 +02:00
romner be10989151 Parallelize NVML PCIe TX/RX data collection 2023-06-06 19:47:07 +02:00
aristocratos 85892a9fe3 Fix type: ulong -> size_t and compare std::cmp_less 2023-06-05 21:59:26 +02:00
romner daaa45324f Load ROCm SMI dynamically by default, optionally statically compile and link 2023-06-02 15:34:12 +02:00
romner-set b2df0696fd Dynamically load NVML 2023-06-01 03:41:56 +02:00
romner-set 547f17dda3 Add more GPU graph types to the CPU panel 2023-05-30 18:24:50 +02:00
romner 8c96bd51e9 Handle GPUs which cannot report certain stats in GPU panel 2023-05-21 20:34:47 +02:00
romner 414d7eb94c Handle GPUs which cannot report certain stats in btop_collect.cpp and CPU panel 2023-05-21 18:02:50 +02:00
aristocratos 1fee2bc08b Add DebugTimer class and change some Logger::error calls to Logger::debug 2023-05-21 13:52:19 +02:00
aristocratos 8c710a2b68 Makefile auto detection and initial logic for excluding gpu code when libs are missing 2023-05-20 01:41:04 +02:00
romner 22a463976d Add GPU info to CPU panel 2023-05-18 16:07:05 +02:00
romner-set c352bf2613 Add ROCm SMI backend for AMD GPU support 2023-05-15 19:42:55 +02:00
romner-set 917d568a77 Add multi-GPU support for NVML data collection 2023-05-15 13:58:54 +02:00
romner bcffcdf19f Make GPU window's size dynamic and integrate it with the rest of btop 2023-05-14 16:53:06 +02:00
romner 95b3228308 Improve GPU side panel 2023-05-13 19:41:51 +02:00
romner adcdc583b0 Add GPU side panel 2023-05-13 00:27:23 +02:00
romner d522a91ef4 Add rudimentary, fullscreen single-GPU NVML utilization graph 2023-05-12 19:34:47 +02:00
zackiloco 6eb37601d7 Retrieve load average from libc and use emplace_back where appropriate
Get the load average from libc and adjust the internal API. This has
less overhead than opening /proc/loadavg.

Favor emplace_back over push_back, in general it has the chance to not
create a temporary object.
2023-07-05 13:23:11 +02:00
Jakob P. Liljenberg 7e50b03e39
Merge pull request #510 from nobounce/LLVM
Support compiling with LLVM
2023-06-15 17:45:05 +02:00
Mitchell Dorrell 3c6929b025 Fix integer overflows in btop_collect.cpp
Correct data types in calls to std::accumulate(). The "bandwidth" deques
have type "long long", so the initial value of the accumulator (0) must
also be "long long" (i.e., "0ll") to prevent integer overflows. Also,
since since the bandwidth deques are (signed) "long long", the avg_speed
should presumably be a signed "long long" instead of an unsigned
"uint64_t". The previous behavior was for large bandwidth values to
overflow the accumulator, resulting in a negative total, which then was
cast to be a huge "uint64_t" value. As a consequence, the network graph
autoscaling was broken for large bandwidths.
2023-05-26 01:26:21 -04:00
zackiloco a2fa9da073 Replace statvfs64 with statvfs and define _FILE_OFFSET_BITS=64.
On my musl system statvfs64 is not exposed by default. The musl FAQ
recommends against using type64_t types, see:
https://wiki.musl-libc.org/faq.html#Q:-Do-I-need-to-define-%3Ccode%3E_LARGEFILE64_SOURCE%3C/code%3E-to-get-64bit-%3Ccode%3Eoff_t%3C/code%3E?.

Defining `_FILE_OFFSET_BITS=64` and using type_t lets type_t use the 64
bit interface, see:
https://www.gnu.org/software/libc/manual/html_node/Feature-Test-Macros.html#index-_005fFILE_005fOFFSET_005fBITS.
2023-05-25 23:00:07 +02:00
Matt Ickstadt 345bf7c052 Linux: subtract ZFS ARC min size from available memory 2023-02-23 10:59:10 -06:00
aristocratos e67a35df08 Removed unused statement... 2022-11-30 23:18:04 +01:00
aristocratos 9aaffd6b26 Fixed: Use MemFree for used mem calculation if MemAvailable is greater than MemTotal. 2022-11-30 22:41:08 +01:00
aristocratos 5a53fb4a2c Fixed: Process nice value underflowing, issue #461 2022-11-06 11:32:17 +01:00
aristocratos 68f7d1f4bb Fixed: Not picking up last username from /etc/passwd 2022-11-05 22:56:52 +01:00
correabuscar bad9bbc160 make IPBUFFER_MAXSIZE an enum constant
... instead of a macro constant(which made the code less readable!)

Supposedly it also doesn't use run-time storage.
2022-11-04 23:23:27 +01:00
correabuscar 96a22b4078 use inet_ntop instead of getnameinfo
saves 979 bytes of reserved buffer because:
NI_MAXHOST is 1025 bytes
and
INET6_ADDRSTRLEN is 46

Depends on PR #457 being merged first.
2022-11-04 23:23:27 +01:00
correabuscar eec1999a8f Show the first IP of the interface in NET box
... instead of the last.

Also, indented the `for` statement with tabs rather than spaces.

Closes #456
2022-11-04 01:45:09 +01:00
aristocratos 9f0fcdd5bf Fixed: Moved up get_cpuHz() in the execution order to get better cpu clock reading. 2022-10-27 15:09:00 +02:00
aristocratos dda9f2589f Fixed: Ignore disks that fails in statvfs64() to avoid slowdowns and possible crashes. 2022-10-23 19:33:04 +02:00
aristocratos 8a07bc43b4 Changed: Reverted back to sysconf(_SC_NPROCESSORS_ONLN) for Cpu core count ant let the new dynamic update fix if cores are turned on later 2022-10-13 09:26:06 +02:00
aristocratos 4f45b9b25f Added: Dynamic updating of max number of CPU cores 2022-10-07 20:45:12 +02:00
aristocratos e5cc895015 Fixed: Number of cores wrongly detected for Ryzen in rare cases. 2022-10-07 13:41:04 +02:00
Jakob P. Liljenberg d58a17afb1
Merge pull request #438 from stefanos82/main
Further cleanup
2022-10-05 12:28:55 +02:00
aristocratos 0cb31e7b11 Fixed: Cpu::collect() core count counter... 2022-10-05 10:41:09 +02:00
Στέφανος f0e413ed6f All but two places const bool have been updated
I haven't touched `include/robin_hood.h` as I don't know whether it's a
third-party header file that could get rewritten at a later time of a
possible future release by the author(s) of it.
2022-10-04 21:36:04 +03:00
Στέφανος ab7fe62e65 Fix variable initialization to 'auto' for getB()
It does not make sense to return a `const bool&` as we are dealing with
Boolean literals that are `prvalue`s of type bool.

The compiler is smart enough to do the necessary optimizations wherever
is applicable.
2022-10-04 12:56:14 +03:00
Στέφανος 36a180033d Forgot to update 'auto' usage wherever necessary 2022-10-04 12:11:12 +03:00
Στέφανος 73afc487fa
Merge branch 'main' into fixed-merge-conflict 2022-10-03 10:41:40 +03:00
aristocratos 96b770cfdb Changed: Using sysconf(_SC_NPROCESSORS_CONF) for number of cores instead of sysconf(_SC_NPROCESSORS_ONLN) 2022-10-03 08:49:41 +02:00
Στέφανος 1fddbc1cd6 Further Cleanup Part 2 2022-10-03 00:29:05 +03:00
aristocratos 24f06094f8 Fixed: Crashing when cores are offline 2022-10-02 15:25:10 +02:00