Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Linux: use correct column alignment for wide fields | Christian Göttsche | 2021-01-11 | 1 | -12/+19 |
| | | | | | | | This affects: - PROC_COMM, PROC_EXE and CWD on Linux - JAIL on FreeBSD and DragonFlyBSD - ZONE on Solaris | ||||
* | RichString_setAttrn: refactor to take a length instead of a stop index | Christian Göttsche | 2021-01-10 | 1 | -9/+9 |
| | | | | Fixes: #459 | ||||
* | Hashtable: use more distinct typename for key type | Christian Göttsche | 2021-01-06 | 1 | -1/+1 |
| | |||||
* | LibSensors: add support for Ryzen CPUs | Matej Dian | 2021-01-06 | 1 | -1/+6 |
| | |||||
* | Declare for loop variables inside the loop | Christian Göttsche | 2021-01-06 | 1 | -2/+1 |
| | |||||
* | Panel_new: reorder arguments | Christian Göttsche | 2021-01-04 | 1 | -1/+1 |
| | | | | Reorder owner and type so they match the order of Panel_init | ||||
* | XUtils: check for multiplication overflow in allocation size | Christian Göttsche | 2021-01-02 | 1 | -2/+2 |
| | |||||
* | Object: return int on comparison | Christian Göttsche | 2021-01-02 | 1 | -1/+1 |
| | | | | | Comparisons do, due to the new introduced shaceship-comparisons, only return -1, 0, 1 or the result of strcmp(). | ||||
* | Only initialize and gather delay accounting data if a related column is enabled | Christian Göttsche | 2021-01-01 | 3 | -25/+35 |
| | | | | | Avoid creating and communicating over a netlink socket by default, which triggers cap_net_admin checks as root. | ||||
* | Also find libsensors.so.4 for Fedora and friends | Daniel Lange | 2020-12-25 | 1 | -5/+7 |
| | |||||
* | Linux: accept clock CPU frequency | Christian Göttsche | 2020-12-23 | 1 | -1/+3 |
| | | | | | | | | | processor : 0 cpu : POWER8 (architected), altivec supported clock : 4024.000000MHz revision : 2.0 (pvr 004d 0200) Closes: #424 | ||||
* | Resolve clang-analyzer signed/unsigned comparison CI failure | Nathan Scott | 2020-12-22 | 1 | -2/+2 |
| | |||||
* | DiD: Ensure string offsets are inside string boundaries | Benny Baumann | 2020-12-21 | 1 | -0/+6 |
| | |||||
* | Avoid NULL dereference on zombie processes | Benny Baumann | 2020-12-21 | 1 | -2/+9 |
| | | | | Fixes #361 | ||||
* | Make remaining number literals use uppercase | Benny Baumann | 2020-12-20 | 1 | -1/+1 |
| | |||||
* | Use upper case numeric literals | Christian Göttsche | 2020-12-20 | 1 | -2/+2 |
| | | | | See https://rules.sonarsource.com/c/RSPEC-818 | ||||
* | Mark Platform_defaultFields const | Christian Göttsche | 2020-12-19 | 2 | -2/+2 |
| | |||||
* | Merge Process_pidColumns into Process_fields and rework auto-fit for ↵ | Christian Göttsche | 2020-12-19 | 2 | -25/+10 |
| | | | | PID-like columns | ||||
* | Rework enum ProcessField | Christian Göttsche | 2020-12-19 | 5 | -58/+58 |
| | | | | | | Use only one enum instead of a global and a platform specific one. Drop Platform_numberOfFields global variable. Set known size of Process_fields array | ||||
* | LinuxProcess: drop dead Process columns | Christian Göttsche | 2020-12-19 | 2 | -38/+0 |
| | |||||
* | Split boilerplate and platform-independent field comparison | Benny Baumann | 2020-12-19 | 1 | -1/+1 |
| | | | | | | | | This acheives two things: - Allows for simple tie-breaking if values compare equal (needed to make sorting the tree-view stable) - Allows for platform-dependent overriding of the sort-order for specific fields Also fixes a small oversight on DragonFlyBSD when default-sorting. | ||||
* | Invert Process_compare resolution so that superclass matches run first | Hisham Muhammad | 2020-12-19 | 1 | -15/+8 |
| | | | | | | | | | | * This removes duplicated code that adjusts the sort direction from every OS-specific folder. * Most fields in a regular htop screen are OS-independent, so trying Process_compare first and only falling back to the OS-specific compareByKey function if it's an OS-specific field makes sense. * This will allow us to override the sortKey in a global way without having to edit each OS-specific file. | ||||
* | Move macro definitions close to usage | Christian Göttsche | 2020-12-16 | 1 | -0/+5 |
| | |||||
* | Use common naming for bare enum types | Christian Göttsche | 2020-12-16 | 1 | -2/+2 |
| | |||||
* | LibSensors: fix unversioned libsensors library name | Christian Göttsche | 2020-12-15 | 1 | -2/+2 |
| | |||||
* | LibSensors: restore temperature for Raspberry Pi | Christian Göttsche | 2020-12-15 | 1 | -0/+3 |
| | | | | | | | sensors output: cpu_thermal-virtual-0 Adapter: Virtual device temp1: +58.0 C (crit = +90.0 C) | ||||
* | Handle absence of package CPU temperature | Christian Göttsche | 2020-12-14 | 3 | -44/+60 |
| | | | | Resolves: #389 | ||||
* | Harden the extraction of boot time for the Linux platform | Nathan Scott | 2020-12-14 | 1 | -12/+11 |
| | | | | | | | | | There is a possible path - albeit theoretical really - through the btime initialization code in Linux ProcessList_new(), when String_startsWith() is always false, which can result in btime not being initialized. This commit refactors the code to remove that possibility. | ||||
* | Cleanup initialization of jiffies on the Linux platform | Nathan Scott | 2020-12-14 | 3 | -18/+15 |
| | | | | | | | | | | Small cleanups - add error handling, remove a local static variable and refactor LinuxProcess_adjustTime (also rename it, as its in LinuxProcessList.c not LinuxProcess.c) - and while there, move the related 'btime' global variable into LinuxProcessList.c so it can be made static. Resolves https://github.com/htop-dev/htop/issues/384 | ||||
* | Simplify initialization of the Linux haveSmapsRollup variable | Nathan Scott | 2020-12-14 | 1 | -8/+2 |
| | |||||
* | Merge branch 'fix-dlopen-libsensors-debian' of fasterit/htop | Daniel Lange | 2020-12-13 | 1 | -3/+7 |
|\ | |||||
| * | Fix dlopen issue for libsensors5 in Debian Buster, Bullseye | Daniel Lange | 2020-12-12 | 1 | -3/+7 |
| | | | | | | | | | | | | | | libsensors.so is provided only by the -dev package, so search for libsensors.so.5 (installed from the libsensors5 package) explicitly see: dpkg-query -S libsensors.so | ||||
* | | Define O_PATH if not already defined | Chris Burr | 2020-12-13 | 1 | -0/+6 |
|/ | |||||
* | Cull the definitions of pageSize and pageSizeKB from CRT.c | Nathan Scott | 2020-12-10 | 3 | -7/+22 |
| | | | | | | | | | | | | | | | By storing the per-process m_resident and m_virt values in the form htop wants to display them in (KB, not pages), we no longer need to have definitions of pageSize and pageSizeKB in the common CRT code. These variables were never really CRT (i.e. display) related in the first place. It turns out the darwin platform code doesn't need to use these at all (the process values are extracted from the kernel in bytes not pages) and the other platforms can each use their own local pagesize variables, in more appropriate locations. Some platforms were actually already doing this, so this change is removing duplication of logic and variables there. | ||||
* | PSI Meter: use constant width and only print ten-duration as bar | Christian Göttsche | 2020-12-08 | 1 | -4/+8 |
| | |||||
* | Additional code simplification | Benny Baumann | 2020-12-08 | 1 | -1/+2 |
| | | | | Additional correction for #375 | ||||
* | Split RichString_(append|appendn|write) into wide and ascii | Christian Göttsche | 2020-12-08 | 4 | -22/+24 |
| | | | | | | | | RichString_writeFrom takes a top spot during performance analysis due to the calls to mbstowcs() and iswprint(). Most of the time we know in advance that we are only going to print regular ASCII characters. | ||||
* | SELinuxMeter: silence comparison warning on 32-bit | Christian Göttsche | 2020-12-07 | 1 | -1/+1 |
| | | | | | | | | | linux/SELinuxMeter.c: In function ‘hasSELinuxMount’: linux/SELinuxMeter.c:38:21: warning: comparison of integer expressions of different signedness: ‘__fsword_t’ {aka ‘int’} and ‘unsigned int’ [-Wsign-compare] 38 | if (sfbuf.f_type != SELINUX_MAGIC) { | ^~ Origin: https://github.com/SELinuxProject/selinux/blob/7df27b78e9eecbe65a57cdfefb9e51f547231b20/libselinux/src/init.c#L40 | ||||
* | Introduce METER_BUFFER_CHECK and METER_BUFFER_APPEND_CHR to cleanup writing ↵ | Christian Göttsche | 2020-12-06 | 1 | -25/+10 |
| | | | | | | to bar buffers Closes: #294 | ||||
* | Use size_t as type for buffer length in Process | Christian Göttsche | 2020-12-06 | 1 | -1/+1 |
| | |||||
* | Use size_t as len type for Meter_UpdateValues | Christian Göttsche | 2020-12-06 | 4 | -8/+12 |
| | | | | Most of the time the parameter is passed to snprintf type functions | ||||
* | IWYU update | Christian Göttsche | 2020-12-06 | 6 | -8/+4 |
| | |||||
* | Initialize buffer for retrieved path | Benny Baumann | 2020-12-06 | 1 | -1/+2 |
| | | | | | | This avoids a warning on GCC 11. Fixes #369 | ||||
* | LinuxProcessList: add underscore suffix for raw struct name | Christian Göttsche | 2020-12-05 | 1 | -1/+1 |
| | | | | Fit the general coding style | ||||
* | Resolve conversion from ssize_t to int for readlink return value | Christian Göttsche | 2020-12-05 | 1 | -1/+1 |
| | |||||
* | Convert personal copyright authorship to team | Christian Göttsche | 2020-12-04 | 4 | -4/+4 |
| | |||||
* | Linux: avoid float division by 0 after system sleep | Christian Göttsche | 2020-12-03 | 1 | -2/+3 |
| | | | | | linux/LinuxProcessList.c:1403:63: runtime error: division by zero SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior linux/LinuxProcessList.c:1403:63 in | ||||
* | Add Linux cwd process column | Christian Göttsche | 2020-12-03 | 3 | -1/+48 |
| | |||||
* | Dynamically load libsensors at runtime | Christian Göttsche | 2020-12-02 | 5 | -48/+136 |
| | |||||
* | Add xReadfile wrapper for reading small to medium size files | Christian Göttsche | 2020-12-02 | 3 | -134/+31 |
| | | | | | | Inspired by proposed Linux syscall Avoid file descriptor leaks like 4af8c63f |