Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 14 Dec 2020 21:58:28 +0100
From:      mj-mailinglist@gmx.de
To:        freebsd-questions@freebsd.org
Cc:        Kyle Evans <kevans@freebsd.org>, jamie@gritton.org
Subject:   Aw: Re: Questions about the output of jls
Message-ID:  <trinity-a595f020-1bf5-4c67-9044-9d26d5e017f1-1607979508775@3c-app-gmx-bs41>
In-Reply-To: <72165e2885787561bd7fc7384c7b03b8@gritton.org>
References:  <trinity-1eddb95f-d7d8-4b02-be03-0296774a8434-1607875466295@3c-app-gmx-bap80> <CACNAnaHjBmr2F2+aZHOH3UsgOE0FL+SknUV7-a825NBRJJ+AHw@mail.gmail.com> <72165e2885787561bd7fc7384c7b03b8@gritton.org>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
>> On Sun, Dec 13, 2020 at 10:04 AM <mj-mailinglist@gmx.de> wrote:
>>>
>>> Hi,
>>>
>>> I habe a current system, where i have current and 12.2-STABLE jails.
>>> Checking with jls, i get this output:
>>>
>>> root@fbsd13:~ # jls -h jid name ip4.addr host.hostname vnet osrelease
>>> path | column -t
>>> jid name ip4.addr host.hostname vnet osrelease path
>>> 8 j0 192.168.0.10 j0.local 2 13.0-CURRENT /jails/j0
>>> 10 j1 - j1.local 1 13.0-CURRENT /jails/j1
>>> 12 j2 - j2.local 1 13.0-CURRENT /jails/j2
>>>
>>> the jails are running this versions:
>>>
>>> root@fbsd13:~ # jexec -l j0 freebsd-version -u
>>> 12.2-STABLE
>>> root@fbsd13:~ # jexec -l j1 freebsd-version -u
>>> 13.0-CURRENT
>>> root@fbsd13:~ # jexec -l j2 freebsd-version -u
>>> 12.2-STABLE
>>>
>>>
>>> What is "osrelease"? Looking at the name, i would have guessed, it is
>>> the
>>> version of the freebsd userland, running in the jail. But it does't
>>> seem so.
>>> j1 and j2 are VNET jails, so it seems the 1 in the vnet column
>>> signifies this,
>>> j0 is a "standard" jail using the hosts network stack, so the 2 stands
>>> for standard?
>>>
>>
>> Hi,
>>
>> osrelease is what the jail sees as kern.osrelease and uname -r (see:
>> jail(8)) (i.e. kernel version); it's either specified during jail
>> creation or inherited from the parent prison if none is specified.
>>
>> It looks like it's exporting a jailsys int for vnet, so these
>> correspond to:
>>
>> JAIL_SYS_DISABLE=3D0
>> JAIL_SYS_NEW=3D1
>> JAIL_SYS_INHERIT=3D2
>>
>> So 2 is 'use parent vnet', 1 is 'new one created' -- I don't see this
>> described in either jls(1) or jail(8), it'd probably be nice if we
>> translated jailsys ints into "new"/"inherit" since one specifies
>> "new"/"inherit" for them during creation.
>
>True, that would be more human-readable. For that matter, I could
>report booleans (such as allow.whatever) as "true" or "false" as well.
>In both cases, the strings pass back to jail(8) OK, but I wonder if
>there are any scripts out there that actually use those values in their
>numeric form.
>
>- Jamie

Thanks,

I did not realise, that osrelease and osreldate are "writable".
When setting them in jail.conf they are shown by jls:

root@fbsd13:~ # jls -h jid name vnet ip4.addr host.hostname osrelease osre=
ldate path | column -t
jid  name  vnet  ip4.addr      host.hostname  osrelease     osreldate  pat=
h
26   j0    2     192.168.0.10  j0             12.2-STABLE   1202504    /ja=
ils/j0
27   j1    1     -             j1             13.0-CURRENT  1300131    /ja=
ils/j1
28   j2    1     -             j2             12.2-STABLE   1202504    /ja=
ils/j2
29   j4    1     -             j4             12.2-STABLE   1202504    /ja=
ils/j4
33   j5    2     192.168.0.15  j5             12.2-STABLE   1202504    /ja=
ils/j5



the representation of the vnet value differs, depending on the used jls pa=
rameters:

root@fbsd13:~ # jls -j j0 -h vnet
vnet
2

root@fbsd13:~ # jls -j j1 -h vnet
vnet
1

and

root@fbsd13:~ # jls -j j0 -n
devfs_ruleset=3D4 nodying enforce_statfs=3D2 host=3Dnew ip4=3Ddisable ip6=
=3Ddisable
jid=3D26 name=3Dj0 osreldate=3D1202504 osrelease=3D12.2-STABLE parent=3D0 =
path=3D/jails/j0
nopersist securelevel=3D-1 sysvmsg=3Dnew sysvsem=3Dnew sysvshm=3Dnew vnet=
=3Dinherit ...

root@fbsd13:~ # jls -j j1 -n
devfs_ruleset=3D4 nodying enforce_statfs=3D2 host=3Dnew ip4=3Dinherit ip6=
=3Dinherit
jid=3D27 name=3Dj1 osreldate=3D1300131 osrelease=3D13.0-CURRENT parent=3D0=
 path=3D/jails/j1
nopersist securelevel=3D-1 sysvmsg=3Dnew sysvsem=3Dnew sysvshm=3Dnew vnet=
=3Dnew ...

=2D-
Martin



Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?trinity-a595f020-1bf5-4c67-9044-9d26d5e017f1-1607979508775>