Commit Graph

456 Commits

Author SHA1 Message Date
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
aristocratos
2e68c0b916 Fixed key > gpu_names check 2023-05-20 17:27:20 +02:00
aristocratos
04ed16a9f6 Merged changes from main 2023-05-20 17:15:45 +02:00
aristocratos
e11d64e8d7 Debug times box changes 2023-05-20 15:20:27 +02:00
aristocratos
21b85f8913 btop.cpp -> fmt 2023-05-20 14:52:50 +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
aristocratos
8bae1ec092 Fixed debug timer for gpu 2023-05-20 00:13:00 +02:00
romner-set
01acfd603e Bind GPU panel to 5,6,7,8,9,0 and fully implement multi-GPU support 2023-05-19 16:42:32 +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
2d27f2ff61 Fix crash when no nvidia GPU is detected 2023-05-14 17:40:50 +02:00
romner
0e0025a2c3 Update makefile text, fix typo and adhere to contibuting guidelines 2023-05-14 17:31:39 +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
Steffen
053bacef1d Silence "warning: unqualified call to 'std::move'" in clang. 2023-03-07 13:16:04 +01:00
Jakob P. Liljenberg
3200de584f
Merge pull request #502 from mattico/linux-zfs-arc
Linux: subtract ZFS ARC min size from available memory
2023-02-23 18:49:01 +01:00
Matt Ickstadt
345bf7c052 Linux: subtract ZFS ARC min size from available memory 2023-02-23 10:59:10 -06:00
simplepad
2b18c6952d
fix zfs on freebsd not reporting IO 2022-12-21 21:45:25 +03: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
0f8498fa4e v1.2.13 Bug fixes 2022-11-06 22:36:34 +01:00
Jakob P. Liljenberg
9dc57534b1
Merge pull request #464 from correabuscar/osx_replace__getnameinfo__with__inet_ntop
osx: replace getnameinfo with inet_ntop
2022-11-06 15:24:30 +01:00
correabuscar
f4eea3f3cf osx: replace getnameinfo with inet_ntop
this is like PR #462 for FreeBSD,
and like PR #458 for Linux.
2022-11-06 14:56:54 +01:00
correabuscar
7ff3c7f7d0 a comment about AF_LINK being ignored on purpose 2022-11-06 13:49:44 +01:00
Jakob P. Liljenberg
20df83658a
Merge pull request #462 from correabuscar/freebsd_replace__getnameinfo__with__inet_ntop
FreeBSD: replace getnameinfo with inet_ntop
2022-11-06 12:43:57 +01:00
correabuscar
12def527cd FreeBSD: replace getnameinfo with inet_ntop
also make IPv6 work.
2022-11-06 12:04:38 +01:00
aristocratos
5a53fb4a2c Fixed: Process nice value underflowing, issue #461 2022-11-06 11:32:17 +01:00
Jakob P. Liljenberg
f7dbf50b75
Merge pull request #459 from correabuscar/fbsd_use_first_IP_of_interface_instead_of_last
FreeBSD: use the first IP of the interface
2022-11-06 10:51:28 +01:00
correabuscar
bd7018ed96 OSX: use the first IP of the interface
...instead of the last.

Side effect of this is that it also detects when the current IP gets
removed from the interface, instead of keep displaying the old IP.

This is PR #457 but for OSX, not Linux.
2022-11-06 10:34:30 +01:00
correabuscar
16ce8d21b1 FreeBSD: use the first IP of the interface
... instead of the last.

Side effect of this is that it also detects when the current IP
gets removed from the interface, instead of keep displaying the old IP.

This is PR #457 but for FreeBSD, not Linux.
2022-11-06 08:23:30 +01:00
Jakob P. Liljenberg
a2685962d9
Merge pull request #446 from daephx/fix-conf-typo [skip actions]
fix: spelling mistake in btop.conf
2022-11-06 04:20:54 +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
Arjun P
c1675634ef Address comment 2022-10-31 21:42:34 +00:00
Arjun P
bb40de64c9 Fix bug in proc_tree view when showing full cmd 2022-10-30 09:27:56 +00:00
Arjun P
4fbda9df29 proc tree: fix width threshold to match commit message and use and/or instead of &&, || 2022-10-29 00:20:11 +01:00
Arjun P
ede7d0a76a proc tree view: if there's more than 40 width left, try to print full cmd 2022-10-28 22:24:56 +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
daephx
7943a0234a fix: spelling mistake in btop.conf 2022-10-15 18:23:07 -07: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
3dd6a6cc6b v1.2.12 Bug fix 2022-10-07 20:59:47 +02:00
aristocratos
4f45b9b25f Added: Dynamic updating of max number of CPU cores 2022-10-07 20:45:12 +02:00
aristocratos
14444760c4 v1.2.11 Quick fix for number of cores detection 2022-10-07 13:52:34 +02:00
aristocratos
e5cc895015 Fixed: Number of cores wrongly detected for Ryzen in rare cases. 2022-10-07 13:41:04 +02:00
aristocratos
7a2556eae5 v1.2.10 Bug fixes, cleanup + a new theme 2022-10-06 22:16:34 +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
Στέφανος
8331cb36f8 More const bool cleanup 2022-10-04 17:33:53 +03:00
Στέφανος
afeef173fc Remove const from bool variables 2022-10-04 17:06:39 +03:00
Στέφανος
820391494b Avoid the unnecessary use of copy constructor
When you want to pass a `std::string` to `std::string_view`,
prefer to do such operation during object initialization via `{}` so you
can avoid to use the copy constructor, which can be expensive under
certain situations.
2022-10-04 16:20:20 +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
Στέφανος
98b35d20a5 More 'No need for const & in bool' 2022-10-04 11:57:15 +03:00
Στέφανος
2f1bf0df01 No need for const & in bool 2022-10-04 11:47:26 +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
Στέφανος
eda6873071 Further 'cleanup' 2022-10-02 21:52:27 +03:00
Στέφανος
dfa2a9b920 Further improvements 2022-10-02 19:09:19 +03:00
Στέφανος
478a44cc57 Clean up btop_tools.{hpp,cpp} files 2022-10-02 18:52:18 +03:00
aristocratos
24f06094f8 Fixed: Crashing when cores are offline 2022-10-02 15:25:10 +02:00
aristocratos
3796a8ccee Fixed: Extra checks to avoid crash on trying to replace empty strings in tree mode 2022-10-02 13:20:15 +02:00
aristocratos
26ac007777 Fixed: Process tree filtering not case insensitive 2022-08-28 14:22:36 +02:00
aristocratos
0c6a2f701d v1.2.9 Bug fixes + new features and themes 2022-08-28 13:47:37 +02:00
aristocratos
90034156dd Fixed: Memory values not clearing properly when not in graph mode in mem box 2022-08-28 13:36:00 +02:00
Aristocratos
2d6bf1f4aa Added: Option to hide the small cpu graphs for processes 2022-07-29 16:18:06 +02:00
Aristocratos
edbafa9060 Changed: Small graphs now show colors for each character 2022-07-26 21:34:14 +02:00
aristocratos
7dc398f0c0 Merge branch 'main' of github.com:aristocratos/btop 2022-07-13 17:26:46 +02:00
aristocratos
a84a7e6a5c Fixed: Getting selfpath on macos (fix for finding theme folder) 2022-07-13 17:24:34 +02:00
Jakob P. Liljenberg
b48596486e
Merge pull request #385 from simplepad/zfs-iostat-new
Implement new ZFS pool io monitoring and the option to show ZFS pools only
2022-07-11 19:24:08 +02:00
simplepad
a33bab3000
switch Logger calls to debug() to avoid filling up the logfile 2022-07-11 19:16:19 +03:00