Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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?

share|improve this question
    
Hmm, maybe the answer is to recompile the kernel? wtf. stackoverflow.com/questions/199130/… –  Alex Black Mar 1 '12 at 19:11
    
For my case, which is a java app, you can use jconsole to get the full classpath it looks like –  Alex Black Mar 1 '12 at 19:13
    
Is it possible to redirect it to a file and get the entire command line? –  James Mar 1 '12 at 23:21
    
I don't think so, it looks like /proc/{PID}/cmdline is truncated at 4096 characters, a hard limit set in the kernel –  Alex Black Mar 2 '12 at 2:16
add comment

2 Answers 2

cat /proc/{PID}/cmdline

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

share|improve this answer
    
/proc/*/cmdline doesn't contain a trailing newline, so echo $(< /proc/7851/cmdline ) gives more legible output. –  Barton Chittenden Mar 1 '12 at 20:51
2  
Arg. just read the stack overflow link that Alex Black posted... looks like proc/.../cmdline has the same 4096 character limit. –  Barton Chittenden Mar 1 '12 at 21:22
add comment

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

share|improve this answer
    
piping it into less doesn't solve the truncation issue. –  Alex Black Mar 2 '12 at 2:16
    
huh, that worked for me. anyway, it looks like using proc (suggested above) looks like a great solution :) –  ejes Mar 2 '12 at 14:37
    
The problem I hit was that proc is truncated to 4096 characters, did you find a way to get past that limit? –  Alex Black Mar 2 '12 at 17:57
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.