|
|
| |
cbsd-jls(8) |
FreeBSD System Manager's Manual |
cbsd-jls(8) |
cbsd jls —
List jails on local node or other added nodes of the farm.
cbsd jls |
[alljails =1]
[shownode =1]
[node =<node-name>]
[header =0]
[display =jid,jname,ip4_addr,host_hostname,path,status
...] [- -help ]
|
The cbsd jls command lists all jails on the local node
or other nodes added to the farm.
The options are as follows:
alljails =1
- List jails from the whole farm (from all registered nodes).
shownode =1
- When used with alljails option, lists the node name on which the jail
resides.
node =<node-name>
- Lists jails only from one particular node specified via node-name
argument.
- =0
- Omits header display, when listing nodes.
display =jid,jname,ip4_addr,host_hostname,path,status
- The outputed fields can be changed through the display option.
- -help
- Show simple usage instructions.
The display option gives the user high flexibility for
querying different information about the node or the whole farm and displaying
it in a tabular form.
When there are no arguments specified, defaults are taken from
$workdir/etc/defaults/jls.conf. These can be modified by changing the
$workdir/etc/jls.conf file leaving the default file intact. All the possible
options can be found in the /usr/local/cbsd/share/jail-arg file.
Some of the most important options are as follows:
jid
- Jail ID
jname
- Jail name
ipv4_addr
- List of assigned IP addresses (IPv4, IPv6)
host_hostname
- FQDN (fully qualified domain name) of the jail
path
- Root path for jail.
status
- On (running), Off (stoped), Unregister (jail has its rc.conf (old format),
but is not in the SQL database). Jail in the Unregister status may be
insert to the SQL database via: cbsd jregister. Unregistered jails are
also automatically converted in Upgrading stage of cbsd initenv
command.
astart
- Start jail automatically at system boot.
ver
- Jail base source version.
arch
- Architecture of the jail.
cpuset
- The cpuset can be used to assign processor sets to jails, running jails
are then constrained to a given set or list of processors.
b_order
- Set the boot order for the auto started (astart option) jails for example
if you have jails dependencies.
If you get fields with dashes, while listing jails running on
multiple nodes, this could mean that the remote node is running an older
version of CBSD. Respectively, the SQL query does not find relevant records
in the remote database.
By default, CBSD displays text in color (using escape sequences ANSII). If for
some reason the color is unpleasant, or you want to use output from CBSD
utilities in your scripts, you can disable the color through the environment
variable NOCOLOR=1. For example:
% env NOCOLOR=1
cbsd jls
- /usr/local/cbsd/share/jail-arg
- Contains all header fields for the display option.
- $workdir/etc/defaults/jls.conf
- Default location for the selected display options.
- $workdir/etc/jls.conf
- Overriding the defaults in former.
The cbsd jls utility exits 0 on success,
and >0 if an error occurs.
- List all jails on a single node:
-
cbsd jls
JNAME JID IP4_ADDR HOST_HOSTNAME PATH STATUS
jail1 0 10.0.0.2/16 jail1.my.domain /usr/jails/jails/jail1 Off
jail2 0 10.0.0.3/16 jail2.my.domain /usr/jails/jails/jail2 Off
jail3 1 10.0.0.4/16 jail3.my.domain /usr/jails/jails/jail3 On
- List all jails on a the whole farm:
-
cbsd jls alljails
= 1
JNAME JID IP4_ADDR HOST_HOSTNAME PATH STATUS
jail1 0 10.0.0.2/16 jail1.my.domain /usr/jails/jails/jail1 Off
jail2 0 10.0.0.3/16 jail2.my.domain /usr/jails/jails/jail2 Off
jail3 1 10.0.0.4/16 jail3.my.domain /usr/jails/jails/jail3 On
jail4 0 10.0.1.2/16 jail4.my.domain /usr/jails/jails/jail1 Off
jail5 0 10.0.1.3/16 jail5.my.domain /usr/jails/jails/jail2 Off
jail6 1 10.0.1.4/16 jail6.my.domain /usr/jails/jails/jail3 On
- List all jails on the farm with node names shown:
-
cbsd jls alljails
= 1
shownode
= 1
NODENAME JNAME JID IP4_ADDR HOST_HOSTNAME PATH STATUS
master jail1 0 10.0.0.2/16 jail1.my.domain /usr/jails/jails/jail1 Off
master jail2 0 10.0.0.3/16 jail2.my.domain /usr/jails/jails/jail2 Off
master jail3 1 10.0.0.4/16 jail3.my.domain /usr/jails/jails/jail3 On
slave jail4 0 10.0.1.2/16 jail4.my.domain /usr/jails/jails/jail4 Off
slave jail5 0 10.0.1.3/16 jail5.my.domain /usr/jails/jails/jail5 Off
slave jail6 1 10.0.1.4/16 jail6.my.domain /usr/jails/jails/jail6 On
To enable debugging via sh xtrace and trace all operations, use --debug argument
after the CBSD command, for example:
% env NOCOLOR=1 cbsd
jls
- -debug
Visit the GSP FreeBSD Man Page Interface. Output converted with ManDoc. |