Commit Graph

26 Commits

Author SHA1 Message Date
Christian Göttsche 2844429f15 NetBSD: scale CPU frequencies
Use a value type of 'long int' to avoid ENOMEM failures of sysctl(3).

Also check for "machdep.tsc_freq", scaled in MHz.
2021-09-03 12:17:45 +02:00
Christian Göttsche 343c2e58be NetBSD: update process fields
Populate fields to ttyname, minflt, majflt and processor.
2021-09-03 12:17:45 +02:00
Benny Baumann b42c441ee0 Use proper metric to detect kernel threads
Querying kernel threads with `ps -o pid,lid,flags,state,lname -sp 0`
gives that kernel threads have state `K` and flags have mask `0x20000` set.
This corresponds to `LW_SYSTEM` in kernel which is mapped as `L_SYSTEM`/`P_SYSTEM` for userspace.
2021-08-16 08:03:57 +02:00
fraggerfox 68123adb6f Build fix for NetBSD 2021-08-16 07:45:04 +02:00
fraggerfox 2e3f34f5c1 NetBSD: Rework CPU counting. 2021-08-05 10:25:59 +02:00
nia 4f3ba680fb Fix indentation style 2021-07-21 21:06:58 +02:00
nia 3fced48eea netbsd: convert snprintf use to xSnprintf 2021-07-21 21:06:58 +02:00
nia a4b650fdec netbsd: re-initialize freqSize before sysctlbyname() 2021-07-21 21:06:58 +02:00
nia 72cea2881c netbsd: Remove conditional compilation of CPU frequency variables 2021-07-21 21:06:58 +02:00
nia b4884373e5 netbsd: Support display of CPU frequency 2021-07-21 21:06:58 +02:00
Benny Baumann 0d85af2872 Whitespace around operators 2021-07-15 06:57:24 +02:00
nia 4865e643ad netbsd: Fix display of in-use and cached memory 2021-07-13 19:06:30 +02:00
nia 67ca214cbe netbsd: Add dyanmicMeters stubs to fix the build
Signed-off-by: Nia Alarie <nia@NetBSD.org>
2021-07-13 19:05:24 +02:00
BenBE 3bed682b1e Always update `proc->st_uid` + `proc->user`
Avoids issue #661.
2021-06-26 12:18:37 +02:00
fraggerfox 5fe9bcb21c Adds support for counting user and kernel threads. 2021-06-26 12:18:37 +02:00
fraggerfox 336acb0309 Adds support for PROC_EXE and CWD. 2021-06-26 12:18:37 +02:00
fraggerfox 58a895e54c Fixes minor whitespace issues and re-arrange headers to conform to style guide. 2021-06-26 12:18:37 +02:00
fraggerfox 9de463e756 Implements the NetBSD specific changes for makeCommandStr refactor.
Refer to #388 PR for more details.
2021-06-26 12:18:37 +02:00
fraggerfox fa65c30976 Sets a non-NULL process state in case of kvm_getlwps(3) returns NULL. Thanks @cgzone. 2021-06-26 12:18:37 +02:00
fraggerfox 2f5b3ef733 Refactor saturatingSub() to be part of Macros.h 2021-06-26 12:18:37 +02:00
fraggerfox e42ae55d69 Renames variable from opl to npl for consistency. 2021-06-26 12:18:37 +02:00
fraggerfox 497f468ed0 Fix include paths and minor whitespace issues 2021-06-26 12:18:37 +02:00
fraggerfox ddcfb179b4 Remove unwanted code, updates the comments 2021-06-26 12:18:37 +02:00
Benny Baumann b900e70e80 Update copyright notices 2021-06-26 12:18:37 +02:00
fraggerfox db98623684 Sync changes from master and fix minor warnings 2021-06-26 12:18:37 +02:00
fraggerfox 4b49de44a8 Add NetBSD platform support without procfs dependency
- TODO, clean up the code base and update comments in code.
2021-06-26 12:18:37 +02:00