Checking server status via the CLI

In this recipe, we will learn how to check the status of the server using the CLI. Using the standalone, there is no need for such a check, because you wouldn't be able to connect to the CLI at all. Thus, in the domain mode, you might need to know if a certain server is up or not before doing some operations.

Getting ready

For this recipe, both the domain controller and host controllers should be up and running. For their configuration, please refer to the recipe Connecting the host controller to the domain controller in this chapter.

How to do it…

Open your terminal and connect to the domain controller as usual:

$ ./bin/jboss-cli.sh --connect [domain@localhost:9990 /] /host=slave-1/server-config=REST-server-one:read-resource(include-runtime=true) ...

Get WildFly Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.