18

Eclipsed launched a process for me, and I'd like to see the full command line used.

I tried "ps auxwww", but it seems to truncate the path to 4096 characters, is there any way to get PS to stop truncating the path, or to use another tool to find the full path?

3 Answers3

28
cat /proc/{PID}/cmdline

Where {PID} is the process ID of the process in question.

4

The example is about a java process, here's a tool that can show some additional process details: jps. Just try, you probably have it - it's part of JDK

It's similar to a basic ps command - but underestands some java-speciffics. The main use is to identify running java processes, which then are inspected with other java analysis tools, like jstack.

$ jps -ml  
31302 com.intellij.rt.execution.application.AppMain com.example.Foo some.properties
26590 com.intellij.idea.Main nosplash
31597 sun.tools.jps.Jps -ml

An extract from the man page regarding the options:

jps - Java Virtual Machine Process Status Tool

jps [ options ] [ hostid ]

[...]

-q  Suppress  the  output of the class name, JAR file name, and argu‐
    ments passed to the main method, producing only a list  of  local
    VM identifiers.

-m  Output the arguments passed to the main method. The output may be
    null for embedded JVMs.

-l  Output the full package name for the application's main class  or
    the full path name to the application's JAR file.

-v  Output the arguments passed to the JVM.

-V  Output  the  arguments  passed  to the JVM through the flags file
    (the   .hotspotrc   file   or   the   file   specified   by   the
    -XX:Flags=<filename> argument).

-Joption
    Pass  option  to  the  java  launcher called by jps. For example,
    -J-Xms48m sets the startup memory to 48 megabytes. It is a common
    convention  for -J to pass options to the underlying VM executing
    applications written in Java.

[...]
Volker Siegel
  • 13,065
  • 5
  • 49
  • 65
2

pipe it into 'less' you should have no problems scrolling left and right :)

ejes
  • 41