From nobody Tue Sep 12 16:19:35 2023 X-Original-To: freebsd-current@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RlTLr0MCcz4sgdC for ; Tue, 12 Sep 2023 16:19:48 +0000 (UTC) (envelope-from bakul@iitbombay.org) Received: from mail-pl1-x62a.google.com (mail-pl1-x62a.google.com [IPv6:2607:f8b0:4864:20::62a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RlTLq6rJpz3RjJ for ; Tue, 12 Sep 2023 16:19:47 +0000 (UTC) (envelope-from bakul@iitbombay.org) Authentication-Results: mx1.freebsd.org; none Received: by mail-pl1-x62a.google.com with SMTP id d9443c01a7336-1c0db66af1bso39774315ad.2 for ; Tue, 12 Sep 2023 09:19:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iitbombay-org.20230601.gappssmtp.com; s=20230601; t=1694535587; x=1695140387; darn=freebsd.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=tSPRojQqaJpfgB3X65tCl6RaMDyGxtENjRn9+PPSOSE=; b=B15TjVg/1Wq4QQroF/lUcbFT0D5pFnjVC6oDGldq5fVnRuyu7rz8Ha0cplKDFFBk0f w9Xsp8TQdUOVJaxySY4lxQOH64nXGxVKazbPwW4T2khzgecfTcGQ/yO7LdA9uf+DPwQp tV+7exNRtkKw1gfvA8+jcAZno3iVxTRwJ1offpT1hnKmBbplwS9YldeGrzhGvMPFDFe6 vf5kSGoJT9ixmr3MQJuqwhRG394COv9yrgt91P4qtMxuNbBmbcwaz4KSyMuNszRfbUEp JzDcIiU14AaRMzv7DJaKiSlkF8Ckeyq2/FZ0G/zWvJ/AbrlQFlFY5zNmAnpYLIEZ8vAq +SiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694535587; x=1695140387; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=tSPRojQqaJpfgB3X65tCl6RaMDyGxtENjRn9+PPSOSE=; b=dT+VanJ3AR93E25nK64P0YpUnBxGnPOrOnTn47Dgy7EKR+WAtSsO8SZJwHvbjmg4UG KUgg2fUxMUkzWPfs36CPdZxpB5fS/VYSJdauJQOK+4DH/03Y0MiIoSiEARx8Tb3Qpml0 dJSc9bo4VakMhzuBAupNOFNzZ4DcNeFDS89b1L3bEbfq7vSy6c143eBXpeoKX/wAO49d AHKv7XaTOsPT4QBN1p4q8Xt6X8lCN3N4e1IrNJs5SbQL8i2ACpZiGLs8oA5AeZMdDNnj 2Dc0dDqAQ20JHPhIDNF9/rLb0pNM9edTucNurmy+pdKN8nFp9Z8jRmcD4O4BhM1ggWwE MJ9A== X-Gm-Message-State: AOJu0YykOgZrHxfNdkMWnKfhm3b7REfT6i7hg22pj4WhV7+bqG72yKZr nQfd4vNDUoXzpNaY0NzEtsDS5A== X-Google-Smtp-Source: AGHT+IH/jXY3all+ANIv3udzcafH92WGmgiQGS7kU5V3PU89HOliqAbgkAqSU47onTCA/BcG7xTTOA== X-Received: by 2002:a17:902:8ec6:b0:1bd:bba1:be7b with SMTP id x6-20020a1709028ec600b001bdbba1be7bmr220338plo.39.1694535586876; Tue, 12 Sep 2023 09:19:46 -0700 (PDT) Received: from smtpclient.apple (107-215-223-229.lightspeed.sntcca.sbcglobal.net. [107.215.223.229]) by smtp.gmail.com with ESMTPSA id ja19-20020a170902efd300b001c32fd9e412sm8717975plb.58.2023.09.12.09.19.45 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 12 Sep 2023 09:19:46 -0700 (PDT) Content-Type: text/plain; charset=us-ascii List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6\)) Subject: Re: Continually count the number of open files From: Bakul Shah In-Reply-To: <291ad2de-ba0e-4bdf-786a-19614eacec49@gmail.com> Date: Tue, 12 Sep 2023 09:19:35 -0700 Cc: FreeBSD CURRENT Content-Transfer-Encoding: quoted-printable Message-Id: <592123F4-E610-446E-82B4-ACC519C0BA3E@iitbombay.org> References: <291ad2de-ba0e-4bdf-786a-19614eacec49@gmail.com> To: Graham Perrin X-Mailer: Apple Mail (2.3731.700.6) X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Queue-Id: 4RlTLq6rJpz3RjJ On Sep 11, 2023, at 11:38 PM, Graham Perrin = wrote: >=20 > Can anything like systat(1) present a count, continually? How about=20 while sleep 0.1; do sysctl -n kern.openfiles; done Or you can write a small program using sysctl(3). >=20 > I'd like to monitor, after log in to Plasma (X11), in connection with = . 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.=