summaryrefslogtreecommitdiffstats
path: root/linux
AgeCommit message (Collapse)Author
2020-08-25Avoid shadowing warningsChristian Göttsche
2020-08-25Avoid conversion warningChristian Göttsche
linux/Platform.c:47:90: error: implicit conversion from ‘enum LinuxProcessFields’ to ‘enum ProcessFields’ [-Werror=enum-conversion] 47 | ProcessField Platform_defaultFields[] = { PID, USER, PRIORITY, NICE, M_SIZE, M_RESIDENT, M_SHARE, STATE, PERCENT_CPU, PERCENT_MEM, TIME, COMM, 0 }; |
2020-08-22Updates to project URLs in docs and embedded in source codeNathan Scott
2020-08-22Update header files to match whitespace changes in source filesNathan Scott
2020-08-21Remove trailing whitespacesChristian Göttsche
2020-08-21Introduce xAsprintf as checked version of asprintfChristian Göttsche
2020-08-20Merge branch 'hishamhm-pull-920'3.0.0rc1Nathan Scott
2020-08-20Merge branch 'hishamhm-pull-1012'Nathan Scott
2020-08-20Merge branch 'hishamhm-pull-970'Nathan Scott
2020-08-20Merge branch 'hishamhm-pull-932'Nathan Scott
2020-08-20Merge branch 'hishamhm-pull-960'Nathan Scott
2020-08-20Merge branch 'hishamhm-pull-946'Nathan Scott
2020-08-20Merge branch 'hishamhm-pull-890'Nathan Scott
2020-08-20Merge branch 'hishamhm-pull-890'Nathan Scott
2020-08-20Merge branch 'hishamhm-pull-866'Nathan Scott
2020-08-20Merge branch 'hishamhm-pull-857'Nathan Scott
2020-08-20Resolve compiler warnings and errors relating to the Arg unionNathan Scott
Promote the Arg union to a core data type in Object.c such that it is visible everywhere (many source files need it), and correct declarations of several functions that use it. The Process_sendSignal function is also corrected to have the expected return type (bool, not void) - an error being masked by ignoring this not-quite-harmless warning. I've also added error checking to the kill(2) call here, which was previously overlooked / missing (?).
2020-08-19Correction to smaps buffer size passed to smaps path snprintfNathan Scott
2020-08-19Merge branch 'hishamhm-pull-843'Nathan Scott
2020-08-18Re-generate all headers with latest scripts/MakeHeader.pyNathan Scott
Sync-up missing extern declarations for many functions.
2020-08-18Merge branch 'hishamhm-pull-842'Nathan Scott
2020-07-10Resolve complation issues with -fno-common (default from gcc-10)Nathan Scott
Extends the MakeHeader script to auto-generate correct "extern" function declarations in some cases that it currently does not. Related to https://github.com/hishamhm/htop/pull/981
2020-06-11adding support for more than 2 smaller cpumeter columnsChristoph Budziszewski
2019-12-14Properly identify zombie processesJure Oder
This closes issue #930.
2019-10-31Clean up existing whitespaceDaniel Flanagan
2019-09-07Linux: fixes sysfs battery discoverysmattie
2019-09-03Linux fixesRoss Williams
2019-09-03Support for ZFS Compressed ARC statisticsRoss Williams
2019-09-03Refactor openzfs_sysctl_init() and ZfsArcMeter...Ross Williams
openzfs_sysctl_init() now returns void instead of int. The ZfsArcStats->enabled flag is set inside the init function now, instead of having to be set from its return value. Preparation for more flag setting in Compressed ARC commit. ZfsArcMeter_readStats() added and all Meter->values[] setting moved to it, eliminating duplicated code in {darwin,freebsd,linux,solaris}/Platform.c.
2019-08-10Move sysfs-reading code to LinuxProcessList.c and add average frequency.Arnavion
This way the frequency is read from sysfs only once per update cycle instead of every time the UI is redrawn. This also changes the code to read from /proc/cpuinfo instead. This is because reading from scaling_cur_freq stalls for 10ms if the previous read for the file was more than one second ago. [1] Since htop's update cycle is longer than that, it would cause the read of each CPU's scaling_cur_freq file to block the UI for 20ms. This easily led to a noticeable half-second lag on a 20+ CPU machine. /proc/cpuinfo also has a 10ms delay, but this applies for the whole file so the delay does not scale with the number of CPUs. [2] [1]: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=4815d3c56d1e10449a44089a47544d9ba84fad0d [2]: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=7d5905dc14a87805a59f3c5bf70173aac2bb18f8
2019-08-10Show N/A instead of 0KHz when CPU frequency is not available.Arnavion
2019-08-09Add new display option to also show CPU frequency in CPU meters.Arnavion
The option is only implemented on Linux. On other platforms, and on Linuxes that do not expose the relevant sysfs file, the frequency will be 0. The "CPU average" meter does not show a frequency, only the individual per-CPU meters.
2019-07-07Refactor common OpenZFS sysctl accessRoss Williams
Darwin and FreeBSD export zfs kstats through the same APIs, so moving functions into a common file.
2019-07-07ZFS arcstats for LinuxRoss Williams
If no pools are imported (ARC size == 0) or the ZFS module is not in the kernel (/proc/spl/kstat/zfs/arcstats does not exist), then the Meter reports "Unavailable".
2019-03-20Linux: Use /proc/*/smaps_rollup for improved PSS parsing speedAlexander Schlarb
2019-03-20Linux: Add PSS (proportional set size), Swap and SwapPSS calculationAlexander Schlarb
Original code was written by *Craig M. Brandenburg* for htop 1.0.2 Many performance improvements by GitHub user *linvinus*, ported to htop 2.0.2
2019-02-13Add pressure stall information (PSI) meters on LinuxRan Benita
The pressure stall information (PSI) metrics provide useful information on delays caused by waiting for CPU, IO and memory. Particularly on busy servers it can provide a quick overview of what's "slowing things down". This feature is supported on Linux >= 4.20. The interface is documented here: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/plain/Documentation/accounting/psi.txt These links provide rationale: https://lwn.net/Articles/759781/ https://facebookmicrosites.github.io/psi/ The following metrics are added, corresponding to the currently exposed lines (see `head /proc/pressure/*`): - PressureStallCPUSome - PressureStallIOSome - PressureStallIOFull - PressureStallMemorySome - PressureStallMemoryFull The color scheme is the same as that used for Load Average, however I gave it separate entries just in case someone wants to change them specifically. Tested on 4.20.7-arch1-1-ARCH, on the linux platform. Also tested that other platforms still compile (changed configure to use the unsupported platform). Closes #879.
2019-02-12Don't follow process when selecting non-process-specific optionswangqr
Disable the follow process logic in Action_pickFromVector(), when selecting sort order or user filter, since they don't apply on specific process. Fix #856
2019-02-10Linting changesHisham Muhammad
as reported by lgtm.com
2018-12-15Remove unnecessary HAVE_SYS_SYSMACROS_H checkWataru Ashihara
HAVE_SYS_SYSMACROS_H is always true if MAJOR_IN_SYSMACROS. This way of checking is recommended in autoconf 2.70 documentation: https://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=blobdiff;f=doc/autoconf.texi;h=4f041bd4e;hp=9ad7dc1c5f02c8ba25b2fe1218bf931c7113a5d5;hb=e17a30e987d7ee695fb4294a82d987ec3dc9b974;hpb=565a6dc50cfa01cec2fb4db894026689cdf4970c NOTE: currently https://www.gnu.org/software/autoconf/manual/autoconf.html is the doc for autoconf 2.69.
2018-10-07Widen ST_UID (UID) column to 5 chars to allow UIDs > 9999 without breaking ↵Daniel Lange
alignment Issue Github #841, Debian bug #910492
2018-08-24Linux: fix CPU countHisham Muhammad
2018-08-24Linux: remove warnings of unused variablesHisham Muhammad
2018-08-19Linux: add process->starttime and use it for STARTTIME column (#700)Shawn Landden
this way a remount of /proc will not reset starttimes and we can also see startup times for processes started before the mount of /proc also record btime (boot time in seconds since epoch) as Linux semi-global
2018-07-28Fix process name updates for shorter strings (#812)Score_Under
When a process name changes from a long string to a short string, truncate instead of just overwriting the beginning.
2018-05-22Fix #define to match header when regenerating with MakeHeader.py (#789)Faster IT
from Debian https://sources.debian.org/src/htop/2.2.0-1/debian/patches/fix-linux-process.patch/
2018-03-25Linux: change how kernel threads are detectedHisham Muhammad
Use the same method that ps and top use to determine if a process is a kernel thread on Linux: check if cmdline is empty. Thanks to @wangqr's investigation reported here: https://github.com/hishamhm/htop/issues/761#issuecomment-375306069 Fixes #761.
2018-02-26Updates to generated header filesHisham Muhammad
2018-02-26Fix build failure ('major' undefined) in glibc 2.28. (#746)Kang-Che Sung (宋岡哲)
glibc 2.28 no longer defines 'major' and 'minor' in <sys/types.h> and requires us to include <sys/sysmacros.h>. (glibc 2.25 starts deprecating the macros in <sys/types.h>.) Now do include the latter if found on the system. At the moment, let's also utilize AC_HEADER_MAJOR in configure script. However as Autoconf 2.69 has not yet updated the AC_HEADER_MAJOR macro to reflect the glibc change [1], so add a workaround code. Fixes #663. Supersedes pull request #729. Reference: [1] https://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=commit;h=e17a30e987d7ee695fb4294a82d987ec3dc9b974 Signed-off-by: Kang-Che Sung <explorer09@gmail.com>
2018-02-18Replace size_t with int/void* unionHisham Muhammad
I was occasionally passing negative values to size_t. Plus, this better reflects the intent of the variant argument. Reported by Coverity: https://scan8.coverity.com/reports.htm#v13253/p10402/fileInstanceId=22093891&defectInstanceId=7543346&mergedDefectId=174179&fileStart=251&fileEnd=500