转:Linux下查看tomcat占用端口

时间:2022-11-26 18:12:12

https://blog.csdn.net/liufuwu1/article/details/71123597[root@server-crm mysql]# ps -ef | grep "tomcat"

root             : pts/    :: /usr/lib/jvm/jre/bin/java -classpath :/usr/share/tomcat/bin/bootstrap.jar:/usr/share/tomcat/bin/tomcat-juli.jar:/usr/share/java/commons-daemon.jar -Dcatalina.base=/usr/share/tomcat -Dcatalina.home=/usr/share/tomcat -Djava.endorsed.dirs= -Djava.io.tmpdir=/var/cache/tomcat/temp -Djava.util.logging.config.file=/usr/share/tomcat/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager org.apache.catalina.startup.Bootstrap start
root : pts/ :: grep tomcat
[root@server-crm mysql]# netstat -anop | grep
tcp ::ffff:127.0.0.1: :::* LISTEN /java off (0.00//)
tcp ::: :::* LISTEN /java off (0.00//)
tcp ::: :::* LISTEN /java off (0.00//)
unix [ ] STREAM CONNECTED /java

[root@server-crm webapps]# lsof -i:8080
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
java 11098 root 45u IPv6 42033 0t0 TCP *:webcache (LISTEN)