文件“/proc/{processId}/cmdline”的长度限制是多长



我有一个java进程,它的类路径包括许多jar,所以启动命令很长。

假设进程id为110101,当我通过命令cat /proc/110101/cmdline检查命令时,我发现该命令不完整,它只包含大约4000个字符。

是否有其他方法显示原始启动命令?

 man proc
 /proc/[pid]/cmdline
              This holds the complete command line for the process, unless
              the process is a zombie.  In the latter case, there is nothing
              in this file: that is, a read on this file will return 0
              characters.  The command-line arguments appear in this file as
              a set of strings separated by null bytes (''), with a
              further null byte after the last string.

它可能不会通过cat文件向您提供所有args。

最新更新