1. 程式人生 > >Linux常用命令拾遺

Linux常用命令拾遺

roo 執行文件 usr 輸出 div conf loader llc size

查看端口對應的程序:

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

Linux常用命令拾遺