The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Operating Systems > Linux
.
google unix.com



Linux RedHat, Ubuntu, SUSE, Fedora, Debian, Mandriva, Slackware, Gentoo linux, PCLinuxOS. All Linux questions here!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
ps command - time field nhatch UNIX for Dummies Questions & Answers 1 05-12-2008 11:15 AM
Retrieve 5th Field to Last Field !! jobbyjoseph UNIX for Dummies Questions & Answers 3 05-16-2007 03:20 AM
sed command to change 2nd field Julius Shell Programming and Scripting 4 10-08-2006 08:30 AM
Moving Part of a field to another field using AWK rjsha1 Shell Programming and Scripting 5 08-04-2006 05:39 AM
exec command and field descriptors.. moxxx68 UNIX for Dummies Questions & Answers 5 12-04-2004 05:58 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 11-08-2005
akuma akuma is offline
Registered User
  
 

Join Date: Nov 2005
Posts: 4
PS Command Field

Is there any way to view the full contents of the command field when using ps -elf? I'm running a java process which has 4 lines worth of arguments. When i ps -elf no matter how much cut i use it will only display the first line of the command.
Thanks,
  #2 (permalink)  
Old 11-08-2005
vino's Avatar
vino vino is offline Forum Staff  
Supporter (in vino veritas)
  
 

Join Date: Feb 2005
Location: Bangalore, India
Posts: 2,796
Since you have posted in the Linux forum, I will assume that your OS is linux.

Get the PID of the java process.

Replace the PID with its value in the following command.

Code:
cat /proc/PID/cmdline
It will show you all args passed to the java process.

All the procs will be in 1 single line with no visible spaces between them. Infact all of them are separated by NUL. You might want to replace the NUL with a whitespace and then view them. Ofcourse, this will have to be done programatically.

Look at this URL - The /proc File System

Vino

Last edited by vino; 11-08-2005 at 08:35 AM.. Reason: Added an URL
  #3 (permalink)  
Old 11-08-2005
akuma akuma is offline
Registered User
  
 

Join Date: Nov 2005
Posts: 4
Thanks very much for that. I have also now found that ps -xw -w reveals all of the command line field.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 06:55 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0