summaryrefslogtreecommitdiffstats
path: root/linux
AgeCommit message (Collapse)Author
2020-08-31Reduce oom cast from long to intChristian Göttsche
Oom values should never be greater then INT_MAX, they should be in the range 0 - 1000. Improves: d9a5dd4b916636b5e7ba8631885427372f0cfcad
2020-08-31Merge branch 'configure' of https://github.com/cgzones/htop into ↵Nathan Scott
cgzones-configure
2020-08-31Merge branch 'master' of github.com:htop-dev/htopNathan Scott
2020-08-28Check btime sscanf parse from /proc/statChristian Göttsche
Found by Coverity
2020-08-28Avoid use of uninitialized variablesChristian Göttsche
Found by Coverity
2020-08-28Ignore sscanf return value of /proc/statChristian Göttsche
Found by Coverity
2020-08-28Fail on out-of-range CPU numberChristian Göttsche
Found by Coverity
2020-08-28Improve OOM outputChristian Göttsche
* Fix sort by adding cast * Shrink column size to 4 * Drop unnecessary maximum field width specifier in sscanf
2020-08-28Really tell gcc to ignore return value of fscanfChristian Göttsche
2020-08-28Increae the size of sysfs power supply path buffersNathan Scott
Resolves https://github.com/htop-dev/htop/issues/15
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.