From owner-freebsd-bugs@freebsd.org Sun Jun 24 08:02:10 2018 Return-Path: Delivered-To: freebsd-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ABB90101DA36 for ; Sun, 24 Jun 2018 08:02:10 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 40C727E3BB for ; Sun, 24 Jun 2018 08:02:10 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id F3BF6101DA32; Sun, 24 Jun 2018 08:02:09 +0000 (UTC) Delivered-To: bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DF92B101DA2F for ; Sun, 24 Jun 2018 08:02:09 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.ysv.freebsd.org (mxrelay.ysv.freebsd.org [IPv6:2001:1900:2254:206a::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.ysv.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 764DB7E3B8 for ; Sun, 24 Jun 2018 08:02:09 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.ysv.freebsd.org (Postfix) with ESMTPS id A911F22C7E for ; Sun, 24 Jun 2018 08:02:08 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id w5O828YD060480 for ; Sun, 24 Jun 2018 08:02:08 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id w5O828PB060479 for bugs@FreeBSD.org; Sun, 24 Jun 2018 08:02:08 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 229266] some system utilities take JID only, not jail name Date: Sun, 24 Jun 2018 08:02:08 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 10.4-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: 000.fbsd@quip.cz X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform bug_file_loc op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jun 2018 08:02:10 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D229266 Bug ID: 229266 Summary: some system utilities take JID only, not jail name Product: Base System Version: 10.4-RELEASE Hardware: Any URL: https://lists.freebsd.org/pipermail/freebsd-jail/2018- June/003588.html OS: Any Status: New Severity: Affects Many People Priority: --- Component: bin Assignee: bugs@FreeBSD.org Reporter: 000.fbsd@quip.cz FreeBSD has many jail aware utilities but they are inconsistent in=20 taking JID as parameter. For example "sockstat" takes -j JID "Show only sockets belonging to the=20 specified jail ID" and it means numeric ID only. On the other hand "ps" takes -J JID "This may be either the jid or name=20 of the jail. Use -J 0 to display only host processes." The same apply for "top", it understands jid as a number or name of the=20 jail too. Then again "cpuset" takes only numerical ID of the jail... This should be consistent across all FreeBSD base utilities so all of=20 them can use numerical ID and name. I took a quick look in to sources and almost each util has very different c= ode to work with JID / jail name. I am not C developer so I cannot provide any patches. I hope somebody else = will have free time to fix these utilities. Note I found this commit to fix jid / jail name problem for pgrep/pkill but again, it is very different code to what I found for procstat or sockstat https://svnweb.freebsd.org/base?view=3Drevision&revision=3D287012 --=20 You are receiving this mail because: You are the assignee for the bug.=