linux如何查看某个pid的进程?

时间:2021-12-24 21:03:27

Linux通过PID查看进程完整信息

[root@gsidc-4q-saas23 ~]# netstat -anp|grep 8282
tcp 0 0 :::8282 :::* LISTEN 16923/java
[root@gsidc-4q-saas23 ~]# ps -ef|grep 16923
root 7270 7128 0 10:55 pts/6 00:00:00 grep 16923
mbs 16923 1 0 2017 ? 00:33:22 /home/mbs/jdk1.7.0_79/bin/java -Djava.util.logging.config.file=/home/mbs/xct-manage/tomcat/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -server -Xms64m -Xmx1024m -XX:MaxPermSize=256m -XX:+UseParallelGC -XX:+DisableExplicitGC -XX:+HeapDumpOnOutOfMemoryError -Ddubbo.registry.file=dubbo.cache -Djava.endorsed.dirs=/home/mbs/tomcat/endorsed -classpath /home/mbs/tomcat/bin/bootstrap.jar:/home/mbs/tomcat/bin/tomcat-juli.jar -Dcatalina.base=/home/mbs/xct-manage/tomcat -Dcatalina.home=/home/mbs/tomcat -Djava.io.tmpdir=/home/mbs/xct-manage/tomcat/temp org.apache.catalina.startup.Bootstrap start
[root@gsidc-4q-saas23 ~]#

1、netstat -anp|grep 8282

查看此端口的占用情况;16923为pid

2、ps -ef|grep 16923

查看该pid的进程的详细信息;