进入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
转载请标明出处:Linux上判断Tomcat是否启动
文章来源: Linux上判断Tomcat是否启动