[jboss-dev-forums] [JBoss AS7 Development] - JBoss AS7: How Do I?
Anil Saldhana
do-not-reply at jboss.com
Thu Sep 8 18:14:46 EDT 2011
Anil Saldhana [http://community.jboss.org/people/anil.saldhana] modified the document:
"JBoss AS7: How Do I?"
To view the document, visit: http://community.jboss.org/docs/DOC-17182
--------------------------------------------------------------
h1. Command Line Interface (CLI)
More information on using the CLI is at https://docs.jboss.org/author/display/AS7/Management+Clients https://docs.jboss.org/author/display/AS7/Management+Clients
h2. I want to take a snapshot of what the current domain is
You will have to use the CLI
bin$ ./jboss-admin.sh
You are disconnected at the moment. Type 'connect' to connect to the server or 'help' for the list of supported commands.
[disconnected /] connect
Connected to domain controller at localhost:9999
[domain at localhost:9999 /] :take-snapshot()
{
"outcome" => "success",
"result" => {
"domain-results" => {"step-1" => {"name" => "/home/anil/as7/jboss-as/build/target/jboss-as-7.1.0.Alpha1-SNAPSHOT/domain/configuration/domain_xml_history/snapshot/20110908-165222603domain.xml"}},
"server-operations" => undefined
}
}
[domain at localhost:9999 /] help
For a list of commands available in the current context execute
help --commands
The resulting listing may depend on the current context. I.g. some of the commands
require an established connection to a controller (standalone or domain).
These commands won't appear in the listing unless the connection has been established.
Here are some of the most common supported commands:
cn (or cd) - change the current node path to the argument;
connect - connect to the specified host and port;
deploy - deploy an application;
help (or h) - print this message;
history - print or disable/enable/clear the history expansion.
ls - list the contents of the node path;
pwn (or pwd) - prints the current working node;
quit (or q) - quit the command line interface;
undeploy - undeploy an application;
version - prints the version and environment information.
add-jms-queue - creates a new JMS queue
remove-jms-queue - removes an existing JMS queue
add-jms-topic - creates a new JMS topic
remove-jms-topic - removes an existing JMS topic
add-jms-cf - creates a new JMS connection factory
remove-jms-cf - removes an existing JMS connection factory
data-source - allows to add new, modify and remove existing data sources
xa-data-source - allows to add new, modify and remove existing XA data sources
For a more detailed description of a specific command, execute the command with '--help' as the argument.
Tab-completion is supported for the commands, just press the tab key to start.
To use tab completion for operations requests start with './' or '/' and press the tab key
which will list the available node types or names.
If the operation request doesn't require a node path then start with ':' and press the tab key
('/:' and './:' are also possible).
Operation requests are expected to follow the format:
[node-type=node-name (, node-type=node-name)*] : operation-name ['('[name=value [, name=value]*]')']
e.g. /subsystem=web/connector=http:read-attribute(name=protocol)
Whitespaces between the separators are insignificant.
If the operation doesn't require arguments then the brackets '()' are optional.
Tab-completion for operation requests supports node types and names, operation names and the property names.
[domain at localhost:9999 /]
h2.
h2. I want to take the latest snapshot of the host.xml for a particular host
Assume your host is called "master"
/bin$ ./jboss-admin.sh
You are disconnected at the moment. Type 'connect' to connect to the server or 'help' for the list of supported commands.
[disconnected /] connect
Connected to domain controller at localhost:9999
[domain at localhost:9999 /] /host=master:take-snapshot
{
"outcome" => "success",
"result" => {
"domain-results" => {"step-1" => {"name" => "/home/anil/as7/jboss-as/build/target/jboss-as-7.1.0.Alpha1-SNAPSHOT/domain/configuration/host_xml_history/snapshot/20110908-165640215host.xml"}},
"server-operations" => undefined
}
}
[domain at localhost:9999 /]
--------------------------------------------------------------
Comment by going to Community
[http://community.jboss.org/docs/DOC-17182]
Create a new document in JBoss AS7 Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=102&containerType=14&container=2225]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-dev-forums/attachments/20110908/6db9aa77/attachment.html
More information about the jboss-dev-forums
mailing list