summaryrefslogtreecommitdiffstats
path: root/netbsd/Platform.c
Commit message (Collapse)AuthorAgeFilesLines
* 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-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-041-1/+1
| | | | | | | 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).
* Adapt platform code for the new Machine base classNathan Scott2023-05-081-4/+3
| | | | | 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-081-10/+11
| | | | | | | | | | | 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.
* Minor code formatting consistency fixesBenny Baumann2023-04-111-1/+1
|
* Improve CPU computation codeGuillaume Gomez2023-03-041-3/+1
|
* Improve code readability by using enum values instead of raw numbersGuillaume Gomez2023-03-041-4/+4
|
* Implement File Descriptor Meter support for DragonflyBSD/FreeBSD/NetBSDBenny Baumann2023-02-191-0/+7
|
* 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-081-6/+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-241-1/+1
| | | | | | | | | | | | | | 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
* Ensure buffer for environment is large enough on NetBSDBenny Baumann2022-05-061-1/+8
|
* 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-171-1/+1
|
* Drop unused Platform variablesChristian Göttsche2021-12-171-2/+0
|
* Introduce screen tabsHisham Muhammad2021-12-071-0/+10
| | | | This is a forward port (by nathans) of Hisham's original code.
* Early program termination only from main()Volodymyr Vasiutyk2021-10-311-1/+2
|
* Update license headers to explicitly say GPLv2+Daniel Lange2021-09-221-1/+1
|
* NetBSD: misc const additionsChristian Göttsche2021-09-031-2/+2
|
* NetBSD: fix reading environment variables of processesChristian Göttsche2021-09-031-3/+3
| | | | | kvm_getenvv(3) seems not to work with kvm_openfiles(..., KVM_NO_FILES, ...)
* NetBSD: simplify Platform_setMemoryValuesChristian Göttsche2021-09-031-6/+3
|
* Add combined memory and swap meterChristian Göttsche2021-08-171-0/+2
| | | | Closes: #699
* netbsd: Add NetworkIOMeter supportnia2021-08-131-3/+27
|
* netbsd: handle repeated ENOMEM from HW_IOSTATS safelynia2021-08-091-0/+5
|
* netbsd: add more robust error handling for sysctl HW_IOSTATSnia2021-08-091-9/+17
|
* netbsd: Add support for DiskIOMeternia2021-08-091-3/+37
|
* netbsd: Use newer proplib API. Create aliases so it works on 9.x.nia2021-08-051-20/+26
| | | | | This way we avoid deprecation warnings on the development branch of NetBSD while keeping the code functioning on the stable branch.
* netbsd: If at least one AC adapter is connected, keep its state.nia2021-08-051-1/+1
|
* netbsd: style: declare variables on first use rather than C89-stylenia2021-08-051-24/+18
|
* netbsd: Add battery supportnia2021-08-051-3/+103
| | | | | | This uses proplib and sysmon_envsys to determine the total charge percentage of any number of connected batteries as well as the AC adapter state. Should work with ACPI and non-ACPI systems.
* NetBSD: Rework CPU counting.fraggerfox2021-08-051-1/+1
|
* netbsd: Support display of CPU frequencynia2021-07-211-0/+1
|
* Code indentationBenny Baumann2021-07-151-5/+5
|
* netbsd: Fix display of in-use and cached memorynia2021-07-131-1/+0
|
* Redo the memory values based on the other BSD implementations.fraggerfox2021-06-261-1/+3
|
* Fixes minor whitespace issues and re-arrange headers to conform to style guide.fraggerfox2021-06-261-2/+2
|
* Renames variable from opl to npl for consistency.fraggerfox2021-06-261-2/+2
|
* Fix include paths and minor whitespace issuesfraggerfox2021-06-261-3/+3
|
* Replace strlcpy() by safer String_safeStrncpy()fraggerfox2021-06-261-1/+1
|
* Replace maximum_PID value with INT32_MAXfraggerfox2021-06-261-2/+3
| | | | Thank you @niacat.
* Update copyright noticesBenny Baumann2021-06-261-0/+2
|
* Minor code clean up and corrections.fraggerfox2021-06-261-57/+1
|
* Add NetBSD platform support without procfs dependencyfraggerfox2021-06-261-0/+380
- TODO, clean up the code base and update comments in code.

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