/root @ TSP - YZ - MQAPROD ~ # ps - ef | grep tomcat
Root 4079 2930 0 now PTS/0 00:00:00 grep tomcat
22951 1 0 09:33 root? 00:00:15/usr/java/jdk1.6.0_33/bin/java -Djava.util.logging.config.file=/opt/apache-tomcat-7.0.29/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/opt/apache-tomcat-7.0.29/endorsed -classpath/opt/apache-tomcat-7.0.29/bin/bootstrap.jar:/opt/apache-tomcat-7.0.29/bin/tomcat-juli.jar -Dcatalina.base=/opt/apache-tomcat-7.0.29 -Dcatalina.home=/opt/apache-tomcat-7.0.29 -Djava.io.tmpdir=/opt/apache-tomcat-7.0.29/temp org.apache.catalina.startup.Bootstrap start
/root @ TSP - YZ - MQAPROD ~ # lsof -p 22951 | grep LISTEN
Java 22951 root 38 u IPv6 320990073 0 t0 TCP * : webcache (LISTEN)
Java 22951 root 40 u IPv6 320990074 0 t0 TCP * : 8009 (LISTEN)
Java 22951 root 62 u IPv6 TCP localhost: 320990233 0 t0 mxi (LISTEN)
/root @ TSP - YZ - MQAPROD ~ #
CodePudding user response:
Continue to use the awk processingCodePudding user response:
According to the practice should be a -n parameter,CodePudding user response:
The lsof -p 22951 | grep LISTEN | grep -v webcacheCodePudding user response:
Thanks for your reply, see the man under the manual, as if does not support direct port number, indicating the name of the serviceCodePudding user response: