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.
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.
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) { "outcome" => "success", "result" => { "auto-start" => true, "cpu-affinity" => undefined, "group" => "server-group-REST-app", "name" => "REST-server-one"...