Determining real-time CPU usage of a process

2021-08-14 Thread Baptiste Jonglez
Hello, I would like to determine the CPU usage of a process on a "real-time" basis. That is, every few seconds (sampling period), I would like to compute its average CPU usage in the previous period. If this is too complex, it is also fine to simply compute the average CPU usage over the last fe

Re: Determining real-time CPU usage of a process

2021-08-29 Thread Baptiste Jonglez
On 14-08-21, Jeremie Courreges-Anglas wrote: > On Sat, Aug 14 2021, Baptiste Jonglez wrote: > > Hello, > > Hi Baptiste, long time no see. :) Hi jca, indeed, good to talk to you :) Sorry for the late reply. > > I would like to determine the CPU usage of a process on a

Determining the number of CPU cores and hyperthreads from userspace

2021-09-19 Thread Baptiste Jonglez
Hello, In the interest of fetching this information from Ansible for the GCC compile farm [1], I would like to determine the number of cores vs. hyper-threads on a system. With OpenBSD 6.9, this is what I get with "sysctl hw" on a dual 6-core Xeon system: hw.model=Intel(R) Xeon(R) CPU E5-2640 0