xref: /freebsd/usr.sbin/jls/jls.8 (revision fd45b686f9d92f583366c75b22c04c7ee49709c0)
1.\"
2.\" Copyright (c) 2003 Mike Barcroft <mike@FreeBSD.org>
3.\" All rights reserved.
4.\"
5.\" Redistribution and use in source and binary forms, with or without
6.\" modification, are permitted provided that the following conditions
7.\" are met:
8.\" 1. Redistributions of source code must retain the above copyright
9.\"    notice, this list of conditions and the following disclaimer.
10.\" 2. Redistributions in binary form must reproduce the above copyright
11.\"    notice, this list of conditions and the following disclaimer in the
12.\"    documentation and/or other materials provided with the distribution.
13.\"
14.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24.\" SUCH DAMAGE.
25.\"
26.Dd July 20, 2012
27.Dt JLS 8
28.Os
29.Sh NAME
30.Nm jls
31.Nd "list jails"
32.Sh SYNOPSIS
33.Nm
34.Op Fl -libxo
35.Op Fl dhNnqsv
36.Op Fl j Ar jail
37.Op Ar parameter ...
38.Sh DESCRIPTION
39The
40.Nm
41utility lists all active jails, or the specified jail.
42Each jail is represented by one row which contains space-separated values of
43the listed
44.Ar parameters ,
45including the pseudo-parameter
46.Va all
47which will show all available jail parameters.
48A list of available parameters can be retrieved via
49.Dq Nm sysctl Fl d Va security.jail.param .
50See
51.Xr jail 8
52for a description of some core parameters.
53.Pp
54If no
55.Ar parameters
56or any of the options
57.Fl hns
58are given, the following four columns will be printed:
59jail identifier (jid), IP address (ip4.addr), hostname (host.hostname),
60and path (path).
61.Pp
62The following options are available:
63.Bl -tag -width indent
64.It Fl -libxo
65Generate output via
66.Xr libxo 3
67in a selection of different human and machine readable formats.
68See
69.Xr xo_parse_args 3
70for details on command line arguments.
71.It Fl d
72List
73.Va dying
74as well as active jails.
75.It Fl h
76Print a header line containing the parameters listed.
77If no parameters are given on the command line,
78.Va all
79is assumed.
80.It Fl N
81In the standard display mode, print each jail's name instead of its
82numeric ID.
83If the jail does not have a name, the numeric ID is printed instead.
84.It Fl n
85Print parameters in
86.Dq name=value
87format, where each parameter is preceded by its name.
88If no parameters are given on the command line,
89.Va all
90is assumed.
91.It Fl q
92Put quotes around parameters if they contain spaces or quotes, or are
93the empty string.
94.It Fl s
95Print parameters suitable for passing to
96.Xr jail 8 ,
97skipping read-only and unused parameters.
98Implies
99.Fl nq .
100.It Fl v
101Extend the standard display with a multiple-line summary per jail,
102containing the following parameters:
103jail identifier (jid), hostname (host.hostname), path (path),
104jail name (name), jail state (dying), cpuset ID (cpuset),
105IP address(es) (ip4.addr and ip6.addr).
106.It Fl j Ar jail
107The jid or name of the
108.Ar jail
109to list.
110Without this option, all active jails will be listed.
111.El
112.Sh SEE ALSO
113.Xr jail_get 2 ,
114.Xr libxo 3 ,
115.Xr xo_parse_args 3 ,
116.Xr jail 8 ,
117.Xr jexec 8
118.Sh HISTORY
119The
120.Nm
121utility was added in
122.Fx 5.1 .
123Extensible jail parameters were introduced in
124.Fx 8.0 .
125libxo support was added in
126.Fx 11.0 .
127