From nobody Fri Jun 11 17:00:46 2021 X-Original-To: freebsd-stable@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 913ED7EEC9A for ; Fri, 11 Jun 2021 17:00:54 +0000 (UTC) (envelope-from jamie@freebsd.org) Received: from gritton.org (gritton.org [199.192.165.131]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4G1nD630xTz3tNk for ; Fri, 11 Jun 2021 17:00:54 +0000 (UTC) (envelope-from jamie@freebsd.org) Received: from gritton.org ([127.0.0.131]) (authenticated bits=0) by gritton.org (8.15.2/8.15.2) with ESMTPA id 15BH0kO3031280; Fri, 11 Jun 2021 10:00:46 -0700 (PDT) (envelope-from jamie@freebsd.org) List-Id: Production branch of FreeBSD source code List-Archive: https://lists.freebsd.org/archives/freebsd-stable List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-stable@freebsd.org X-BeenThere: freebsd-stable@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Fri, 11 Jun 2021 10:00:46 -0700 From: James Gritton To: freebsd-stable@freebsd.org Cc: Johannes Totz Subject: Re: rctl -u jail:0 In-Reply-To: References: User-Agent: Roundcube Webmail/1.4.1 Message-ID: X-Sender: jamie@freebsd.org X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.6.2 (gritton.org [127.0.0.131]); Fri, 11 Jun 2021 10:00:46 -0700 (PDT) X-Rspamd-Queue-Id: 4G1nD630xTz3tNk X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N On 2021-06-10 17:37, Johannes Totz wrote: > what does > > $ rctl -u jail:0 > > report? Is that supposed to work? Output looks like: > > cputime=10507 > datasize=6946816 > stacksize=520495104 > coredumpsize=0 > memoryuse=403210240 > memorylocked=0 > maxproc=87 > openfiles=6992 > vmemoryuse=1918025728 > pseudoterminals=1 > swapuse=37552128 > nthr=95 > msgqqueued=0 > msgqsize=0 > nmsgq=0 > nsem=0 > nsemop=0 > nshm=0 > shmsize=0 > wallclock=443440 > pcpu=0 > readbps=512 > writebps=0 > readiops=1 > writeiops=0 > > > maxproc looks alright but the rest seems to be all over the place... > I don't have a jail called "0". For an actually existing jail the > output looks fine. > I checked the source and looks like code that parses the jail name is > just a string comparison, no check for jail id. > > Side note: I was trying to get stats for all processes not in a jail. > Any suggestions for that? > > I'm still on 12-stable. In many utilities, jail 0 is shorthand for the non-jailed system itself. Or if you're running withing a jail, it means the jail you're currently running in (as the system itself is inaccessible). Not all utilities support this notation; notably jail(8) itself only deals with visible jails and not the containing system. - Jamie