gpt4 book ai didi

java - 如何通过 CLI 获取 Wildfly 服务器状态?

转载 作者:行者123 更新时间:2023-12-02 11:45:04 25 4
gpt4 key购买 nike

我一直在尝试使用 jboss-cli.bat 验证我们的服务器是否已在 Wildfly 中启动

这是我正在使用的命令:

/host=slave-1/server-config=REST-server-one:read-resource(include-runtime=true)

这就是我从命令中得到的内容

{
"outcome" => "success",
"result" => {
"auto-start" => true,
"cpu-affinity" => undefined,
"group" => "wildfly-server-group",
"name" => "wildfly-server",
"priority" => undefined,
"socket-binding-default-interface" => undefined,
"socket-binding-group" => undefined,
"socket-binding-port-offset" => 0,
"status" => "STARTED",
"update-auto-start-with-server-status" => false,
"interface" => undefined,
"jvm" => undefined,
"path" => undefined,
"ssl" => undefined,
"system-property" => undefined
}

是否有命令会返回该响应中的状态值?

最佳答案

您应该能够使用读取属性操作。

/host=slave-1/server-config=REST-server-one:read-attribute(name=status)

关于java - 如何通过 CLI 获取 Wildfly 服务器状态?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48274473/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com