Re: btop++

2023-09-04 Thread Jos Dehaes
On Mon, 4 Sept 2023 at 14:14, Stuart Henderson  wrote:

> On 2023/09/04 11:13, Jos Dehaes wrote:
> > How could we go about including this in OpenBSD (ports or native
> package)?
>
> it would need to be added as a port, then packages will be built.
>
> ports cannot be built with gcc 11 (gcc 8 and 11 can't be installed
> together and other ports require gcc 8).
>
> so due to the hard dep on C++20 it will need some very new stuff in
> -current ports to be able to build with llvm 16 (this is so new that
> packages aren't available yet).
>
> attached tgz is a start at a port, but i might have got the llvm 16
> bits wrong.
>

Thanks, I tried to build it, but apparently it builds using clang 13 which
fails.

Any tips on how to solve this? Do I first manually need to build clang 16?


Re: btop++

2023-09-04 Thread Claudio Jeker
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



Re: btop++

2023-09-04 Thread Stuart Henderson
On 2023/09/04 11:13, Jos Dehaes wrote:
> How could we go about including this in OpenBSD (ports or native package)?

it would need to be added as a port, then packages will be built.

ports cannot be built with gcc 11 (gcc 8 and 11 can't be installed
together and other ports require gcc 8).

so due to the hard dep on C++20 it will need some very new stuff in
-current ports to be able to build with llvm 16 (this is so new that
packages aren't available yet).

attached tgz is a start at a port, but i might have got the llvm 16
bits wrong.


btop.tgz
Description: application/tar-gz


btop++

2023-09-04 Thread Jos Dehaes
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
   - same question about CPU usage, it seems only possible to get info on
   physical core granularity
   - 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.
   - 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.

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