Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 24 Jun 2018 10:03:45 +0200
From:      Miroslav Lachman <000.fbsd@quip.cz>
To:        James Gritton <jamie@freebsd.org>, bsd-lists@bsdforge.com, freebsd-jail@freebsd.org, freebsd-stable Stable <freebsd-stable@freebsd.org>
Subject:   Re: jail related inconsistencies in FreeBSD tools parameters
Message-ID:  <47728073-93d3-325c-d90f-6235a4d548e7@quip.cz>
In-Reply-To: <18000a3b93085c91aeffbca937862786@freebsd.org>
References:  <6dd9952452c73826a2f9c01612586bea@udns.ultimatedns.net> <d2068437-672c-5472-0480-86fd094a8143@quip.cz> <18000a3b93085c91aeffbca937862786@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
James Gritton wrote on 2018/06/23 17:30:
> On 2018-06-22 16:03, Miroslav Lachman wrote:
>> Chris H wrote on 2018/06/22 23:46:
>>> On Fri, 22 Jun 2018 23:13:17 +0200 "Miroslav Lachman" 
>>> <000.fbsd@quip.cz> said
>>>
>>>> I don't know if it is better to discuss it in jail@ or stable@ list 
>>>> so a do cross-post.
>>>>
>>>> FreeBSD has many jail aware utilities but they are inconsistent in 
>>>> taking JID as parameter.
>>>>
>>>> For example "sockstat" takes -j JID "Show only sockets belonging to 
>>>> the 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 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 jail too.
>>>> Then again "cpuset" takes only numerical ID of the jail...
>>>>
>>>> Shouldn't it be consistent across all FreeBSD base utilities so all 
>>>> of them can use numerical ID and name?
>>> Good idea! Are you offering to create a patch? ;-)
>>> It'd be my guess that given they weren't all created at the same 
>>> time, nor
>>> the same individual; that (quite probably?) the "jail" additions were 
>>> also
>>> added at different times, and by different people. So I'd imagine that
>>> unless someone with a commit bit decides one day they'd like to take 
>>> that
>>> on. Someone(tm) maybe you? will need to propose a patch. :-)
>>
>> If I can understand C sources I will create the patch by myself
>> instead of just posting here. Unfortunately I am able to code in sh,
>> php and a bit of javascript and perl but no C. :)
>>
>> Miroslav Lachman
> 
> Sure, a PR would be handy for this - it's a pretty simple thing to add, 
> and consistency would indeed be a good move.

PR 229266 created

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=229266

Kind regards
Miroslav Lachman



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?47728073-93d3-325c-d90f-6235a4d548e7>