summaryrefslogtreecommitdiffstats
path: root/ProcessList.h
Commit message (Collapse)AuthorAgeFilesLines
* Update license headers to explicitly say GPLv2+Daniel Lange2021-09-221-1/+1
|
* IWYU updateChristian Göttsche2021-08-251-0/+1
|
* PCP: support for 'dynamic columns' added at runtimeSohaib Mohamed2021-08-131-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Add ProcessList_isCPUonlineChristian Göttsche2021-07-181-0/+2
|
* Rework CPU countingChristian Göttsche2021-07-181-1/+2
| | | | | | | | | | | 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
* Add a new DynamicMeter class for runtime Meter extensionNathan Scott2021-07-071-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* cleaned up includes with iwyumayurdahibhate2021-05-101-0/+2
|
* Drop ProcessList_get and ProcessList_sizeChristian Göttsche2021-04-211-4/+0
| | | | Only used inside ProcessList.c and only once each.
* Request the realtime and monotonic clock times once per sampleNathan Scott2021-04-051-4/+3
| | | | | | | | | | | | | | | | Refactor the sample time code to make one call to gettimeofday (aka the realtime clock in clock_gettime, when available) and one to the monotonic clock. Stores each in more appropriately named ProcessList fields for ready access when needed. Every platform gets the opportunity to provide their own clock code, and the existing Mac OS X specific code is moved below darwin instead of in Compat. A couple of leftover time(2) calls are converted to use these ProcessList fields as well, instead of yet again sampling the system clock. Related to https://github.com/htop-dev/htop/pull/574
* Merging all the points related to calculating time in one placeSohaib2021-04-051-0/+3
| | | | | | | | | | | | | | The end goal is to consolidate all the points in htop that can only work in live-only mode today, so that will be able to inject PCP archive mode and have a chance at it working. The biggest problem we've got at this moment is all the places that are independently asking the kernel to 'give me the time right now'. Each of those needs to be audited and ultimately changed to allow platforms to manage their own idea of time. So, all the calls to gettimeofday(2) and time(2) are potential problems. Ultimately I want to get these down to just one or two. Related to https://github.com/htop-dev/htop/pull/574
* Merge branch 'openbsd' of cgzones/htopDaniel Lange2021-03-211-0/+4
|\
| * OpenBSD: updateChristian Göttsche2021-03-201-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Set process data for: - minflt - majflt - processor - nlwp * Drop unimplemented nlwp column * Scan userland threads * Mark a 'Thread is currently on a CPU.' with 'R', and processes 'Currently runnable' with 'P', do confine with man:ps(1) and Linux. See https://man.openbsd.org/ps.1 * Show CPU frequency
* | Use unsigned types for CPU counts and associated variablesChristian Göttsche2021-03-191-5/+5
|/
* Linux: individually show shared memoryChristian Göttsche2021-03-151-0/+1
| | | | | | | | Shmem: Total memory used by shared memory (shmem) and tmpfs Source: https://www.kernel.org/doc/Documentation/filesystems/proc.txt Closes: #556
* Option and key ("*") to collapse / expand all branches under PID 1Daniel Lange2021-02-131-0/+2
| | | | | | | (and PID 2 if kernel threads are shown) Based on hishamhm/htop#510 by Krishna Chaitanya, B Closes #68
* Linux: overhaul memory partitionChristian Göttsche2021-02-071-7/+11
| | | | | | | Use similar calculation than procps. Show AvailableMemory in text mode. Use total minus available memory instead of manually computed used- memory as fraction part in bar mode (if available).
* Linux: Add SwapCached to the swap meterDavid Zarzycki2021-01-111-1/+2
| | | | | | | According to the Linux kernel documentation, "SwapCached" tracks "memory that once was swapped out, is swapped back in but still also is in the swapfile (if memory is needed it doesn't need to be swapped out AGAIN because it is already in the swapfile. This saves I/O)."
* Mark several non-modified pointer variables constChristian Göttsche2021-01-111-3/+3
|
* Implement sorting in tree modeMaxim Zhiburt2020-12-021-0/+3
|
* Drop unused global ProcessList memory fieldsNathan Scott2020-11-271-2/+0
| | | | | | | | | | The global ProcessList structure contains a couple of unused fields. 'sharedMem' has never been used by any Meter, since its not been anything other than zero in Linux /proc/meminfo for many, many years. The freeMem field is only used in the usedMem calculation, so it can reside on the stack like some other memory variables used within-calculations-only and not exposed to the user via a Meter.
* Apply patch from BenBE as per ↵Daniel Lange2020-11-161-1/+0
| | | | https://github.com/htop-dev/htop/pull/241#issuecomment-720081138
* Merge branch 'hili-new-old' of adsr/htop into highlight-new-old-processesDaniel Lange2020-11-161-0/+2
|\
| * Highlight new and old processes (#74)Adam Saponara2020-10-301-0/+2
| |
* | Mark ProcessList_keyAt argument constChristian Göttsche2020-11-151-1/+1
|/
* Unify function argument namesChristian Göttsche2020-10-281-2/+2
| | | | | Name first argument of ProcessList_goThroughEntries consistently super Name first argument of ProcessList_new consistently userTable
* Hold only a const version of Settings in ProcessListChristian Göttsche2020-10-261-1/+1
|
* Continue to update generic data in paused modeChristian Göttsche2020-10-191-2/+2
| | | | | | | | | Generic data, as CPU and memory usage, are used by Meters. In paused mode they would stop receiving updates and especially Graph Meters would stop showing continuous data. Improves: #214 Closes: #253
* Make all required includes explicitBenny Baumann2020-10-181-0/+8
| | | | Information as seen by IWYU 0.12 + clang 9 on Linux
* Mark Object classes and Object class fields constChristian Göttsche2020-10-071-1/+1
|
* Update License consistently to GPLv2 as per COPYING fileDaniel Lange2020-10-051-1/+1
|
* Sort headers/includesBenny Baumann2020-09-291-2/+2
|
* Switch variable/field naming from WhiteList to MatchListNathan Scott2020-09-091-3/+3
|
* Remove superfluous 'extern's from function declarations.Zev Weiss2020-09-031-14/+14
| | | | | | | | Applied via: $ find * -name '*.h' -exec sed -i -r 's/^extern (.+\()/\1/;' {} + Suggested-by: Bert Wesarg <bert.wesarg@googlemail.com>
* Axe automated header generation.Zev Weiss2020-09-031-2/+0
| | | | | | | | | | | | | | Reasoning: - implementation was unsound -- broke down when I added a fairly basic macro definition expanding to a struct initializer in a *.c file. - made it way too easy (e.g. via otherwise totally innocuous git commands) to end up with timestamps such that it always ran MakeHeader.py but never used its output, leading to overbuild noise when running what should be a null 'make'. - but mostly: it's just an awkward way of dealing with C code.
* Re-generate all headers with latest scripts/MakeHeader.pyNathan Scott2020-08-181-14/+14
| | | | Sync-up missing extern declarations for many functions.
* Portable affinity using hwlocHisham2016-02-141-0/+4
|
* Fixes to use platform-specific compare routines.Hisham Muhammad2015-04-091-1/+1
|
* Merge branch 'master' into wipHisham Muhammad2015-04-021-1/+1
|\ | | | | | | | | | | | | | | | | | | Conflicts: Process.c Process.h htop.c linux/LinuxProcess.c linux/LinuxProcess.h test_spec.lua
* | Major advances in FreeBSD port.Hisham Muhammad2015-03-161-1/+9
| |
* | Get FreeBSD tree to compile again with latest changes.Hisham Muhammad2015-03-161-0/+10
| |
* | Sorry about the mega-patch.Hisham Muhammad2015-01-211-90/+8
|/ | | | | This is a work-in-progress, code is currently broken. (Some actions, and notably, the header, are missing.)
* Add ProcessList_delete to the variable interface.Hisham Muhammad2014-11-271-1/+2
|
* Changes for supporting separate platform subdirectories.Hisham Muhammad2014-11-241-36/+9
|
* Refactored key handlers.Hisham Muhammad2014-11-191-1/+1
| | | | | | Made the logic more modular, hopefully easier to follow, and removed repeated code. Plus, some optimization in RichString code.
* alignment improvementsHisham Muhammad2014-02-271-2/+2
|
* Added additional column to monitor OOM killer score of each processLeigh Simpson2014-01-291-0/+4
|
* Make CPU meter optionally account guest time in its percentagesHisham Muhammad2013-12-181-0/+1
|
* Performance improvements due to conditional parsing of IO data depending on ↵Hisham Muhammad2013-05-241-0/+1
| | | | | | | selected fields. On my machine, this gives a ~20% improvement in htop process time use with the default config.
* Performance improvementsHisham Muhammad2013-04-291-1/+0
| | | | | (thanks to Jann Horn)
* Changes in object model: separate class objects to store vtable. Also, nicer ↵Hisham Muhammad2012-12-051-6/+0
| | | | UTF-8 display of big numbers.

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