zoukankan      html  css  js  c++  java
  • 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
    版权声明:本文为博主原创文章,转载请附上博文链接!

  • 相关阅读:
    67 个拯救前端开发者的工具、库和资源
    js常用的工具函数
    npm快捷键
    给bootstrap table设置行列单元格样式
    script标签中type为"text/x-template"或"text/html"
    【转载】Ogre3d 2.1 源码编译安装教程
    【转载】OGRE 2.1 Windows 编译
    【转载】DXUT11框架浅析(4)--调试相关
    【转载】GitHub详解
    【转载】3D/2D中的D3DXMatrixPerspectiveFovLH和D3DXMatrixOrthoLH投影函数详解
  • 原文地址:https://www.cnblogs.com/handsome1013/p/10996490.html
Copyright © 2011-2022 走看看