summaryrefslogtreecommitdiffstats
path: root/dragonflybsd
Commit message (Collapse)AuthorAgeFilesLines
* Work around GCC14 memleak diagnosticBenny Baumann2024-04-081-1/+1
| | | | | While both pointers are identical, GCC-14 with -fanalyzer complains about these return statements to leak memory. The leak is only reported with LTO though.
* Introduce autoTitleRightAlign column flagChristian Göttsche2024-03-271-1/+1
| | | | | | Instead of handling PERCENT_CPU as a special case for whether to align the title of a dynamically sized column to the right or the left introduce a new flag, which can be reused by other columns.
* DragonFlyBSD: support Disk IO meterChristian Göttsche2024-01-201-3/+58
|
* DragonFlyBSD: support Network IO meterChristian Göttsche2024-01-201-3/+26
|
* DragonFlyBSD: build fixesChristian Göttsche2024-01-204-9/+18
|
* Use consistent style for process field output/compare functionsBenny Baumann2023-12-261-2/+5
|
* Fix code styleBenny Baumann2023-12-261-36/+48
|
* Add includes for config.h as per the discussion in PR #1337Daniel Lange2023-12-261-0/+2
| | | | | | Many thanks to @Explorer09 Kang-Che Sung (宋岡哲). Also add a #error stanza to XUtils.h in case somebody forgets the beautiful mess GNU forces on us.
* Move shared memory next to used memoryKevin Bracey2023-10-261-2/+2
| | | | | | | | | Shared memory is less available than buffers, so move it left next to used memory. This is in preparation for including shared memory in the basic "in use" for the bar text. It would not make sense to sum a discontiguous region.
* Correct pid_t type return from Platform_getMaxPid functionNathan Scott2023-09-042-2/+2
| | | | | | | Coverity scanning shows we end up passing an integer into the Row_setPidColumnWidth routine which requires a pid_t - update each platform to return the correct type (and never return -1 as a failure code, this was being ignored).
* Rename ProcessList to ProcessTable throughoutNathan Scott2023-08-316-49/+49
| | | | | | | | | | | | 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.
* BSD platforms: Reject negative and zero KERN_FSCALE factorsExplorer092023-08-301-1/+1
| | | | | | | | | | | | | | The "fscale" value, retrieved by sysctl() in BSD platforms, is used for computing CPU percentages of the processes. To prevent a division by zero, we should reject a zero "fscale" value. (A negative "fscale" value will not make sense either.) For DragonFlyBSD and FreeBSD, this would fall back to the hard-coded default scale. For NetBSD and OpenBSD, there is no hard-coded default value, so the zero or negative "fscale" is now a fatal error. Signed-off-by: Kang-Che Sung <explorer09@gmail.com>
* DragonFlyBSD build fix (this->kernelFScale)Explorer092023-08-301-3/+3
|
* Support dynamic screens with 'top-most' entities beyond processesSohaib Mohamed2023-08-301-1/+13
| | | | | | | | | | | | | | | | | | | | | | 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>
* Introduce Row and Table classes for screens beyond top-processesNathan Scott2023-08-302-20/+29
| | | | | | | | | 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.
* Replace isnan() with better comparisons (isgreater(), etc.)Explorer092023-08-181-3/+4
| | | | | | | | | | | | | | | | | | The standard isnan() function is defined to never throw FP exceptions even when the argument is a "signaling" NaN. This makes isnan() more expensive than (x != x) expression unless the compiler flag '-fno-signaling-nans' is given. Introduce functions isNaN(), isNonnegative(), isPositive(), sumPositiveValues() and compareRealNumbers(), and replace isnan() in htop's codebase with the new functions. These functions utilize isgreater() and isgreaterequal() comparisons, which do not throw FP exceptions on "quiet" NaNs, which htop uses extensively. With isnan() removed, there is no need to suppress the warning '-Wno-c11-extensions' in FreeBSD. Remove the code from 'configure.ac'. Signed-off-by: Kang-Che Sung <explorer09@gmail.com>
* Build fixes for DragonFlyBSDBenny Baumann2023-05-091-3/+3
|
* Adapt platform code for the new Machine base classNathan Scott2023-05-085-396/+433
| | | | | Move host-centric data to new derived <Platform>Machine classes, separate from process-list-centric data.
* Introduce Machine class for host-specific info (split from ProcessList)Nathan Scott2023-05-085-22/+38
| | | | | | | | | | | 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.
* {Memory,Swap}Meter: add "compressed memory" metricsIvan Shapovalov2023-04-231-1/+3
| | | | | | | | For now, the semantics are mostly fit for Linux zswap subsystem. For instance, we add the third swap usage metric that indicates the amount of memory that is accounted to swap but in fact stored elsewhere. This exactly matches the definition of frontswap/zswap, and is probably of little use to all other platforms.
* Refactor and consolidate dynamic meters/columns pointersNathan Scott2023-04-062-3/+3
| | | | | | | | This removes the duplication of dynamic meter/column hashtable pointers that has come in between the Settings and ProcessList structures - only one copy of these is needed. With the future planned dynamic screens feature adding another pointer, let us first clean this up before any further duplication happens.
* Improve code readability by using enum values instead of raw numbersGuillaume Gomez2023-03-041-3/+3
|
* Implement File Descriptor Meter support for DragonflyBSD/FreeBSD/NetBSDBenny Baumann2023-02-192-0/+10
|
* Use strict function prototypes also for defintionsChristian Göttsche2023-02-041-2/+2
| | | | | | | freebsd/Platform.c:151:23: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] int Platform_getUptime() { ^ void
* Improve code readability by creating constants for SWAP memory valuesGuillaume Gomez2023-01-081-2/+2
|
* Clean out Platform_getInodeFilenameнаб2023-01-082-8/+0
| | | | | | It's an artefact of the previous implementation of Platform_getProcessLocks for Linux, and is never used; there's no reason for it to have ever been exported
* Improve code readability by creating constants for memory valuesGuillaume Gomez2023-01-071-5/+5
|
* Reformat code baseBenny Baumann2022-10-242-5/+13
| | | | | | | | | | | | | | This includes: - Wrap function implementations - Pointer alignment for function signatures - Pointer alignment for variable declarations - Whitespace after keywords - Whitespace after comma - Whitespace around initializers - Whitespace around operators - Code indentation - Line break for single line statements - Misleading alignment
* Fix incorrect processor time of processes on DragonFly BSDWHR2022-08-041-1/+1
|
* Process: Display single digit precision for CPU% greater than 99.9%Kumar2022-05-261-1/+1
| | | | | | | | | | | | | | | | | | | | Since commit edf319e[1], we're dynamically adjusting column width of "CPU%", showing single digit precision also for values greater than "99.9%" makes "CPU%" column consistent with all other values. [1]: edf319e53d1fb77546505e238d75160a3febe56e Change "Process_printPercentage()" function's logic to always display value (i.e. "val") with single precision. Except when value is greater than "99.9%" for columns like "MEM%", whose width is fixed to "4" and value cannot go beyond "100%". Credits: @Explorer09, thanks for the patch[2] to fix title alignment issue. [2]: https://github.com/htop-dev/htop/pull/959#issuecomment-1092480951 Closes: #957
* Auto-size (normalized) CPU usage columnsBenny Baumann2022-03-062-2/+3
|
* freebsd/dragonfly: Stop aligning equals signs in PLATFORM_PROCESS_FIELDSJessica Clarke2022-01-181-2/+2
| | | | | ProcessField doesn't do this, nor does any other OS, and it just makes it more annoying to add a new field.
* Use correct command field as default fieldChristian Göttsche2021-12-171-1/+1
| | | | | The default htop command process field has the enum identifier `COMM` but the name `Command` (`COMM` is the field name for /proc/<PID>/comm).
* Mark ScreenDefaults constChristian Göttsche2021-12-172-2/+2
|
* Introduce screen tabsHisham Muhammad2021-12-073-3/+12
| | | | This is a forward port (by nathans) of Hisham's original code.
* Reduce allocation size of cp_time_n and cp_time_o on FreeBSD and DragonFlyBSDGuillaume Gomez2021-11-191-2/+2
|
* Tidy up process state handlingmarcluque2021-11-021-18/+19
|
* Early program termination only from main()Volodymyr Vasiutyk2021-10-312-4/+6
|
* Dynamically scale the ST_UID size to support 32-bit UIDsSilke Hofstra2021-10-271-2/+2
| | | | | | | | | | | | | | | | | | While most Unix-like systems use 16-bit user IDs, Linux supports 32-bit UIDs since version 2.6. UIDs above 65535 are used for UID namespacing of containers, where a container has its own set of 16-bit user IDs. Processes in such containers will have (much) larger UIDs than 65535. Because the current format strings for `ST_UID` and `USER` are `%5d` and `%9d` respectively, processes with such UIDs lead to misaligned columns. Dynamically scale the `ST_UID` column and increase the size of `USER` to 10 characters (length of UINT32_MAX) to ensure that the user ID always fits. Additionally: clean up how the titlebuffer size calculation and ensure the PID column has a minimum size of 5.
* Memory leak on DragonFlyBSD when querying full command lineBenny Baumann2021-10-031-0/+3
|
* Update license headers to explicitly say GPLv2+Daniel Lange2021-09-227-7/+7
|
* Add completion handling for dynamic meters and columnsNathan Scott2021-09-031-0/+4
| | | | | | | Be sure to free dynamic memory allocated for meters and columns strings, no-op on platforms other than pcp. Closes #774
* Add combined memory and swap meterChristian Göttsche2021-08-171-0/+2
| | | | Closes: #699
* 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.
* Merge branch 'cpu_count' of cgzones/htopDaniel Lange2021-08-023-8/+19
|\
| * DragonFlyBSD: calculate whether to show entry lastChristian Göttsche2021-07-181-2/+1
| | | | | | | | Wait until it has been decided what kind of task the entry actually is.
| * DragonFlyBSD: drop void TODOChristian Göttsche2021-07-181-1/+0
| |
| * Add ProcessList_isCPUonlineChristian Göttsche2021-07-182-0/+11
| |
| * Rework CPU countingChristian Göttsche2021-07-182-5/+7
| | | | | | | | | | | | | | | | | | | | | | 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
* | DragonFlyBSD: fixup: ProcessList_new declaration & definition mismatchSohaib Mohamed2021-07-181-1/+1
|/

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