java - 如何获取在特定帐户下在 UAT 服务器上运行的 Java 进程列表及其 PID(进程 ID)?

标签 java sql-server sql-server-2005 oracle


问题:

在 UAT 服务器上部署 jar 文件失败。

原因:

因为当我们试图重命名它时,它正在显示 “无法重命名已被其他用户使用的文件”。

为了解决问题而选择的步骤


登录 UAT 服务器(xxx)。
我们需要 java 进程列表以及 UAT 服务器上的 PID 它在帐户 XXXAPPFUNC 下运行。
请告诉我该怎么做?
提前致谢。

最佳答案

你试过jps了吗?工具?

DESCRIPTION

The jps tool lists the instrumented HotSpot Java Virtual Machines (JVMs) on the target system. The tool is limited to reporting information on JVMs for which it has the access permissions.

...

The list of JVMs produced by the jps command may be limited by the permissions granted to the principal running the command. The command will only list the JVMs for which the principle has access rights as determined by operating system specific access control mechanisms.

...

OUTPUT FORMAT

The output of the jps command follows the following pattern:

 lvmid [ [ classname | JARfilename | "Unknown"] [ arg* ] [jvmarg* ] ] 

例如,要列出本地主机上已检测的 JVM:

$ jps
18027 Java2Demo.JAR
18032 jps
18005 jstat

在所需的帐户下运行它。

关于java - 如何获取在特定帐户下在 UAT 服务器上运行的 Java 进程列表及其 PID(进程 ID)?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1733504/

相关文章:

Java将哨兵值作为数组输入

java - maven clean install 不从本地存储库中获取 jar

sql-server - SQL Server 中的多对多关系结构有或没有额外的主键列?

sql-server - Sql Server 事务——使用建议

java - Spring Integration 不转发自定义 header ?

java - 调试问题关闭 Apache Tomcat

sql - 使用 exec() 在 sp 内执行运行时查询时遇到错误 "The default schema does not exist."

sql - 如何在不使用游标的情况下一次将查询结果分配给多个变量?

sql-server - 经典 ASP 中 SQL 查询序列化为 json 文件

sql-server - 存储过程中的TSQL互斥访问