任何显示当前在 Tomcat 下运行的应用程序的命令? [英] Any command to show how many applications are currently running under Tomcat?
问题描述
想知道有什么命令行工具可以显示Tomcat的状态?
Wondering any command line tool can shows the Tomcat status?
推荐答案
您可以在应用程序之外使用大多数管理器应用程序 URL.因此,要生成正在运行的应用程序列表,您可以发出 wget(在 linux 中)命令:
You can use most of the manager application urls outside of the application. So to generate a list of running applications you can issue the wget (in linux) command :
wget http://{hostname}:{portnumber}/manager/list --http-user=username --http-password=password
这将返回应用程序及其运行状态的列表.
This will return a list of applications and their running status.
但是,除非严格要求通过命令行访问,否则我建议使用 tomcat 管理器应用
However unless access through the command line is a firm requirement I would recommend researching using the tomcat manager app
您还可以使用以下命令检查服务器的状态":
You can also check the 'status' of the server by using the command:
wget http://{hostname}:{portnumber}/manager/status --https-user=username --http-password=password
这将返回 html,但需要一些脚本,您可以解析出所需的值.
This will return html but a little scripting and you can parse the required values out.
希望有帮助
这篇关于任何显示当前在 Tomcat 下运行的应用程序的命令?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!