Linux常用命令拾遗

查看端口对应的程序:

netstat -nlap | grep 5004
输出:
tcp        0      0 192.168.3.000:5004         192.118.201.00:50800        ESTABLISHED 20112/java 

根据进程号 ,查看程序的运行信息, 比如可执行文件的位置。

ps -aux | grep 20112

输出:
Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.8/FAQ
root     20112  3.0 14.0 3733288 1136240 pts/4 Sl   18:06   1:40 /usr/local/jdk/jre/bin/java 
-Djava.util.logging.config.file=/App/opt/OPS/tomcat_1/conf/logging.properties
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
-Dmyapp.name=192.16.0.000:8081 -Dlog.path=/App/log/OPS/tomcat_1/business
-Xms1024m -Xmx1024m -Xmn512m -XX:PermSize=256m -XX:MaxPermSize=512m
-XX:+UseConcMarkSweepGC -XX:CMSFullGCsBeforeCompaction=1
-XX:+UseCMSCompactAtFullCollection -XX:CMSInitiatingOccupancyFraction=70
-XX:+CMSClassUnloadingEnabled -XX:+CMSParallelRemarkEnabled -server
-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5004
-Djava.endorsed.dirs=/App/install/OPS/apache-tomcat-7.0.61/endorsed
-classpath /App/install/OPS/apache-tomcat-7.0.61/bin/bootstrap.jar:/App/install/OPS/apache-tomcat-7.0.61/bin/tomcat-juli.jar
-Dcatalina.base=/App/opt/OPS/tomcat_1 -Dcatalina.home=/App/install/OPS/apache-tomcat-7.0.61
-Djava.io.tmpdir=/App/opt/OPS/tomcat_1/temp org.apache.catalina.startup.Bootstrap start root 20398 0.0 0.0 103324 888 pts/0 R+ 19:02 0:00 grep --color=auto 20112

 

posted @ 2018-05-09 19:18  Jony.K.Chen  阅读(283)  评论(0编辑  收藏  举报