summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2021-03-21Use `#if defined()` syntax when `#elif defined()` is presentBenny Baumann
This prefers the `#if defined()` syntax over the `#ifdef` variant whenever there's also a `#elif defined()` clause, thus making the multiple branching structure more obvious and the overall use more consistent.
2021-03-21Merge branch 'cputemp' of cgzones/htopDaniel Lange
2021-03-21Merge branch 'openbsd' of cgzones/htopDaniel Lange
2021-03-21Merge branch 'cpu_proc_stat' of cgzones/htopDaniel Lange
2021-03-20OpenBSD: updateChristian Göttsche
* Set process data for: - minflt - majflt - processor - nlwp * Drop unimplemented nlwp column * Scan userland threads * Mark a 'Thread is currently on a CPU.' with 'R', and processes 'Currently runnable' with 'P', do confine with man:ps(1) and Linux. See https://man.openbsd.org/ps.1 * Show CPU frequency
2021-03-20ProcessList: fix treeview on OpenBSD when hiding kernel threadsChristian Göttsche
Currently the tree-view is empty on OpenBSD when kernel threads are hidden, cause the kernel thread 'swapper' has pid 0 and gets treated as root of the tree and parent of 'init'. Do not build any tree with a pid 0 root node.
2021-03-19Use unsigned types for CPU counts and associated variablesChristian Göttsche
2021-03-19Use consistent style for include checkBenny Baumann
2021-03-19Linux: Rework libsensors parsingChristian Göttsche
Do not read driver depended labels, just count the number of temperatures given: on #CPU: platform temp = max cpu temp CPU temps = first to last on #CPU + 1: platform temp = first temp CPU temps = second to last on #CPU / 2: platform temp = max cpu temp CPU temps = first to last concat first to last (with SMT core x + cpu count is the logical core of the physical core x) on #CPU / 2 + 1: platform temp = first temp CPU temps = second to last concat second to last (with SMT core x + cpu count is the logical core of the physical core x) Closes: #529 Closes: #538
2021-03-19ci: drop hwloc from clang-analyzer buildChristian Göttsche
The hwloc header generates lots of warnings: In file included from Action.c:10: In file included from ./Action.h:15: In file included from ./Header.h:10: In file included from ./Meter.h:18: In file included from ./ProcessList.h:25: In file included from /usr/include/hwloc.h:2371: /usr/include/hwloc/helper.h:481:5: warning: Value stored to 'state' is never read [deadcode.DeadStores] state = 3; ^ ~ 1 warning generated.
2021-03-19ci: use focal list for llvm mirrorChristian Göttsche
The llvm bionic packages depend on libffi6, which is not available in focal.
2021-03-19Merge branch 'richstring_memset' of cgzones/htopDaniel Lange
2021-03-19Merge branch 'shared_before_cached' of cgzones/htopDaniel Lange
2021-03-18Merge pull request #436 from cgzones/freebsdGraham Inggs
FreeBSD: add support for CPU frequency and temperature Tested on two physical systems running FreeBSD 12.1
2021-03-18Merge pull request #565 from cgzones/ci_clang12Nathan Scott
ci: use clang 12
2021-03-17Action: merge conditionsChristian Göttsche
2021-03-17LinuxProcessList: drop unnecessary parenthesisChristian Göttsche
2021-03-17MemoryMeter: show shared memory before cachedChristian Göttsche
Shared memory is less free-able than cached memory. Show it beforehand.
2021-03-17RichString: do not unnecessarily clean whole bufferChristian Göttsche
The local stack buffer does not need to be cleaned to zeros when - just initialized, cause the length is set to 0 and the first character is set to '\0', so all printing functions will safely stop - no further used, i.e. the variable goes out of scope
2021-03-17ci: use clang 12Christian Göttsche
llvm 12 is stable enough to be used in the CI as compiler and static analyzer.
2021-03-15Linux: individually show shared memoryChristian Göttsche
Shmem: Total memory used by shared memory (shmem) and tmpfs Source: https://www.kernel.org/doc/Documentation/filesystems/proc.txt Closes: #556
2021-03-14Improve process followingChristian Göttsche
- stay in follow mode on sort inversion (I) - stay in follow mode after viewing help screen (h) - select parent process (where available) when having followed a thread and hiding these (H) Closes: #560
2021-03-13Settings_write: fix return value on errorChristian Göttsche
Return a negative errno on fprintf() or flcose() failure, not a return value of ferror() or flcose().
2021-03-12CPUMeter_init: compactify branchesChristian Göttsche
2021-03-12LinuxProcessList: refactor /proc/stat parsingChristian Göttsche
Combine reading CPU count and CPU usage, only open the file once. Do not separately initialize totalPeriod and totalTime, cause the value 0 is handled in Platform_setCPUValues(). Take the number of currently running process from the entry procs_running in /proc/stat instead of counting all scanned process with state 'R', to include hidden tasks, e.g. threads.
2021-03-12Settings: check if writing configuration file was successfulChristian Göttsche
Writing to the file stream might fail due to a immutable file or a filesystem error. Check the error indicator for the stream and for fclose() failures.
2021-03-12Meter: do not access RichString internalsChristian Göttsche
Use a temporary local variable
2021-03-12Settings: mark non-modified pointer parameters constChristian Göttsche
2021-03-12InfoScreen/ProcessList: do not access Vector internalsChristian Göttsche
Use wrapper function to encapsulate the Vector structure
2021-03-12Process: do not access RichString internalsChristian Göttsche
Use wrapper macro to encapsulate the RichString structure
2021-03-12Process_compare: reorder checksChristian Göttsche
Check for result being 0 first, before checking if the result might be negated, so we do not need to negate 0.
2021-03-12Object: always include stdbool.hChristian Göttsche
The function Object_isA() returning bool is nowadays unconditional
2021-03-12configure: use portable ANDChristian Göttsche
man:test(1) NOTE: Binary -a and -o are inherently ambiguous. Use 'test EXPR1 && test EXPR2' or 'test EXPR1 || test EXPR2' instead. Also fix indent
2021-03-05Merge branch 'misc' of https://github.com/cgzones/htop into cgzones-miscNathan Scott
2021-03-04Separate data-update and drawing of headerChristian Göttsche
2021-03-04Save text buffer in MeterChristian Göttsche
2021-03-04Ensure buffer for gethostname(2) is properly terminatedBenny Baumann
2021-03-04Merge branch 'follow' of cgzones/htopDaniel Lange
Closes #557
2021-03-04Resolve trailing-whitespace failure in CI (merge issue)Nathan Scott
2021-03-04Fix include file ordering of generic headersNathan Scott
2021-03-04Move generic (shared) code into its own sub-directoryNathan Scott
Code that is shared across some (but not all) platforms is moved into a 'generic' home. Makefile.am cleanups to match plus some minor alphabetic reordering/formatting. As discussed in https://github.com/htop-dev/htop/pull/553
2021-03-04Separate display from sampling in SysArch and Hostname MetersNathan Scott
Several of our newer meters have merged coding concerns in terms of extracting values and displaying those values. This commit rectifies that for the SysArch and Hostname meters, allowing use of this code with alternative front/back ends. The SysArch code is also refined to detect whether the platform has an os-release file at all and/or the sys/utsname.h header via configure.ac.
2021-03-03Follow followed process when switching thread visibilitiesChristian Göttsche
Do not stop following a process when switching the visibility of userland or kernel threads. Related: #557
2021-03-03Document PERCENT_NORM_CPU and mention Irix / Solaris modes (top lingo)Daniel Lange
2021-03-03Unsupported: add normalized CPU percentage columnDaniel Lange
2021-03-03Darwin: add normalized CPU percentage columnChristian Göttsche
Missed in 15eab2012d21
2021-03-02Drop newline at end of if branchChristian Göttsche
2021-03-02LinuxProcess: Drop dead assignmentChristian Göttsche
Modern compilers are very good at finding uninitialized paths, lets rely on them.
2021-03-02Enclose macro argument in parenthesesChristian Göttsche
2021-03-02Use uppercase floating point literal suffixChristian Göttsche