简体   繁体   English

centos捕获Java后台进程的输出

[英]centos capture the output from the java background process

I am running a java process in the background. 我在后台运行Java进程。 It prints out the log through system.out. 它通过system.out打印出日志。 It is supposed to run for a long time, so I can't stop it now. 它应该运行很长时间,所以我现在无法停止它。 It is running on the CentOS 6. 它在CentOS 6上运行。

Is there a command to capture the output from a java process running in the background? 是否有命令捕获后台运行的Java进程的输出?

thanks. 谢谢。

It doesn't matter that it's Java, the problem is just to capture the stdout of a running process in Linux, and a quick search produces this: How can a process intercept stdout and stderr of another process on Linux? 没关系,它是Java,问题仅在于捕获Linux中正在运行的进程的stdout,而快速搜索会产生以下结果: 一个进程如何截获Linux上另一个进程的stdout和stderr? .

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM