任何显示当前在 Tomcat 下运行的应用程序的命令? [英] Any command to show how many applications are currently running under Tomcat?

查看:37
本文介绍了任何显示当前在 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆