xref: /freebsd/usr.sbin/jls/jls.8 (revision dd41de95a84d979615a2ef11df6850622bf6184e)
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.\" $FreeBSD$
27.\"
28.Dd July 20, 2012
29.Dt JLS 8
30.Os
31.Sh NAME
32.Nm jls
33.Nd "list jails"
34.Sh SYNOPSIS
35.Nm
36.Op Fl -libxo
37.Op Fl dhNnqsv
38.Op Fl j Ar jail
39.Op Ar parameter ...
40.Sh DESCRIPTION
41The
42.Nm
43utility lists all active jails, or the specified jail.
44Each jail is represented by one row which contains space-separated values of
45the listed
46.Ar parameters ,
47including the pseudo-parameter
48.Va all
49which will show all available jail parameters.
50A list of available parameters can be retrieved via
51.Dq Nm sysctl Fl d Va security.jail.param .
52See
53.Xr jail 8
54for a description of some core parameters.
55.Pp
56If no
57.Ar parameters
58or any of the options
59.Fl hns
60are given, the following four columns will be printed:
61jail identifier (jid), IP address (ip4.addr), hostname (host.hostname),
62and path (path).
63.Pp
64The following options are available:
65.Bl -tag -width indent
66.It Fl -libxo
67Generate output via
68.Xr libxo 3
69in a selection of different human and machine readable formats.
70See
71.Xr xo_parse_args 3
72for details on command line arguments.
73.It Fl d
74List
75.Va dying
76as well as active jails.
77.It Fl h
78Print a header line containing the parameters listed.
79If no parameters are given on the command line,
80.Va all
81is assumed.
82.It Fl N
83In the standard display mode, print each jail's name instead of its
84numeric ID.
85If the jail does not have a name, the numeric ID is printed instead.
86.It Fl n
87Print parameters in
88.Dq name=value
89format, where each parameter is preceded by its name.
90If no parameters are given on the command line,
91.Va all
92is assumed.
93.It Fl q
94Put quotes around parameters if they contain spaces or quotes, or are
95the empty string.
96.It Fl s
97Print parameters suitable for passing to
98.Xr jail 8 ,
99skipping read-only and unused parameters.
100Implies
101.Fl nq .
102.It Fl v
103Extend the standard display with a multiple-line summary per jail,
104containing the following parameters:
105jail identifier (jid), hostname (host.hostname), path (path),
106jail name (name), jail state (dying), cpuset ID (cpuset),
107IP address(es) (ip4.addr and ip6.addr).
108.It Fl j Ar jail
109The jid or name of the
110.Ar jail
111to list.
112Without this option, all active jails will be listed.
113.El
114.Sh SEE ALSO
115.Xr jail_get 2 ,
116.Xr libxo 3 ,
117.Xr xo_parse_args 3 ,
118.Xr jail 8 ,
119.Xr jexec 8
120.Sh HISTORY
121The
122.Nm
123utility was added in
124.Fx 5.1 .
125Extensible jail parameters were introduced in
126.Fx 8.0 .
127libxo support was added in
128.Fx 11.0 .
129