1. View the Tomcat process
Execute the command $ps-ef|grep Tomcat you will be able to figure out the process number that Tomcat occupies, which, of course, requires Tomcat to boot.
# Ps-ef | grep Tomcat
Root 4637 1 0 Aug08? 00:02:01/opt/ibm/java-x86_64-60/bin/java-djava.util.logging.config.file=/opt/apache-tomcat-6.0.32/conf/ logging.properties-dorg.apache.geronimo.jaxws.builder.usesimplefinder=true-xms1000m-xmx1500m- djava.util.logging.manager=org.apache.juli.classloaderlogmanager-djava.endorsed.dirs=/opt/apache-tomcat-6.0.32 /endorsed-classpath/opt/apache-tomcat-6.0.32/bin/bootstrap.jar-dcatalina.base=/opt/apache-tomcat-6.0.32- Dcatalina.home=/opt/apache-tomcat-6.0.32-djava.io.tmpdir=/opt/apache-tomcat-6.0.32/temp Org.apache.catalina.startup.Bootstrap start
Root 30152 27548 0 01:32 pts/0 00:00:00 grep Tomcat
2. View the ports that Tomcat occupies
Executing the command $netstat-nat can list the ports that Tomcat occupies, and 8080 and other similar ports are important to note. This command also requires Tomcat to start up.
Netstat-nat
Active Internet connections (servers and established)
Proto recv-q send-q Local address Foreign address state
TCP 0 0 0.0.0.0:60000 0.0.0.0:* LISTEN
TCP 0 0 127.0.0.1:2208 0.0.0.0:* LISTEN
TCP 0 0 0.0.0.0:2049 0.0.0.0:* LISTEN
TCP 0 0 0.0.0.0:5801 0.0.0.0:* LISTEN
TCP 0 0 0.0.0.0:523 0.0.0.0:* LISTEN
TCP 0 0 0.0.0.0:5901 0.0.0.0:* LISTEN
TCP 0 0 0.0.0.0:877 0.0.0.0:* LISTEN
TCP 0 0 0.0.0.0:51343 0.0.0.0:* LISTEN
TCP 0 0 0.0.0.0:111 0.0.0.0:* LISTEN
TCP 0 0 0.0.0.0:6001 0.0.0.0:* LISTEN
TCP 0 0 0.0.0.0:785 0.0.0.0:* LISTEN
TCP 0 0 0.0.0.0:946 0.0.0.0:* LISTEN
TCP 0 0 0.0.0.0:5811 0.0.0.0:* LISTEN
TCP 0 0 0.0.0.0:5911 0.0.0.0:* LISTEN
TCP 0 0 127.0.0.1:631 0.0.0.0:* LISTEN
TCP 0 0 127.0.0.1:25 0.0.0.0:* LISTEN
TCP 0 0 9.47.228.61:443 0.0.0.0:* LISTEN
TCP 0 0 0.0.0.0:6011 0.0.0.0:* LISTEN
TCP 0 0 127.0.0.1:2207 0.0.0.0:* LISTEN
TCP 0 0 9.47.228.61:60000 9.47.228.61:33664 established
TCP 0 0 9.47.228.61:60000 9.47.228.61:53605 established
TCP 0 0 9.47.228.61:60000 9.47.228.61:51221 established
3. View the directory where Tomcat is located
To execute the command #find/-name Tomcat, the system will list all tomcat-named directories, which can be found after entering the directory. Similarly, you can use Find/-name startup.sh to find the Tomcat boot file.
# Find/-name Tomcat
/home/rttsinstall/temp/repository/org/apache/geronimo/ext/tomcat
/home/rttsinstall/temp/repository/org/apache/tomcat
/root/.ivy2/cache/tomcat
Find:/proc/30540:no such file or directory
/ntcir/home/rttsinstall/packages/rtts/repository/org/apache/geronimo/ext/tomcat
/ntcir/home/rttsinstall/packages/rtts/repository/org/apache/tomcat
/ntcir/home/hwan/tomcat
How to view the Tomcat service in a Linux environment