summaryrefslogtreecommitdiffstats
path: root/freebsd/Platform.c
Commit message (Collapse)AuthorAgeFilesLines
* 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).
* Shorten CPUData ptr initialization stanzaBenny Baumann2023-05-091-7/+2
|
* Build fixes for FreeBSDXimalas2023-05-091-4/+4
| | | | Part of a series of changes to get rid of errors and warnings.
* Adapt platform code for the new Machine base classNathan Scott2023-05-081-17/+15
| | | | | 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-14/+17
| | | | | | | | | | | 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.
* 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-191-0/+7
|
* Implement shared memory for FreeBSDer-azh2023-02-041-1/+1
|
* 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-8/+8
|
* Implement FreeBSD support for minimum ZFS ARC sizeBenny Baumann2022-05-301-0/+11
|
* 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
|
* Introduce screen tabsHisham Muhammad2021-12-071-1/+8
| | | | This is a forward port (by nathans) of Hisham's original code.
* Early program termination only from main()Volodymyr Vasiutyk2021-10-311-1/+2
|
* FreeBSD: add comment for memory leak workaroundChristian Göttsche2021-10-151-0/+1
| | | | | | Follow-up of #841 [ci skip]
* Plug the memory leak for the Disk I/O meterXimalas2021-10-121-1/+1
| | | There are no functions in libdevstat to initialise or clean up memory. The simplest change is to mark the local variable info as static.
* Update license headers to explicitly say GPLv2+Daniel Lange2021-09-221-1/+1
|
* Add combined memory and swap meterChristian Göttsche2021-08-171-0/+2
| | | | Closes: #699
* Rework CPU countingChristian Göttsche2021-07-181-1/+1
| | | | | | | | | | | 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
* Code indentationBenny Baumann2021-07-151-5/+5
|
* platform-dependent files included relative to main source directorymayurdahibhate2021-05-101-3/+3
|
* Use unsigned types for CPU counts and associated variablesChristian Göttsche2021-03-191-2/+2
|
* Merge branch 'shared_before_cached' of cgzones/htopDaniel Lange2021-03-191-1/+3
|\
| * MemoryMeter: show shared memory before cachedChristian Göttsche2021-03-171-1/+3
| | | | | | | | | | | | Shared memory is less free-able than cached memory. Show it beforehand.
* | Merge pull request #436 from cgzones/freebsdGraham Inggs2021-03-181-2/+2
|\ \ | |/ |/| | | FreeBSD: add support for CPU frequency and temperature Tested on two physical systems running FreeBSD 12.1
| * FreeBSD: add support for CPU frequency and temperatureChristian Göttsche2021-02-051-2/+2
| |
* | Merge pull request #550 from natoscott/diskio-typesNathan Scott2021-03-021-1/+1
|\ \ | | | | | | Fix integer sizing issues in the DiskIO Meter
| * | Fix integer sizing issues in the DiskIO MeterNathan Scott2021-03-011-1/+1
| |/ | | | | | | | | | | | | | | | | On Linux kernels the size of the values exported for block device bytes has used a 64 bit integer for quite some time (2.6+ IIRC). Make the procfs value extraction use correct types and change internal types used to rate convert these counters (within the DiskIO Meter) 64 bit integers, where appropriate.
* | Switch NetworkIO Meter to using uint32_t and uint64_tNathan Scott2021-03-021-2/+1
| | | | | | | | From review via @BenBE, this is now a whole lot cleaner.
* | Fix integer sizing issues in the NetworkIO MeterNathan Scott2021-03-011-17/+7
|/ | | | | | | | | On Linux kernels the size of the values exported for network device bytes and packets has used a 64 bit integer for quite some time (2.6+ IIRC). Make the procfs value extraction use correct types and change internal types used to rate convert these counters (within the NetworkIO Meter) 64 bit integers, where appropriate.
* [#480] SysArchMeter to view kernel/arch infoahgamut2021-01-311-0/+2
| | | | | | | 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.
* FreeBSD: miscChristian Göttsche2021-01-301-4/+3
|
* kfreeBSD: include config.h for _GNU_SOURCEChristian Göttsche2021-01-121-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | strcasestr(3) is a GNU extension and when compiling freebsd/Platform.c on kfreebsd for Debian <string.h> is included before we define _GNU_SOURCE, so the function is not available. In file included from ./Object.h:16, from ./ListItem.h:12, from ./Meter.h:16, from ./Header.h:10, from ./Action.h:15, from freebsd/Platform.h:13, from freebsd/Platform.c:8: ./XUtils.h: In function ‘String_contains_i’: ./XUtils.h:43:11: warning: implicit declaration of function ‘strcasestr’; did you mean ‘strcasecmp’? [-Wimplicit-function-declaration] 43 | return strcasestr(s1, s2) != NULL; | ^~~~~~~~~~ | strcasecmp ./XUtils.h:43:30: warning: comparison between pointer and integer 43 | return strcasestr(s1, s2) != NULL; | ^~ In file included from ./Object.h:16, from ./ProcessList.h:16, from freebsd/FreeBSDProcessList.h:15, from freebsd/FreeBSDProcessList.c:8: ./XUtils.h: In function ‘String_contains_i’: ./XUtils.h:43:11: warning: implicit declaration of function ‘strcasestr’; did you mean ‘strcasecmp’? [-Wimplicit-function-declaration] 43 | return strcasestr(s1, s2) != NULL; | ^~~~~~~~~~ | strcasecmp ./XUtils.h:43:30: warning: comparison between pointer and integer 43 | return strcasestr(s1, s2) != NULL; | ^~
* Linux: Add SwapCached to the swap meterDavid Zarzycki2021-01-111-0/+1
| | | | | | | 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 Platform_defaultFields constChristian Göttsche2020-12-191-1/+1
|
* Rework enum ProcessFieldChristian Göttsche2020-12-191-2/+0
| | | | | | 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
* FreeBSD: fix crash on empty environmentChristian Goettsche2020-12-051-1/+1
| | | | e.g. on kernel threads
* Unify naming of first argument of Platform_getBatteryChristian Göttsche2020-11-251-3/+3
| | | | Use percent throughout
* Merge branch 'cleanup-init-done' into masterNathan Scott2020-11-231-4/+13
|\
| * Minor cleanups to platform-specific init and doneNathan Scott2020-11-191-4/+13
| | | | | | | | | | | | | | Move platform-specific code out of the htop.c main function and into the platform sub-directories - primarily this is the Linux procfs path check and sensors setup/teardown; not needed on any other platforms. No functional changes here.
* | Rename virtual memory column from M_SIZE to M_VIRTChristian Göttsche2020-11-211-1/+1
| | | | | | | | Closes: #325
* | IWYU update (FreeBSD)Christian Goettsche2020-11-191-0/+9
|/
* Merge individual Battery.[ch] files into Platform.[ch]Nathan Scott2020-11-181-0/+16
| | | | | Consistent with everything else involving platform-specific calls from core htop code.
* Show CPU temperature in CPU meterChristian Göttsche2020-11-161-0/+1
| | | | | Show the CPU temperature in the CPU meter, like CPU frequency, instead of using an extra Meter.
* Resolve merge conflicts, merge #298 "Macro cleanup" from @BenBEDaniel Lange2020-11-151-12/+12
|\

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