Book Image

WildFly Cookbook

Book Image

WildFly Cookbook

Overview of this book

Table of Contents (23 chapters)
WildFly Cookbook
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

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