Questo contenuto non è disponibile nella lingua selezionata.

5.3. Interactive CLI Commands


Some native commands are included in the org.rhq.enterprise.client.commands inside the CLI JAR itself. These commands are part of the CLI itself. Other input in the JBoss ON CLI is passed through the JavaScript interpreter to the server; these commands are passed to the CLI module.
IMPORTANT
These native commands are available only in interactive mode. They cannot be used in a script when the CLI is used in non-interactive mode, such as when running a script from file. In these instances, you must use the Java method.

5.3.1. login

Logs into a JBoss ON server with the specified username and password.
Optionally, the hostname (or IP address) and port can be specified. The hostname defaults to localhost, and the port defaults to 7080.
It is also possible to specify a transport protocol, which sets whether to use SSL to communicate with the server. If the transport is not given, then the CLI evaluates the transport based on the port. A port ending in 443 automatically uses SSL, while all other ports use standard connections. The only reason to explicitly set a transport method is if the server is listening over SSL over a port which does not end in 443.
login username password [host] [port]
The login command can be used in a module script or with the rhq-cli.sh --f option.

5.3.2. logout

Logs off of the JBoss ON server without existing from the CLI.
logout
The logout command can be used in a module script or with the rhq-cli.sh --f option.

5.3.3. quit

Exits the CLI.
quit
This only works when the CLI is running interactively. In a script, use java.lang.System.exit.

5.3.4. record

Records user input commands to a file. This is very useful if you are running the CLI interactively to test a new script that will later be run non-interactively in the CLI or as an alert server-side script.
record [-b | -e] [-a] -f filename
Expand
Option Description
-b, --start
Specify this option to start recording.
-e, --end
Specify this option to stop recording.
-a, --append
Appends output to the end of a file. If not specified, output will be written starting at the beginning of the file.
-f, --file
The file where output will be written.

5.3.5. exec (deprecated)

NOTE
While an external script can be loaded into the CLI session using the exec command, this method of loading custom scripts and functions is deprecated. It is recommended that developers use a CommonJS module script. The default location for module scripts is cliRoot/rhq-remoting-cli-4.9.0.JON320GA/samples/modules.
Executes a statement or a script with the specified file name. A statement wraps onto multiple lines using backslashes.
Expand
Option Description
-f, --file
The full path filename of the script to execute. The full path must be given, or the CLI cannot locate the script.
-s, --style=named|indexed
Indicates the style or format of arguments passed to the script. It must have a value of either indexed or named.
Red Hat logoGithubredditYoutubeTwitter

Formazione

Prova, acquista e vendi

Community

Informazioni sulla documentazione di Red Hat

Aiutiamo gli utenti Red Hat a innovarsi e raggiungere i propri obiettivi con i nostri prodotti e servizi grazie a contenuti di cui possono fidarsi. Esplora i nostri ultimi aggiornamenti.

Rendiamo l’open source più inclusivo

Red Hat si impegna a sostituire il linguaggio problematico nel codice, nella documentazione e nelle proprietà web. Per maggiori dettagli, visita il Blog di Red Hat.

Informazioni su Red Hat

Forniamo soluzioni consolidate che rendono più semplice per le aziende lavorare su piattaforme e ambienti diversi, dal datacenter centrale all'edge della rete.

Theme

© 2026 Red Hat
Torna in cima