summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2022-05-01Merge branch 'natoscott-changelog-3.2.0'3.2.0Nathan Scott
2022-05-01Merge branch 'changelog-3.2.0' of https://github.com/natoscott/htop into ↵Nathan Scott
natoscott-changelog-3.2.0
2022-05-01Merge branch 'natoscott-coverity-scan'Nathan Scott
2022-05-01Merge branch 'coverity-scan' of https://github.com/natoscott/htop into ↵Nathan Scott
natoscott-coverity-scan
2022-05-01Update Settings_newScreen with single-line sortKey checking.Nathan Scott
Co-authored-by: BenBE <BenBE@geshi.org>
2022-04-30Add note that the Tree view setting is per Screen tab nowDaniel Lange
2022-04-30Document screen tab switching (TAB, Shift-TAB keys)Daniel Lange
2022-04-30FreeBSD: free emulation stringChristian Göttsche
2022-04-30Fix typoChristian Göttsche
2022-04-30Remove redundant null checks on Settings_write (covscan)Nathan Scott
Coverity scan reports that there is dead code in Settings_write checking for nulls that have already been dereferenced on every code path leading to the check. This is likely a hangover from times when the screens pointer was only conditionally allocated - they're not needed anymore.
2022-04-30Add array bounds checking for the Process_fields array (covscan)Nathan Scott
Coverity scan reports there may be a code path that would cause an overrun in the (relatively new) ScreenSettings code where it evaluates default sort direction. Add bounds check and default to descending instead of a potentially invalid array access.
2022-04-29Add changelog entries for pending htop-3.2.0 release, update versionNathan Scott
2022-04-26Merge branch 'main' of thesamesam/htopDaniel Lange
2022-04-26Remove stray fprintf left from testing (introduced in 7039abe)Daniel Lange
2022-04-21Assume process just started when kproc->ki_start returns garbageBenny Baumann
2022-04-21Avoid extremely large year values when printing timeBenny Baumann
2022-04-21Force elapsed time display to zero if process seems started in the futureBenny Baumann
2022-04-18Process: Fix PID & UID column widths off-by-one errorExplorer09
If the max PID or UID value for a platform is exactly a power of ten (10000, 100000, etc.) the column widths of PID and UID would be 1 char less than the correct number of digits. This is caused by the wrong rounding function (ceil(x)); change to the correct one (trunc(x) + 1). Signed-off-by: Kang-Che Sung <explorer09@gmail.com>
2022-04-14README: Add macOS build dependency install commandahsmha
2022-04-14Merge branch 'allow-multiple-filters-and-search-strings' into mainDaniel Lange
Closes #961
2022-04-14Merge branch 'improve-filter-label' into mainDaniel Lange
2022-04-07Make CLANG happy (-Wembedded-directive)Daniel Lange
2022-04-07Do not show help for -M / --no-mouse if HAVE_GETMOUSE is undefinedDaniel Lange
2022-04-05Fix a compile warning: comparison of unsigned enum expression < 0 is always ↵hwangcc23
false Get this warning when compiling Settings.c on the Mac OS X with clang-800.0.42.1. Settings.c:447:28: warning: comparison of unsigned enum expression < 0 is always false [-Wtautological-compare] if (this->hLayout < 0 || this->hLayout >= LAST_HEADER_LAYOUT) ~~~~~~~~~~~~~ ^ ~ This patch fixes the problem.
2022-04-03configure.ac: fix static build with hwlocFabrice Fontaine
Retrieve hwloc dependencies through pkg-config to avoid the following static build failure: checking for hwloc_get_proc_cpubind in -lhwloc... no configure: error: can not find required library libhwloc This build failure is raised because without pkg-config, hwloc dependencies such as libxml2 are not retrieved: configure:8999: checking for hwloc_get_proc_cpubind in -lhwloc configure:9022: /home/autobuild/autobuild/instance-0/output-1/host/bin/powerpc-buildroot-linux-uclibc-gcc -o conftest -D_GNU_SOURCE -I/home/autobuild/autobuild/instance-0/output-1/host/powerpc-buildroot-linux-uclibc/sysroot/usr/bin/../../usr/include -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Og -g0 -static -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -static conftest.c -lhwloc -llzma -L/home/autobuild/autobuild/instance-0/output-1/host/powerpc-buildroot-linux-uclibc/sysroot/usr/bin/../../usr/lib -lncurses -lm >&5 /home/autobuild/autobuild/instance-0/output-1/host/lib/gcc/powerpc-buildroot-linux-uclibc/10.3.0/../../../../powerpc-buildroot-linux-uclibc/bin/ld: /home/autobuild/autobuild/instance-0/output-1/host/powerpc-buildroot-linux-uclibc/sysroot/usr/bin/../../usr/lib/libhwloc.a(topology-xml-libxml.o): in function `hwloc_libxml_free_buffer': topology-xml-libxml.c:(.text+0x6a): undefined reference to `xmlFree' Fixes: - http://autobuild.buildroot.org/results/5d815ec08c580005a863df6ac9ac29deff7d4128 Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2022-04-02Guess lxc or docker from /proc/1/mountsDaniel Lange
At the moment this is used to make the memory meter report sane values even if the host has ZFS and that leaks through into a containerized environment Fixes #863 Includes a clever check for magic PROC_PID_INIT_INO in /proc/self/ns/pid thanks to Pavel Snajdr (snajpa)
2022-04-02Merge branch 'full_meter' of cgzones/htop into mainDaniel Lange
Closes #786
2022-04-02Merge branch 'main' (Linux: fix crash in LXD, fixes #965) of er-azh/htop ↵Daniel Lange
into main
2022-04-02Fix header layout and meters reset if a header column is emptyDaniel Lange
Closes #880 Patch from BenBE and cgzones
2022-03-27use xCalloc for allocating cpuDataer-azh
2022-03-26Linux: allocate cpuData before reading cpu count.er-azh
2022-03-26Linux: fix crash in LXDer-azh
2022-03-25Improve String_contains_i to allow for multiple termsDaniel Lange
This enables: * Multiple filters in the main panel and strace etc. views * Multiple search terms The search terms are separated by "|" and are still fixed strings matched case-insensitive. Added a multi flag at request of BenBE.
2022-03-25Improve MainPanel Label on active inc filter (Filter <-> FILTER)Daniel Lange
2022-03-24README: Add Archlinux build dependency install commandHeshamTB
Signed-off-by: HeshamTB <hishaminv@gmail.com>
2022-03-14Make sure License is correctly specified as GNU GPLv2+ in some more file headersDaniel Lange
2022-03-06Skip system slice nameBenny Baumann
This shortens paths like /system.slice/system-postgres.slice/postgres@12-main.service to /[S]/postgres@12-main. Without this some cgroup names for getty processes explode in length.
2022-03-06Reduce column width spam by snapdBenny Baumann
2022-03-06Auto-size (normalized) CPU usage columnsBenny Baumann
2022-03-06Linux: dynamically adjust column width of CGROUP C(ompressed)CGROUPChristian Göttsche
2022-03-06Linux: dynamically adjust the SECATTR column widthChristian Göttsche
SELinux contexts can be quite long; adjust the column width dynamically at each cycle to the longest value. Also with the recent addition of multiple screens, over-long columns can be moved into their own screen.
2022-02-19Process: Handle rounding ambiguity between 99.9 and 100.0Kumar
Depending upon default behavior of the compiler and floating-point environment, compiler could round down the value between "99.9" and "100.0" to "99.0", instead of rounding it to the nearest value, "100.0". Note: The floating-point environment access and modification is only meaningful when "#pragma STD FENV_ACCESS" is set to "ON"[1]. Otherwise implementation is free to assume that floating-point control modes are always the default. So it would be a good idea to address the rounding ambiguity between "99.9" and "100.0" to become compiler agnostic. [1]: https://en.cppreference.com/w/c/numeric/fenv Credits: @Explorer09, thanks for the suggestion.
2022-02-19Process: Show only integer value when CPU% more than 99.9%Kumar
When we run a process which utilizes CPU between 100.0% and 999.9%, htop shows an unnecessary decimal character at the end of the value. For example, '100.x' and '247.x' become '100.' and '247.' respectively. When CPU utilization is less than and equal to '99.9%', show the result with single digit precision and if result is less than four characters, pad it with the blank space. When CPU utilization is greater than '99.9%', show only integral part of the result and if it's less than four characters, pad it with the blank space. Closes: #946
2022-02-18darwin: lazily set process TTY nameCharlie Vieth
Fetching the TTY name of a process is extremely expensive on darwin and the call to devname accounts for 95% of htop's CPU usage when there is high process turnover (this is mostly due to devname calling lstat, which is incredibly slow). This can make htop unresponsive. To mitigate this only set the process TTY name if the it is being actively displayed (PROCESS_FLAG_TTY), which by default it is not on darwin.
2022-02-13ProcessList_buildTreeBranch: drop extra assertDenis Lisov
It essentially only checks Vector_add, and there's already an assert for that in the vector code.
2022-02-13ProcessList_buildTree: skip hashtable if known rootDenis Lisov
Don't waste time looking up the parent if the current process is already known to be a root process.
2022-02-13ProcessList: delay tree rebuild until panel rebuildDenis Lisov
2022-02-13ProcessList: cleanup the tree set sorting remainsDenis Lisov
They're no longer needed as rebuilding the tree from scratch is just as fast.
2022-02-13ProcessList_buildTree: produce sorted treeDenis Lisov
ProcessList_buildTree does not need any particular sort order for children of the same process or roots. Switching these to the sort order configured by the user produces sorted tree automatically, making repeat sort unnecessary.
2022-02-13ProcessList_buildTree: sort by parent for fast searchDenis Lisov
ProcessList_buildTreeBranch used to search for children with a linear scan of the process table, which made tree build time quadratic in process count. Pre-sorting the list by parent PID (if known) makes it possible to select the correct slice by bisection much faster.