linux中查看java進程


linux中查看java進程

查看進程可以使用 ps -ef|grep 'java -jar'


ps -ef|grep java

[root@vm-linux-x86 ~]# ps -ef|grep java
root      4834     1  2 Jun10 pts/6    03:10:50 /opt/JDK/jdk1.6.0_21/bin/java -classpath /opt/JReport/Server_B201106081302/derby/lib/*:/opt/JReport/Server_B201106081302/lib/JREngine.jar:/opt/JReport/Server_B201106081302/lib/JRESServlets.jar:/opt/JReport/Server_B201106081302/lib/JRStructuredEngine.jar:/opt/JReport/Server_B201106081302/lib/JRStructuredClient.jar:/opt/JReport/Server_B201106081302/lib/JREntServer.jar:/opt/JReport/Server_B201106081302/lib/JRWebDesign.jar:/opt/JReport/Server_B201106081302/lib/*:/opt/JDK/jdk1.6.0_21/lib/tools.jar:/opt/JReport/MyReports/Data/DBdrivers/classes12.jar:/opt/JReport/MyReports/Data/DBdrivers/dbdrivers2.zip:/opt/JReport/MyReports/Data/DBdrivers/dbdrivers3.zip: -Dinstall.root=/opt/JReport/Server_B201106081302/ -Djava.net.preferIPv4Stack=true -Djreport.url.encoding=UTF-8 -Xmx1600m -XX:PermSize=64m -XX:MaxPermSize=128m -Dreporthome=/opt/JReport/Server_B201106081302 jet.server.JREntServer

root      5857  5804  0 10:11 pts/7    00:00:00 grep java

[root@vm-linux-x86 ~]# kill -9 4834

 

通過 ps -ef | grep java  得到如上線程將某線程終止時用 

kill -9 XXXXX     XXXXX為上述查出的序號  如: 19979線程終止為: kill -9 4834 

 

kill一個線程時需注意不要誤停止了不應該停止的線程造成不必要的麻煩。 

在相當確信時才可用此方法停止線程。
---------------------
作者:梧雨桐樹
來源:CSDN
原文:https://blog.csdn.net/u013917701/article/details/79203740
版權聲明:本文為博主原創文章,轉載請附上博文鏈接!


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM