Re: Continually count the number of open files

From: Bakul Shah <bakul_at_iitbombay.org>
Date: Tue, 12 Sep 2023 16:19:35 UTC
On Sep 11, 2023, at 11:38 PM, Graham Perrin <grahamperrin@gmail.com> wrote:
> 
> Can anything like systat(1) present a count, continually?

How about 

	while sleep 0.1; do sysctl -n kern.openfiles; done

Or you can write a small program using sysctl(3).

> 
> I'd like to monitor, after log in to Plasma (X11), in connection with <https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=273669>.

Not sure checking how many files are open will help you.
Looks like "baloo" is using inotify to watch changes on
every file & directory or something. Simulating inotify
with kqueue under FreeBSD doesn't scale well. FreeBSD
should add inotify.