Linux上判断Tomcat是否启动

进入Tomcat的bin目录,执行语句:ps -ef|grep tomcat

输出如下,则Tomcat启动了。

[tomcat@erp][/export/home/tomcat/Apache/apache-tomcat-7.0.77/bin]>ps -ef|grep tomcat
  tomcat  3984     1   0 01:41:26 ?           1:37 /oraprodbk1/tomcat/Apache/jdk1.6.0/jre/bin/java -Djava.util.logging.config.file
  tomcat 25358 25357   0 08:47:56 ?           0:00 /usr/lib/ssh/sshd
  tomcat 25587 25380   0 08:49:28 pts/1       0:00 grep tomcat
  tomcat 25586 25380   0 08:49:28 pts/1       0:00 ps -ef
  tomcat 25380 25358   0 08:48:03 pts/1       0:00 -bash

输入如下,则Tomcat没有启动。

[tomcat@bggjghApp apache-tomcat-7.0.79]$ cd bin
[tomcat@bggjghApp bin]$ ps -ef|grep tomcat
root     29922  1913  0 14:14 ?        00:00:00 sshd: tomcat [priv]
tomcat   29926 29922  0 14:14 ?        00:00:03 sshd: tomcat@notty
tomcat   29927 29926  0 14:14 ?        00:00:01 /usr/libexec/openssh/sftp-server
root     29982  1913  0 14:19 ?        00:00:00 sshd: tomcat [priv]
tomcat   29986 29982  0 14:19 ?        00:00:00 sshd: tomcat@pts/0
tomcat   29987 29986  0 14:19 pts/0    00:00:00 -bash
root     30327  1913  0 14:40 ?        00:00:00 sshd: tomcat [priv]
tomcat   30332 30327  0 14:40 ?        00:00:00 sshd: tomcat@pts/1
tomcat   30333 30332  0 14:40 pts/1    00:00:00 -bash
tomcat   30366 30333  0 14:43 pts/1    00:00:00 ps -ef
tomcat   30367 30333  0 14:43 pts/1    00:00:00 grep tomcat


  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值