Commit graph

533 commits

Author SHA1 Message Date
jkre a81b514d6d add freebsd support for battery power 2023-12-15 01:14:47 +01:00
jkre cd6c1b7294 make discribtion in menu and settings clearer 2023-12-14 23:27:19 +01:00
jkre 2934138a66 Only redraw battery indicator on power change if power change option is set to true 2023-12-14 22:56:31 +01:00
jkre 578b01e06b add show_battery_power option to menu 2023-12-14 22:19:22 +01:00
jkre 7a188bfaaf round wattage to second decimal 2023-12-14 01:39:00 +01:00
jkre 1ad1418771 remove redundant space 2023-12-14 00:58:17 +01:00
jkre ddd4bec1c3 Show wattage next to battery remaining time when wattage could be calculated 2023-12-14 00:54:29 +01:00
jkre 6e575116fe add power to get_battery function output 2023-12-14 00:53:01 +01:00
jkre 419a7d4ca3 add power draw calculation for battery 2023-12-14 00:32:06 +01:00
jkre b09f352c09 clean up if statement for battery percent calculation 2023-12-14 00:16:15 +01:00
jkre f6d8c4a044 use capacity as default for battery percentage, less complicated and matches desktop percent exactly 2023-12-13 23:58:40 +01:00
jkre ab294bfc10 add battery percentage calculation in charge case 2023-12-13 23:51:18 +01:00
jkre ee61700a44 add case of calculating the remaining battery time for current/charge 2023-12-13 23:39:45 +01:00
jkre b99008f626 Introduce charge in addition to energy for laptops that use charge instead of energy, this is done so that the units make more sense in this case 2023-12-13 23:17:07 +01:00
jkre 4c74a7c51d Add current_now and voltage_now to battery struct and fix naming of
current_now
2023-12-13 22:51:40 +01:00
aristocratos fe699b4333 Version bump to 1.3.0 in preparation for upcoming release 2023-12-12 23:20:09 +01:00
aristocratos a017056ea0 Added swap to ignore for statvfs() since it will always fail 2023-12-12 23:05:07 +01:00
aristocratos e770cccaf8 Added try->catch for get_zfs_stat_file() to avoid fs error 2023-12-12 22:55:48 +01:00
Jakob P. Liljenberg b6a86962e2
Merge branch 'main' into cpu-model 2023-12-12 21:47:01 +01:00
masiboss 5902484f39 simplify removal of "Apple" 2023-12-07 21:42:11 +01:00
masiboss 5beb9e12e5 in case apple decides to add another suffix to the cpu name 2023-12-07 20:56:40 +01:00
masiboss 1b2f11b412 cut less of cpu name if frequency is not shown 2023-12-07 20:49:34 +01:00
masiboss bcf4ad8ab6 fix array out of bounds on regular m chip 2023-12-07 19:50:12 +01:00
masiboss aeefcacbc9 fix cpu version not included 2023-12-07 19:34:11 +01:00
masiboss 23698940df strip "Apple" from name of Apple silicon chips 2023-12-07 19:23:58 +01:00
Steffen Winter 8096433736
Fix printed model name for older Intel CPU 2023-12-05 02:34:24 +01:00
aristocratos 19bcff894b Squashed commit of the following:
commit 0267eba2bb
Merge: 50bbab0 e81cf2b
Author: Jakob P. Liljenberg <admin@qvantnet.com>
Date:   Wed Nov 15 21:43:18 2023 +0100

    Merge pull request #659 from ivanp7/patch-1

    Add alternative key codes for Delete, Insert, Home, End

commit 50bbab0512
Merge: 9edbf27 5a14c7b
Author: Jakob P. Liljenberg <admin@qvantnet.com>
Date:   Wed Nov 15 21:35:50 2023 +0100

    Merge pull request #660 from stradicat/feature/elementarish

    Elementarish theme: color update according to Elementary palette

commit 5a14c7b6fa
Merge: 979506f 71eb414
Author: Dennis Mayr <dmayr.dev@gmail.com>
Date:   Wed Nov 15 17:27:34 2023 -0300

    Merge branch 'main' of https://github.com/stradicat/btop

commit 979506f18e
Author: Dennis Mayr <dmayr.dev@gmail.com>
Date:   Wed Nov 8 11:17:47 2023 -0300

    Elementarish theme: color update according to Elementary palette

commit 71eb4142e8
Author: Dennis Mayr <dmayr.dev@gmail.com>
Date:   Wed Nov 8 11:17:47 2023 -0300

    Elementarish theme: color update according to Elementary palette

commit e81cf2b7ff
Author: vân <3432246+ivanp7@users.noreply.github.com>
Date:   Tue Nov 7 15:12:27 2023 +0000

    Add alternative key codes for Insert, Home, End

commit f9452ff6d5
Author: vân <3432246+ivanp7@users.noreply.github.com>
Date:   Mon Nov 6 13:31:53 2023 +0000

    Add alternative Delete key code

    Delete key not always produces ^[[3~, on some terminals (like st) it produces ^[[P.

commit 9edbf27f1b
Merge: 2a864f6 ff1f51c
Author: Jakob P. Liljenberg <admin@qvantnet.com>
Date:   Sat Oct 21 02:09:55 2023 +0200

    Merge pull request #649 from nobounce/workflow-timeout

    Set FreeBSD workflow timeout

commit ff1f51ccbb
Author: Steffen Winter <steffen.winter@proton.me>
Date:   Wed Oct 18 22:26:36 2023 +0200

    Set FreeBSD workflow timeout

    Recently the FreeBSD workflow has started to hang in a boot loop when
    the VM starts up. The issue is being tracked upstream but there is not
    response at the moment.

    To work around this set a timeout to not waste CI minutes. Other
    workflows might also want this change since they don't take 20 minutes
    anyway.

commit 2a864f6f2e
Merge: 636eb25 b2bf8ef
Author: Jakob P. Liljenberg <admin@qvantnet.com>
Date:   Sat Oct 7 10:40:54 2023 +0200

    Merge pull request #643 from DecklynKern/main

    Fix scrollbar not clearing sometimes.

commit b2bf8ef504
Author: DecklynKern <DecklynKern@gmail.com>
Date:   Fri Oct 6 17:33:38 2023 -0600

    Fix scrollbar not clearing sometimes.

commit 636eb25f5e
Merge: 260c0f6 b5ba2fc
Author: Jakob P. Liljenberg <admin@qvantnet.com>
Date:   Sat Sep 30 19:51:03 2023 +0200

    Merge pull request #623 from rahulaggarwal965/main

    Add keybind for toggling memory display mode in PROC box

commit b5ba2fc963
Author: Rahul Aggarwal <rahulaggarwal965@gmail.com>
Date:   Wed Sep 20 22:55:56 2023 -0400

    Add keybind for toggling memory display mode in PROC box

commit 260c0f6623
Merge: 52bfff7 e6a06eb
Author: Jakob P. Liljenberg <admin@qvantnet.com>
Date:   Sat Sep 30 18:56:25 2023 +0200

    Merge pull request #635 from lvxnull/editorconfig

    Add hpp files to .editorconfig

commit e6a06eb729
Author: lvxnull <86745229+lvxnull@users.noreply.github.com>
Date:   Thu Sep 28 19:44:47 2023 +0200

    Add hpp files to .editorconfig

commit 52bfff7ceb
Merge: 1f72e56 19dbbe1
Author: Jakob P. Liljenberg <admin@qvantnet.com>
Date:   Sat Sep 30 18:55:08 2023 +0200

    Merge pull request #636 from nobounce/performance-iili

    Minor string initialization improvement

commit 19dbbe1a17
Author: nobounce <steffen.winter@proton.me>
Date:   Fri Sep 29 12:20:59 2023 +0200

    Minor string initialization improvement

commit 1f72e56c7d
Merge: 278a0e6 cdcf8bc
Author: Jakob P. Liljenberg <admin@qvantnet.com>
Date:   Fri Sep 29 10:43:21 2023 +0200

    Merge pull request #633 from crestfallnatwork/main

    [fix] Made disks statvfs logic asynchronous.

commit cdcf8bc929
Author: crestfalln <guptahiman01@gmail.com>
Date:   Fri Sep 29 09:07:27 2023 +0530

    fixed bug where updated disks stats overrided disk io data

commit 9b4e85f08d
Author: crestfalln <no-reply@crestfalln.com>
Date:   Thu Sep 28 04:57:05 2023 +0530

    fixed bug where updated disks stats overrided disk io data

commit 889623874e
Author: crestfalln <no-reply@crestfalln.com>
Date:   Wed Sep 27 23:57:06 2023 +0530

    made disks stat logic async

commit 278a0e6b17
Merge: d16adc9 e89519f
Author: Jakob P. Liljenberg <admin@qvantnet.com>
Date:   Thu Sep 28 18:32:09 2023 +0200

    Merge pull request #630 from lvxnull/signal-list

    Fix signal list on non-linux/weird linux platforms

commit e89519fbb2
Author: lvxnull <86745229+lvxnull@users.noreply.github.com>
Date:   Sun Sep 24 21:44:38 2023 +0200

    Fix signal list on non-linux/weird linux platforms

commit d16adc9fd0
Merge: 2c3ac48 f34b408
Author: Jakob P. Liljenberg <admin@qvantnet.com>
Date:   Thu Sep 28 18:20:42 2023 +0200

    Merge pull request #618 from nobounce/aggregate-child-processes

    Add option to accumulate a child's resources in parent in tree-view

commit f34b40892f
Author: nobounce <steffen.winter@proton.me>
Date:   Sun Sep 24 16:34:50 2023 +0200

    Make process thread count better readable when wider than 5 digits

commit 6027cedd42
Author: nobounce <steffen.winter@proton.me>
Date:   Thu Sep 14 23:27:05 2023 +0200

    Add option to accumulate a child's resources in parent in tree-view

commit 2c3ac4855d
Merge: f90dc37 5c6a281
Author: Jakob P. Liljenberg <admin@qvantnet.com>
Date:   Wed Sep 13 21:14:56 2023 +0200

    Merge pull request #589 from nobounce/cmake

    Add CMake support for Linux

commit f90dc37c26
Merge: 0cac861 68a49c1
Author: Jakob P. Liljenberg <admin@qvantnet.com>
Date:   Wed Sep 13 20:27:05 2023 +0200

    Merge pull request #610 from SidVeld/feature/horizon-theme

    Horizon theme

commit 5c6a281002
Author: nobounce <steffen.winter@proton.me>
Date:   Tue Aug 29 20:39:00 2023 +0200

    Add CMake support

    Linux is completly supported

    FreeBSD is not able to create a static executable for now. See
    https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=273398

    MacOS was not tested

commit 68a49c10a6
Author: SidVeld <sidveld@gmail.com>
Date:   Wed Sep 6 18:03:31 2023 +0300

    Add horizon theme

commit 0cac861910
Merge: 31be436 f798acd
Author: Jakob P. Liljenberg <admin@qvantnet.com>
Date:   Tue Sep 5 19:27:38 2023 +0200

    Merge pull request #609 from scorpion-26/byteconv

    Fix short conversion of 1000-1023 *iB

commit f798acdaf7
Author: scorpion-26 <dev.scorpion26@gmail.com>
Date:   Tue Sep 5 18:00:47 2023 +0200

    Fix short conversion of 1000-1023*iB

    floating_humanizer([1000-1024], true) with base 8 returns "2K", whereas it should return
    "1.0K" to align with other formats. The conversion is also broken for
    all other units(e.g. 1023M is also broken and returns "2G")

commit 31be4362ce
Author: aristocratos <gnmjpl@gmail.com>
Date:   Sun Aug 27 02:00:07 2023 +0200

    FreeBSD Github action 13.1 -> 13.2 and static libgcc and libstdc++

commit fc523fd1d0
Author: aristocratos <gnmjpl@gmail.com>
Date:   Sun Aug 27 01:36:26 2023 +0200

    Fix for FreeBSD github action not failing "correctly"...
2023-11-25 21:01:11 +01:00
aristocratos b87772611c Added definition GPU_SUPPORT to toggle GPU related code 2023-11-25 20:44:45 +01:00
nobounce c90e3f9b15
Try get terminal size of "/dev/tty" if stdout fails
LLDB does not set the terminal sizes for stdout so try to get them for
"/dev/tty". This helps to get back traces on arm64 where gdb is
not supported
2023-10-14 17:12:44 +02:00
DecklynKern b2bf8ef504 Fix scrollbar not clearing sometimes. 2023-10-06 17:33:38 -06:00
Rahul Aggarwal b5ba2fc963 Add keybind for toggling memory display mode in PROC box 2023-09-30 19:41:03 +02:00
nobounce 19dbbe1a17
Minor string initialization improvement 2023-09-29 12:26:19 +02:00
crestfalln cdcf8bc929 fixed bug where updated disks stats overrided disk io data 2023-09-29 09:51:18 +02:00
crestfalln 9b4e85f08d fixed bug where updated disks stats overrided disk io data 2023-09-29 09:51:18 +02:00
crestfalln 889623874e made disks stat logic async 2023-09-29 09:51:18 +02:00
lvxnull b8e43d92b8 Use native POSIX polling syscalls to read input
No more awkward manual polling
2023-09-28 20:02:47 +02:00
lvxnull e89519fbb2 Fix signal list on non-linux/weird linux platforms 2023-09-28 18:23:11 +02:00
nobounce f34b40892f
Make process thread count better readable when wider than 5 digits 2023-09-24 16:34:50 +02:00
nobounce 6027cedd42
Add option to accumulate a child's resources in parent in tree-view 2023-09-14 23:29:49 +02:00
scorpion-26 f798acdaf7 Fix short conversion of 1000-1023*iB
floating_humanizer([1000-1024], true) with base 8 returns "2K", whereas it should return
"1.0K" to align with other formats. The conversion is also broken for
all other units(e.g. 1023M is also broken and returns "2G")
2023-09-05 18:00:47 +02:00
Jos Dehaes 33595a2c9e initial openbsd bringup
first light

add temp sensor code

some fixes + some logging

add battery code

fix temp

remove some debugging

fix core CPU

fix keypress

remove debug logging

fix Makefile

logging

mem + swap

battery status

process args

detail process state

remove logging

disk io

minor cleanup
2023-09-01 22:35:56 +02:00
aristocratos 975525d38f Fix: Cpu gpu stats always shown when show_gpu_info is On and sizing issues 2023-08-27 12:34:46 +02:00
aristocratos 08abf0b930 Quickfixes for MacOS and FreeBSD compilation. 2023-08-27 01:28:36 +02:00
aristocratos 7290109f80 Merge fix 2023-08-27 00:58:30 +02:00
aristocratos 283d463242 Merge branch 'main' into pr/romner-set/529 2023-08-27 00:56:22 +02:00
aristocratos efddad42dc Changed: cpu_graph_lower Auto defaults to cpu_graph_upper when show_gpu_info is Off 2023-08-27 00:39:57 +02:00
aristocratos a9bc0874d4 Added show_gpu_info setting and Auto options for cpu graphs 2023-08-27 00:31:07 +02:00
aristocratos b3970ee19c Fixed: Key 5-0 gpu box toggle 2023-08-26 20:52:59 +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
Jakob P. Liljenberg c296ac13cd
Merge pull request #590 from nobounce/dangling-reference-config
Convert parameters and config keys to std::string_view
2023-08-26 19:29:57 +02:00
Jakob P. Liljenberg 9a1e760a66
Merge pull request #602 from jfouquart/main
Fix getting zfs pool name with '.' char in freebsd
2023-08-26 19:20:18 +02:00
Jakob P. Liljenberg 9c8af4df43
Merge pull request #601 from joske/cleanup
[macos] don't check /sys on macos
2023-08-26 19:18:55 +02:00
Jos Dehaes d17e1a2dac fix some warnings 2023-08-25 16:18:39 +02:00
Jos Dehaes 4d8aa6b118 fix core check 2023-08-25 15:52:58 +02:00
Jonathan Fouquart 22e64caaff Fix getting zfs pool name with '.' char in freebsd 2023-08-25 09:37:49 +02:00
Jos Dehaes 2217cbe143 [macos] don't check /sys on macos 2023-08-23 16:46:02 +02:00
Jos Dehaes dcbdb7360d [macos] fix temp sensor on system with many cores 2023-08-23 15:46:47 +02:00
aristocratos c8ec6bbb00 Fix freebsd nullptr changes and makefile for gcc12 and newer 2023-08-03 23:08:33 +02:00
Jakob P. Liljenberg 8a33aab588
Merge pull request #539 from nobounce/replace-NULL-nullptr
Modernize using nullptr.
2023-07-30 13:21:48 +02:00
aristocratos 94e5c02d11 Better text editing 2023-07-27 20:51:21 +02:00
nobounce 091c30ab2b
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
2023-07-27 14:17:54 +02:00
nobounce e4abcefbf9 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.
2023-07-26 16:19:17 +02:00
aristocratos aca2e4be75 Fix whitespace indent -> tab indent 2023-07-26 14:38:48 +02:00
aristocratos 33faa01910 Revert fmt submodule to static fmt folder in include 2023-07-26 14:34:15 +02:00
romner 346c9e479b Fix GPU text overflow in CPU panel, again 2023-07-19 16:53:58 +02:00
romner 3a5e5fd5d3 Improve 0-10 key input 2023-07-19 16:22:45 +02:00
romner 972b2b6a01 Fix available boxes in menu & config description 2023-07-19 15:54:35 +02:00
romner 1f73453aec Fix crashes when trying to open nth GPU box with only n-1 GPUs in the system 2023-07-19 15:34:23 +02:00
romner 46c6be0a29 Fix GPU horizontal text overflow in CPU panel 2023-07-16 17:19:09 +02:00
Jakob P. Liljenberg ac17f34580
Merge pull request #560 from rrveex/main
FreeBSD swap info
2023-07-16 16:42:16 +02:00
romner 85fb28cee6 Fix RSMI_STATIC=true and add GPU section to README.md 2023-07-14 02:39:44 +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
romner-set 3fad8a6fde Add GPU options 2023-06-26 13:10:31 +02:00
rr 8466bf3a18 FreeBSD swap info 2023-06-21 21:12:36 +03: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
Jakob P. Liljenberg 7e50b03e39
Merge pull request #510 from nobounce/LLVM
Support compiling with LLVM
2023-06-15 17:45:05 +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
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 a5e4969d7e Remove pthread_exit().
Returning from the thread this way prevents local variables to be
destructed correctly since pthread_exit is marked noreturn.

This fixes a segmentation fault with glibc and llvm-libunwind on exit.
2023-05-25 23:00:07 +02: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
zackiloco 7dac8505c4 Include <codecvt> required by Clang. 2023-05-25 23:00:07 +02:00
zackiloco 34ae6d96d5 Move #include to top level and exclude Clang from compiler version
check.

Clang cannot handle <semaphore> being included in a namespace, which is
also unadvised see:
https://softwareengineering.stackexchange.com/a/335261.

Using the fallback <semaphore.h> is only meant for GCC 10, but Clang
defines `__GNUC__ = 4` so exclude Clang.
2023-05-25 23:00:07 +02:00
zackiloco 922b6475ae Insert std:: for warning unqualified call to std::move. 2023-05-25 23:00:07 +02:00
cpalv 1039bd5b5d amend! update cpu load average display
update cpu load average display

applied suggested changes
2023-05-24 19:51:43 -05:00
cpalv 5d2f7420c3 update cpu load average display 2023-05-23 19:06:50 -05:00
romner-set 842c761a73 Fix crash when all GPU panels are open but the CPU panel is closed 2023-05-22 09:46:20 +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 005de97e6d Add missing fmt prefixes 2023-05-21 13:58:11 +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 b0fc63537b println -> fmt::println 2023-05-21 12:26:48 +02:00
aristocratos fbc349da2a Readd using namespace fmt 2023-05-21 12:11:29 +02:00
aristocratos bd688e24bf Add fmt prefix for fmtlib 2023-05-21 11:58:52 +02:00
Steven Xu 7ca1cc533a fix: prefix with fmt:: to fix ambiguous call to format(), that also refers to /usr/include/c++/13.1.1/format 2023-05-21 19:33:44 +10:00
aristocratos 09c075e06c Debug times thousand separator 2023-05-21 01:11:35 +02:00