summaryrefslogtreecommitdiffstats
path: root/darwin
Commit message (Collapse)AuthorAgeFilesLines
* darwin: scan thread informationrobaho8 days3-33/+99
| | | | | | Inspired by: https://github.com/hishamhm/htop/pull/848 Closes: #542
* darwin: avoid double division by zero on startupChristian Göttsche8 days1-6/+12
|
* 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.
* Fix typoChristian Göttsche2024-03-271-1/+1
| | | | [ci skip]
* 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.
* darwin/Platform.c: use mach/port.hSergey Fedorov2024-02-041-1/+1
| | | | | Unbreak builds on macOS versions where _mach_port_t.h does not exist. mach/port.h exists on every macOS and has needed defines.
* Darwin: add NetworkIOMeter supportUeiWang2023-12-291-3/+63
|
* Use consistent style for process field output/compare functionsBenny Baumann2023-12-261-1/+4
|
* Move shared memory next to used memoryKevin Bracey2023-10-261-1/+1
| | | | | | | | | 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-314-36/+36
| | | | | | | | | | | | 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.
* 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-21/+30
| | | | | | | | | 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.
* Avoid VLA on Darwin when reading CPU brandBenny Baumann2023-07-281-3/+2
|
* Remove duplicate zeroing of global task accounting values on MacOSNathan Scott2023-06-061-6/+0
| | | | | This has already been performed in ProcessList.c before calling the platform-specific code, so this is a no-op.
* Consistency fixes for DarwinBenny Baumann2023-05-091-3/+3
|
* Minor whitespace and small logic flow improvements on reviewNathan Scott2023-05-081-5/+11
| | | | Quality improvements from BenBE as part of review for #1234.
* Adapt platform code for the new Machine base classNathan Scott2023-05-086-127/+165
| | | | | 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-25/+42
| | | | | | | | | | | 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.
* Fix typo in code commentGuillaume Gomez2023-05-051-1/+1
|
* {Memory,Swap}Meter: add "compressed memory" metricsIvan Shapovalov2023-04-231-0/+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.
* Darwin: add DiskIOMeter supportUeiWang2023-04-221-3/+105
|
* 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.
* Implement File Descriptor Meter support for DarwinBenny Baumann2023-02-192-0/+9
|
* Use strict function prototypes also for defintionsChristian Göttsche2023-02-042-4/+4
| | | | | | | 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-1/+1
|
* 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-244-8/+17
| | | | | | | | | | | | | | 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
* Darwin: increase buffer size each retryChristian Göttsche2022-09-231-1/+2
| | | | | | | Increase the buffer for the current running processes each retry to handle very busy systems. Closes: #118
* 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
* Make sure License is correctly specified as GNU GPLv2+ in some more file headersDaniel Lange2022-03-141-2/+2
|
* Auto-size (normalized) CPU usage columnsBenny Baumann2022-03-061-2/+3
|
* darwin: lazily set process TTY nameCharlie Vieth2022-02-182-9/+34
| | | | | | | | | | | Fetching the TTY name of a process is extremely expensive on darwin and the call to devname accounts for 95% of htop's CPU usage when there is high process turnover (this is mostly due to devname calling lstat, which is incredibly slow). This can make htop unresponsive. To mitigate this only set the process TTY name if the it is being actively displayed (PROCESS_FLAG_TTY), which by default it is not on darwin.
* 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
|
* Drop unused Platform variablesChristian Göttsche2021-12-171-2/+0
|
* Introduce screen tabsHisham Muhammad2021-12-073-2/+14
| | | | This is a forward port (by nathans) of Hisham's original code.
* Tidy up process state handlingmarcluque2021-11-021-9/+9
|
* Early program termination only from main()Volodymyr Vasiutyk2021-10-312-4/+7
|
* 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.
* Don't force allocation, as failure is handledBenny Baumann2021-10-031-1/+1
|
* Workaround for Rosetta 2 on DarwinAlexander Momchilov2021-09-262-4/+64
| | | | | | rdar://FB9546856 https://openradar.appspot.com/radar?id=5055988478509056
* Refactor Platform_CompareKernelVersion APIAlexander Momchilov2021-09-263-26/+32
|
* Extract Darwin "PlatformHelpers"Alexander Momchilov2021-09-265-51/+105
|
* Update license headers to explicitly say GPLv2+Daniel Lange2021-09-227-7/+7
|
* Fix typoChristian Göttsche2021-09-181-1/+1
|
* Fix typo in gettime implementation on darwinBenny Baumann2021-09-181-1/+2
|
* 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
* Clarify naming of Platform_nanosecondsPerSchedulerTickBenny Baumann2021-08-252-5/+5
|

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