summaryrefslogtreecommitdiffstats
path: root/Makefile.am
AgeCommit message (Collapse)Author
2024-04-20New header "MeterMode.h" for MeterModeId definitionsExplorer09
This is a prerequisite to using MeterModeId type in more headers, to avoid header dependency hell.
2024-04-05linux: move libnl code into separate fileChristian Göttsche
Move all the code using libnl functionality into a separate file to ease modifications. No functional change.
2024-03-27Linux: add GPU meter and process columnChristian Göttsche
Based on the DRM client usage stats[1] add statistics for GPU time spend and percentage utilization. [1]: https://www.kernel.org/doc/html/latest/gpu/drm-usage-stats.html
2023-12-26Do not touch CFLAGS in configure.acBenny Baumann
This fixes an inconsistency between tests run by ./configure and actual make
2023-08-31Rename ProcessList to ProcessTable throughoutNathan Scott
Following up with some discusson from a few months back, where it was proposed that ProcessTable is a better name. This data structure is definitely not a list ... if it was one-dimensional it'd be a set, but in practice it has much more in common with a two-dimensional table. The Process table is a familiar operating system concept for many people too so it resonates a little in that way as well.
2023-08-30Rename PCPMetric files, structures and related internal functionsNathan Scott
Simplify names to just Metric in this case as it is not mirroring core htop naming (which is the norm for that naming convention).
2023-08-30Support dynamic screens with 'top-most' entities beyond processesSohaib Mohamed
This implements our concept of 'dynamic screens' in htop, with a first use-case of pcp-htop displaying things like top-filesystem and top-cgroups under new screen tabs. However the idea is more general than use in pcp-htop and we've paved the way here for us to collectively build mroe general tabular screens in core htop, as well. From the pcp-htop side of things, dynamic screens are configured using text-based configuration files that define the mapping for PCP metrics to columns (and metric instances to rows). Metrics are defined either directly (via metric names) or indirectly via PCP derived metric specifications. Value scaling and the units displayed is automatic based on PCP metric units and data types. This commit represents a collaborative effort of several months, primarily between myself, Nathan and BenBE. Signed-off-by: Sohaib Mohamed <sohaib.amhmd@gmail.com> Signed-off-by: Nathan Scott <nathans@redhat.com>
2023-08-30Introduce Row and Table classes for screens beyond top-processesNathan Scott
This commit refactors the Process and ProcessList structures such they each have a new parent - Row and Table, respectively. These new classes handle screen updates relating to anything that could be represented in tabular format, e.g. cgroups, filesystems, etc, without us having to reimplement the display logic repeatedly for each new entity.
2023-05-22Changes in configuration to identify location of 'term.h'Sahil Siddiq
* ProvideTerm.h: New file * Update configure.ac to detect term.h * Update iwyu/htop.imp * Add ProvideTerm.h to Makefile Co-authored-by: BenBE <BenBE@geshi.org>
2023-05-08Adapt platform code for the new Machine base classNathan Scott
Move host-centric data to new derived <Platform>Machine classes, separate from process-list-centric data.
2023-05-08Introduce Machine class for host-specific info (split from ProcessList)Nathan Scott
First stage in sanitizing the process list structure so that htop can support other types of lists too (cgroups, filesystems, ...), in the not-too-distant future. This introduces struct Machine for system-wide information while keeping process-list information in ProcessList (now much less). Next step is to propogate this separation into each platform, to match these core changes.
2023-04-23Linux: implement zswap supportIvan Shapovalov
On Linux, use zswap to populate "compressed memory" metrics added in the previous commit. Fixes #104.
2023-02-19Implement File Descriptor Meter support for DarwinBenny Baumann
2023-02-19Implement File Descriptor Meter support for DragonflyBSD/FreeBSD/NetBSDBenny Baumann
2023-02-19Create new File Descriptor meterBenny Baumann
2023-02-05Add support for scheduling policiesChristian Göttsche
Add a process column for scheduling policy to show the current scheduling policy of the process. Add a the ability to change the scheduling policy of a process via the key 'Y'. Currently implemented on Linux and FreeBSD only but should be portable, since sched_getscheduler(2) is part of POSIX.1-2001. Closes: #1161
2021-12-07Introduce screen tabsHisham Muhammad
This is a forward port (by nathans) of Hisham's original code.
2021-11-28Compress cgroup names based on some heuristicsBenny Baumann
2021-09-26Extract Darwin "PlatformHelpers"Alexander Momchilov
2021-09-23Adjust Makefile.am macro definitions for older automake versionsNathan Scott
Fixes: #803
2021-08-22Add option to change Header layoutChristian Göttsche
2021-08-17Add combined memory and swap meterChristian Göttsche
Closes: #699
2021-08-16PCP: PCPMetric.[ch] MdouleSohaib
Split the PCP Metric API (functions `Metric_*`) into their own module. as @BenBE suggested.
2021-08-13PCP: support for 'dynamic columns' added at runtimeSohaib Mohamed
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.
2021-08-02Makefile.am fix that actually does a proper substitutionBenny Baumann
2021-08-02Fix portability issue in Makefile.amBenny Baumann
Fixes #662
2021-07-07Add a new DynamicMeter class for runtime Meter extensionNathan Scott
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.
2021-06-26Sync changes from master and fix minor warningsfraggerfox
2021-06-26Add NetBSD platform support without procfs dependencyfraggerfox
- TODO, clean up the code base and update comments in code.
2021-06-09Add time handling interfaces for the pcp platformNathan Scott
Related to https://github.com/htop-dev/htop/pull/574
2021-06-09Implement command line and environment handling for pcp htop.Nathan Scott
2021-06-09Add ZFS ARC statistics and meters to the PCP platformSohaib
2021-06-09Add a platform for Performance Co-Pilot (PCP) metricsNathan Scott
This introduces an initial platform for extracting metrics using the PCP performance metrics API - PMAPI(3). It can be used via the --enable-pcp=yes configure option. So far I've added support for live localhost metrics only, and only using pre-defined metrics already found in htop. If available, all sampling is performed by pmcd(1) - else, we fallback to htop doing the metric sampling itself (all below the PMAPI). When pmcd is used, it may be configured to run children with elevated privileges, so htop does not need to be setuid (authentication with pmcd is available). Additionally, the PMAPI allows us to support archives (for historical analysis and for automated regression tests in htop). We'll need platform-specific command line argument additions, which isn't yet feasible in htop (not difficult to add though). The goal of this first version is minimal impact in terms of modifying the htop codebase, to introduce key ideas in PCP (metric namespace, metadata, APIs and so on) and give us something to discuss, experiment with and build on.
2021-04-05Request the realtime and monotonic clock times once per sampleNathan Scott
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
2021-03-25Abstract htop main function to allow for a platform binaryNathan Scott
One review request relating to the PCP platform is to have a clearly separate binary from the regular htop so that we have no confusion as to what is being requested to run, to aid debugging, and a bunch of other good reasons. This commit renames htop.c to CommandLine.c and provides a minimal htop main function for 'native' platforms to use. The PCP version of this will setup libpcp.so and then call the same CommandLine_run function as regular htop. Related to https://github.com/htop-dev/htop/pull/536
2021-03-04Move generic (shared) code into its own sub-directoryNathan Scott
Code that is shared across some (but not all) platforms is moved into a 'generic' home. Makefile.am cleanups to match plus some minor alphabetic reordering/formatting. As discussed in https://github.com/htop-dev/htop/pull/553
2021-03-04Separate display from sampling in SysArch and Hostname MetersNathan Scott
Several of our newer meters have merged coding concerns in terms of extracting values and displaying those values. This commit rectifies that for the SysArch and Hostname meters, allowing use of this code with alternative front/back ends. The SysArch code is also refined to detect whether the platform has an os-release file at all and/or the sys/utsname.h header via configure.ac.
2021-02-17Merge branch 'enable-better-debug-on-enable-debug' of fasterit/htopDaniel Lange
2021-02-17Drop empty file zfs/ZfsArcStats.cChristian Göttsche
2021-02-16Drop -DDEBUG (was removed in d69585b82abfdaede9e8c358982a4953c432e8d2), add ↵Daniel Lange
-Og for make debug target
2021-01-31Quote SYSCONFDIR definitionChristian Göttsche
As SYSCONFDIR is a compile time string literal, use compile time string concatenation instead of a runtime one. Also drop related TODO, cause we indeed using the correct way of getting $sysconfdir from autoconf
2021-01-31[#480] SysArchMeter to view kernel/arch infoahgamut
At start, SysArchMeter calls the uname function to obtain the kernel version and architecture. If available, the distro version is obtained by calling lsb_release. The obtained values are stored in static variables and used when updating the meter.
2021-01-28Drop duplicate optionChristian Göttsche
Option subdir-objects is now define in configure.ac
2021-01-25configure: misc modernizationsChristian Göttsche
- require autoconf version 2.69 was released in 2012 and one still can configure and build on older systems (just not generate the configure script) - use modern C99 compiler check - drop obsolete checks: AC_C_CONST, AC_FUNC_CLOSEDIR_VOID, AC_FUNC_STAT - drop AC_HEADER_STDBOOL in favor of C99 compatibility
2021-01-19Linux: handle hugepagesChristian Göttsche
Subtract hugepages from normal memory. Add a HugePageMeter. Closes: #447
2020-12-20DragonFlyBSD updateChristian Göttsche
- drop unused kinfo includes and link argument - detect kvm library necessity at configure step - fix variable typo
2020-12-19Rework enum ProcessFieldChristian Göttsche
Use only one enum instead of a global and a platform specific one. Drop Platform_numberOfFields global variable. Set known size of Process_fields array
2020-12-05Update htop logo, provide .svg file as wellDaniel Lange
2020-12-02Dynamically load libsensors at runtimeChristian Göttsche
2020-11-25Drop taskstats conditionalChristian Göttsche
taskstats is only checked on runtime if the column RCHAR, WCHAR, SYSCR, SYSCW, RBYTES, WBYTES, CNCLWB, IO_READ_RATE, IO_WRITE_RATE or IO_RATE is selected. taskstats is currently enabled by default. Drop the taskstats configuration switch, to reduce the maintenance cost.