summaryrefslogtreecommitdiffstats
path: root/linux
Commit message (Collapse)AuthorAgeFilesLines
* IWYU updateChristian Göttsche2021-08-257-9/+15
|
* Linux: do not scan frequency for inactive CPUsChristian Göttsche2021-08-221-0/+3
|
* Add combined memory and swap meterChristian Göttsche2021-08-171-0/+2
| | | | Closes: #699
* Simplify Action_pickFromVector() width parameter usageChristian Göttsche2021-08-161-1/+1
| | | | Pass one less instead of subtracting one inside the function.
* Respect "Show custom thread names" setting updateChristian Göttsche2021-08-141-11/+8
| | | | | | | Update merged command-line when started with "Show custom thread names" disabled and enabling at runtime. Also only consider showThreadNames when working on userland threads.
* Merge branch 'dynamic-columns' of https://github.com/smalinux/htop into ↵Nathan Scott2021-08-133-6/+11
|\ | | | | | | smalinux-dynamic-columns
| * PCP: support for 'dynamic columns' added at runtimeSohaib Mohamed2021-08-133-6/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implements support for arbitrary Performance Co-Pilot metrics with per-process instance domains to form new htop columns. The column-to-metric mappings are setup using configuration files which will be documented via man pages as part of a follow-up commit. We provide an initial set of column configurations so as to provide new capabilities to pcp-htop: including configs for containers, open fd counts, scheduler run queue time, tcp/udp bytes/calls sent/recv, delay acct, virtual machine guests, detailed virtual memory, swap. Note there is a change to the configuration file path resolution algorithm introduced for 'dynamic meters'. First, look in any custom PCP_HTOP_DIR location. Then iterate, in priority order, users home directory, then local sysadmins files in /etc/pcp/htop, then readonly configuration files below /usr/share/pcp/htop. This final location becomes the preferred place for our own shipped meter and column files. The Settings file (htoprc) writing code is updated to not using the numeric identifier for dynamic columns. The same strategy used for dynamic meters is used here where we write Dynamic(name) so the name can be setup once more at start. Regular (static) columns writing to htoprc - i.e. numerically indexed - is unchanged.
* | Linux: do not include zram devices in DiskIOChristian Göttsche2021-08-101-0/+3
| | | | | | | | | | The meter is intended to show *real* IO, which is significantly slower than zram.
* | The average CPU utilization value must never be marked 'offline'Nathan Scott2021-08-101-1/+2
| | | | | | | | Fixes https://github.com/htop-dev/htop/issues/729
* | Add Shift-F7, Shift-F8 keybindings for autogroupsDaniel Lange2021-08-091-0/+2
| |
* | Add columns for process autogroup identifier and nice valueNathan Scott2021-08-096-2/+129
| | | | | | | | | | | | | | | | | | | | | | | | Adds AGRP (autogroup) and ANI (autogroup nice) columns that report the information from /proc/PID/autogroup, as well as handlers for '{' and '}' to change the autogroup nice value. This is guarded by /proc/sys/kernel/sched_autogroup_enabled such that sampling and/or changing values wont be attempted unless the kernel feature is enabled. Fixes: #720
* | Fix misc typosChristian Göttsche2021-08-081-1/+1
|/ | | | [ci skip]
* Add ProcessList_isCPUonlineChristian Göttsche2021-07-182-0/+9
|
* Rework CPU countingChristian Göttsche2021-07-185-71/+163
| | | | | | | | | | | Currently htop does not support offline CPUs and hot-swapping, e.g. via echo 0 > /sys/devices/system/cpu/cpu2/online Split the current single cpuCount variable into activeCPUs and existingCPUs. Supersedes: #650 Related: #580
* Use PATH lookup for systemctl in systemd meterScott Olson2021-07-151-9/+9
| | | | | | Before this change, the systemd meter was broken on distros like NixOS, which have systemctl in PATH, but not at /bin/systemctl. After the change, it works on all my NixOS machines.
* Proper label indentationBenny Baumann2021-07-151-1/+1
|
* Pointer indication aligned to typenameBenny Baumann2021-07-154-10/+10
|
* Code indentationBenny Baumann2021-07-152-8/+8
|
* Split statements that should go onto multiple linesBenny Baumann2021-07-152-2/+5
|
* Add a new DynamicMeter class for runtime Meter extensionNathan Scott2021-07-073-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit is based on exploratory work by Sohaib Mohamed. The end goal is two-fold - to support addition of Meters we build via configuration files for both the PCP platform and for scripts ( https://github.com/htop-dev/htop/issues/526 ) Here, we focus on generic code and the PCP support. A new class DynamicMeter is introduced - it uses the special case 'param' field handling that previously was used only by the CPUMeter, such that every runtime-configured Meter is given a unique identifier. Unlike with the CPUMeter this is used internally only. When reading/writing to htoprc instead of CPU(N) - where N is an integer param (CPU number) - we use the string name for each meter. For example, if we have a configuration for a DynamicMeter for some Redis metrics, we might read and write "Dynamic(redis)". This identifier is subsequently matched (back) up to the configuration file so we're able to re-create arbitrary user configurations. The PCP platform configuration file format is fairly simple. We expand configs from several directories, including the users homedir alongside htoprc (below htop/meters/) and also /etc/pcp/htop/meters. The format will be described via a new pcp-htop(5) man page, but its basically ini-style and each Meter has one or more metric expressions associated, as well as specifications for labels, color and so on via a dot separated notation for individual metrics within the Meter. A few initial sample configuration files are provided below ./pcp/meters that give the general idea. The PCP "derived" metric specification - see pmRegisterDerived(3) - is used as the syntax for specifying metrics in PCP DynamicMeters.
* Replaces WRAP_SUBTRACT with saturatingSub inline function to reduce code ↵fraggerfox2021-06-261-14/+12
| | | | duplication.
* Do not override Linux process library sizeChristian Göttsche2021-06-121-1/+3
| | | | | | The library size in statm is unused and always 0 since Linux 2.6. Fixes: 8154125d4bf26fff20241eebe17954254409a522
* Limit deleted library checkChristian Göttsche2021-06-121-3/+4
| | | | | | | | | | Reading and parsing /proc/<pid>/maps is quite expensive. Do not check for deleted libraries if the main binary has been deleted; in this case the deleted binary takes precedence. Do not check in threads. The check is void for kernel threads and user- land threads can just inherit the state from the main process structure.
* Linux: update process uid on changeChristian Göttsche2021-06-091-7/+10
| | | | Always check if the user of a process changed, e.g. by using setuid(2).
* Linux: drop O_PATH usageChristian Göttsche2021-06-091-7/+1
| | | | | | | | O_PATH is available since Linux 2.6.39, but we are using fstat(2) on the returned file descriptor in LinuxProcessList_statProcessDir(), which is only supported since Linux 3.6. Fixes #534
* Check processes for using deleted shared librariesChristian Göttsche2021-06-091-36/+66
| | | | | | | | | Shared libraries can be replaced by an upgrade, highlight processes using deleted shared libraries. Link with highlightDeletedExe setting, enabled by default. Currently only checked on Linux.
* Move CWD field handling to platform-neutral codeBenny Baumann2021-05-254-26/+8
|
* Linux: add reset to heuristicChristian Göttsche2021-05-251-0/+7
| | | | | | On hard to parse command lines tokenStart might be computed to be bigger than tokenEnd. Reset both values in such cases.
* Add ELAPSED process columnChristian Göttsche2021-05-231-0/+1
| | | | | | | | | Add process columns showing the elapsed time since the process was started. Similar to STARTTIME, but shows the time passed since the process start instead of the fixed start time of the process. Closes https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=782636
* Fix assert failure on short running threadChristian Göttsche2021-05-231-6/+6
| | | | | | | | | | | | | | The following assert failure might happen on short running threads with an empty comm value in /proc/${pid}/stat: htop: Process.c:1159: void Process_updateCmdline(Process *, const char *, int, int): Assertion `(cmdline && basenameStart < (int)strlen(cmdline)) || (!cmdline && basenameStart == 0)' failed. The specific task is: comm='' exe='(null)' cmdline='/usr/bin/ruby /usr/bin/how-can-i-help --apt' So basenameStart is 0, while strlen(cmdline) is also 0.
* Force update when executable was recently deleted/replacedBenny Baumann2021-05-231-0/+4
|
* Linux: use merge command line helpersChristian Göttsche2021-05-231-45/+17
|
* Linux: drop obsolete code now in Process_writeFieldChristian Göttsche2021-05-231-54/+0
|
* Drop mc->maxLen fieldBenny Baumann2021-05-231-3/+0
|
* Move PROC_COMM/PROC_EXE column handling to global Process implementationBenny Baumann2021-05-232-42/+0
|
* Call makeCommandStr on all platformsBenny Baumann2021-05-231-9/+0
|
* Move Process_makeCommandStr to global Process implementationBenny Baumann2021-05-233-360/+4
|
* Move LinuxProcess_getCommandStr to Process_getCommandStrBenny Baumann2021-05-231-12/+0
|
* Move kernel/userland thread handling to platform-independent implementationBenny Baumann2021-05-233-18/+8
|
* Pre-calculate isUserlandThread flagBenny Baumann2021-05-232-3/+3
|
* Move mergeCommand to global process structBenny Baumann2021-05-233-55/+20
|
* Rename cmdlineBasenameOffset to cmdlineBasenameEnd to properly indicate the ↵Benny Baumann2021-05-232-20/+20
| | | | fields purpose
* Move procCmdlineBasenameOffset as cmdlineBasenameStart to global Process ↵Benny Baumann2021-05-233-5/+4
| | | | structure
* Remove duplicate field LinuxProcess->procCmdlineBasenameEndBenny Baumann2021-05-233-6/+2
| | | | This field held practically the same value as cmdlineBasenameEnd
* Move procExeBasenameOffset to main Process structureBenny Baumann2021-05-233-14/+17
| | | | This drops procExeLen, as that field is implicit by strlen(Process->procExe)
* Move procExeDeleted flag to main Process structureBenny Baumann2021-05-233-7/+6
|
* Rename basenameOffset to cmdlineBasenameOffsetBenny Baumann2021-05-231-5/+5
|
* Move procComm and procExe to main Process structureBenny Baumann2021-05-233-27/+23
|
* Rename command line field from comm to cmdlineBenny Baumann2021-05-232-6/+6
|
* Refactor makeCommandStrBenny Baumann2021-05-232-144/+132
|

© 2014-2024 Faster IT GmbH | imprint | privacy policy