mirror of
https://github.com/troglobit/finit.git
synced 2026-11-08 16:11:10 +00:00
Document new -j,--json output option in initctl
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
1 parent
505c370898
commit
d27f114742
2 files changed
+35
-5
No files matched your search
+34
-5
@@ -11,7 +11,7 @@
|
|||||||
.Nd Control tool for Finit
|
.Nd Control tool for Finit
|
||||||
.Sh SYNOPSIS
|
.Sh SYNOPSIS
|
||||||
.Nm /sbin/initctl
|
.Nm /sbin/initctl
|
||||||
.Op Fl bcfhlpqtvV
|
.Op Fl bcfhjlpqtvV
|
||||||
.Op COMMAND
|
.Op COMMAND
|
||||||
.Sh DESCRIPTION
|
.Sh DESCRIPTION
|
||||||
.Nm
|
.Nm
|
||||||
@@ -33,6 +33,12 @@ command.
|
|||||||
Ignore missing files and arguments, never prompt.
|
Ignore missing files and arguments, never prompt.
|
||||||
.It Fl h, -help
|
.It Fl h, -help
|
||||||
Show built-in help text.
|
Show built-in help text.
|
||||||
|
.It Fl j, -json
|
||||||
|
JSON output in
|
||||||
|
.Ar status
|
||||||
|
and
|
||||||
|
.Ar cond
|
||||||
|
commands.
|
||||||
.It Fl 1, -once
|
.It Fl 1, -once
|
||||||
Only one lap in commands like top.
|
Only one lap in commands like top.
|
||||||
.It Fl p, -plain
|
.It Fl p, -plain
|
||||||
@@ -144,16 +150,21 @@ Clear (deassert) user-defined condition,
|
|||||||
.It Nm Ar cond status
|
.It Nm Ar cond status
|
||||||
Show condition status, default
|
Show condition status, default
|
||||||
.Cm cond
|
.Cm cond
|
||||||
command.
|
command. Also supports the
|
||||||
|
.Fl j
|
||||||
|
option for detailed JSON output.
|
||||||
.It Nm Ar cond dump Op Cm TYPE
|
.It Nm Ar cond dump Op Cm TYPE
|
||||||
Dump all, or a given type of, conditions and their status
|
Dump all, or a given type of, conditions and their status. Also
|
||||||
|
supports the
|
||||||
|
.Fl j
|
||||||
|
option for detailed JSON output.
|
||||||
.It Nm Ar ident Op Cm NAME
|
.It Nm Ar ident Op Cm NAME
|
||||||
Display indentities of all run/task/services, or only instances
|
Display indentities of all run/task/services, or only instances
|
||||||
matching
|
matching
|
||||||
.Cm NAME .
|
.Cm NAME .
|
||||||
A partial string, e.g.,
|
A partial string, e.g.,
|
||||||
.Cm NAM ,
|
.Cm NAM ,
|
||||||
will not match anything
|
will not match anything.
|
||||||
.It Nm Ar log Op Cm NAME
|
.It Nm Ar log Op Cm NAME
|
||||||
Show ten last Finit, or
|
Show ten last Finit, or
|
||||||
.Cm NAME ,
|
.Cm NAME ,
|
||||||
@@ -194,8 +205,26 @@ Show service status, by name. If only
|
|||||||
is given and multiple instances exits, a summary of all matching
|
is given and multiple instances exits, a summary of all matching
|
||||||
instances are shown. Only an exact match displays the detailed status
|
instances are shown. Only an exact match displays the detailed status
|
||||||
for a particular instance
|
for a particular instance
|
||||||
|
.Pp
|
||||||
|
When the
|
||||||
|
.Fl q
|
||||||
|
option is used with this command, and the selection only matches one
|
||||||
|
run/task/service, nothing is output and the return code of
|
||||||
|
.Nm
|
||||||
|
is non-zero if there is a problem. Zero is returned if a run/task has
|
||||||
|
run (at least) once in the current runlevel, and also when a service
|
||||||
|
is running (as expected). For more detailed status, see the
|
||||||
|
.Fl j
|
||||||
|
option for detailed JSON output.
|
||||||
|
.Pp
|
||||||
|
.Sy Tip:
|
||||||
|
the
|
||||||
|
.Xr jq 1
|
||||||
|
is a very useful tool in combination with the JSON output.
|
||||||
.It Nm Ar status
|
.It Nm Ar status
|
||||||
Show status of all services, default command
|
Show status of all services, default command. Also supports the
|
||||||
|
.Fl j
|
||||||
|
option for detailed JSON output.
|
||||||
.It Nm Ar cgroup
|
.It Nm Ar cgroup
|
||||||
List cgroup config overview
|
List cgroup config overview
|
||||||
.It Nm Ar ps
|
.It Nm Ar ps
|
||||||
|
|||||||
@@ -1214,6 +1214,7 @@ static int usage(int rc)
|
|||||||
" -c, --create Create missing paths (and files) as needed\n"
|
" -c, --create Create missing paths (and files) as needed\n"
|
||||||
" -f, --force Ignore missing files and arguments, never prompt\n"
|
" -f, --force Ignore missing files and arguments, never prompt\n"
|
||||||
" -h, --help This help text\n"
|
" -h, --help This help text\n"
|
||||||
|
" -j, --json JSON output in 'status' and 'cond' commands\n"
|
||||||
" -1, --once Only one lap in commands like 'top'\n"
|
" -1, --once Only one lap in commands like 'top'\n"
|
||||||
" -p, --plain Use plain table headings, no ctrl chars\n"
|
" -p, --plain Use plain table headings, no ctrl chars\n"
|
||||||
" -q, --quiet Silent, only return status of command\n"
|
" -q, --quiet Silent, only return status of command\n"
|
||||||
|
|||||||
Reference in new issue
Block a user