On Mon, Sep 04, 2023 at 11:13:01AM +0200, Jos Dehaes wrote:
> Hi,
> 
> I ported btop++ (a resource monitor program like top/htop) to macOS,
> FreeBSD, and now OpenBSD (pull request:
> https://github.com/aristocratos/btop/pull/607).
> 
> I would appreciate if anyone could have a look and tell me what stupid
> things I did and how I can do it better (I don't have much OpenBSD
> experience).
> 
> I have some questions that I can't seem to find an answer to:
> 
>    - is it possible to get the temperature per CPU thread? Right now I'm
>    giving both threads on same physical core same temperature

There is no physical temp sensor per thread. Only core temparatures make
sense. So what you do is correct.

>    - same question about CPU usage, it seems only possible to get info on
>    physical core granularity

In OpenBSD SMT cores show up as independent CPUs. So a 2 core 4 thread
cpu has cpu0 - cpu3.

>    - Similar question about disk I/O, I can only find a way to get disk I/O
>    per disk, so I'm giving all mountpoints the same disk I/O.

>From my knowledge there is no per mount stats. In general they do not
really matter.

>    - Is it possible to get disk I/O info per process? Linux and macOS can
>    do that, in FreeBSD I also could not find an API for it.

You can look at getrusage ru_inblock/ru_oublock and p_uru_inblock /
p_uru_oublock from struct kinfo_proc. Not perfect but there is nothing
else.
 
> How could we go about including this in OpenBSD (ports or native package)?
> 
> (Please CC me as I'm not subscribed to the list)
> 
> Thx,
> Jos

-- 
:wq Claudio

Reply via email to