public final class StatusCli
extends com.forgerock.opendj.cli.Tool
Server status includes an overview of the following server components:
The tool can connect to either the local server if the --offline option is provided,
(see LocalServerStatusProvider
) or any online server, including the local one
(see RemoteServerStatusProvider
).
Information for the components listed above are collected from server configuration and from the monitor backend
(i.e by querying cn=monitor whole subtree). Hence, only information collected from configuration are
available in the offline mode.
By default, server status is printed on the Tool
standard output with a
human readable format
.
Status can also be printed in script friendly (JSON)
format if the
-s, --script-friendly option is provided.
Modifier and Type | Method and Description |
---|---|
boolean |
isScriptFriendly()
Indicates whether the user has requested script-friendly output.
|
static void |
main(String[] args)
The main method for the status CLI tool.
|
static int |
mainStatus(String[] args,
OutputStream outStream,
OutputStream errStream)
Parses the provided command-line arguments and uses that information to run the status tool.
|
com.forgerock.opendj.cli.ReturnCode |
run(String... args)
Run this
Tool tool with the provided arguments. |
askConfirmation, askPort, close, confirmAction, enableConsoleLoggingIfVerbose, errPrintln, errPrintln, errPrintln, errPrintlnSurroundedByBlankLines, errPrintVerboseMessage, flush, flushLogStream, getErrorStream, getErrStream, getInputStream, getOutputStream, isFullyInteractive, isQuiet, isVerbose, logVerboseMessage, mayPrompt, parseArguments, pressReturnToContinue, print, println, println, println, println, printlnNoWrap, printlnSurroundedByBlankLines, printNoWrap, readInput, readInput, readInputAllowEmpty, readLineOfInput, readPassword, readPassword, readValidatedInput, readValidatedInput, report
public static void main(String[] args)
args
- The command-line arguments provided to this program.public static int mainStatus(String[] args, OutputStream outStream, OutputStream errStream)
args
- The command-line arguments provided to this program.outStream
- The output stream to use for standard output, or null
if standard output is not needed.errStream
- The output stream to use for standard error, or null
if standard error is not needed.public com.forgerock.opendj.cli.ReturnCode run(String... args) throws com.forgerock.opendj.cli.ClientException
com.forgerock.opendj.cli.Tool
Tool
tool with the provided arguments.
Output and errors will be written on the provided streams.
This method can be used to run the tool programmatically.
run
in class com.forgerock.opendj.cli.Tool
args
- Arguments set to pass to the tool.ReturnCode
.com.forgerock.opendj.cli.ClientException
- If an error occurs while running the tool.public boolean isScriptFriendly()
com.forgerock.opendj.cli.Tool
false
.isScriptFriendly
in class com.forgerock.opendj.cli.Tool
true
if the user has requested script-friendly output.Copyright 2010-2022 ForgeRock AS.