PS Command Field


 
Thread Tools Search this Thread
Operating Systems Linux PS Command Field
# 1  
Old 11-08-2005
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  
Old 11-08-2005
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  
Old 11-08-2005
Thanks very much for that. I have also now found that ps -xw -w reveals all of the command line field.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Command/script to match a field and print the next field of each line in a file.

Hello, I have a text file in the below format: Source Destination State Lag Status CQA02W2K12pl:D:\CAQA ... (10 Replies)
Discussion started by: pocodot
10 Replies

2. Shell Programming and Scripting

Command to identify distinct field value

Could anyone help me on a command to identify distinct values from a particular column ?my input file has header. So i need a command in which we pass Column1 as parameter. For eg my input is like Column1 Column2 Column3 ... (4 Replies)
Discussion started by: krish123
4 Replies

3. Shell Programming and Scripting

UNIX Command to replace particular field

Hello All, I need your help in getting a command. I have a input file as below: "A0C0VN","XZ70720","02","MEMBER ELIGIBILITY_DC",2012021308,"",,,20120213 I need a command to remove the field in Bold. To be specific the 5th field along with the next comma (2012021308,) needs to be taken... (6 Replies)
Discussion started by: Praveenkulkarni
6 Replies

4. Shell Programming and Scripting

How to extract a field from ls-l command and display?

So I want to put a line at the end of my script which greps for keywords from syslog.log that outputs the following after it is done: "This file was last modified on (thisdate)" I know I can use the following to get the date: rtidsvb(izivanov):/home/izivanov> ll /var/adm/syslog/syslog.log ... (4 Replies)
Discussion started by: zixzix01
4 Replies

5. UNIX for Advanced & Expert Users

Awk command to print the field

894344202808090;11122;040320 075858 166;101;0;0;10u;0;NA;65;221890;2;101973;185059;568674;Y; PRE;0;0;NA;NA;0;NA;0;NA;textmsg;textmsg_snd1;telusmob;TEXTMSG1;0.15000000;126037;2010/03/04 12:58:57gmt;0;70532192; plz tell me any awk command which on the basis of the yellow field which is... (1 Reply)
Discussion started by: madfox
1 Replies

6. Shell Programming and Scripting

awk command to separate a field

I have a log file that I am trying to convert. File contents something like this: aaaaa bbbbbb cccc dddddd\123 eeeee ffffffff I am trying to output the fields in a different order and separate field 4 so that the "123" and "dddddd" can be output separately. for example bbbbbb aaaaa 123... (5 Replies)
Discussion started by: jake1988
5 Replies

7. Shell Programming and Scripting

where to specify the field name in SED command

HI Folks, I know the solution to my question is very easy but i could not find it out. There is CSV file with 20 fields with 5 rows contains different data as below: FBINV,LVO71,GAMFR1,D,104164,16677.36,20090625,102135,20090529,7267,KG,,,,0,,,,DTD,,O,O,,,,,,,,,300588136... (3 Replies)
Discussion started by: chandrakala
3 Replies

8. Shell Programming and Scripting

how to specify the column(field) in sed command

the following command removes the first two characters of the first column, how can I change it to to remove the first two characters of the second column? sed 's/^..//' file1.txt > file2.txt Thanks Joseph (4 Replies)
Discussion started by: jdhahbi
4 Replies

9. UNIX for Dummies Questions & Answers

ps command - time field

Hi all, Can someone extending on what the time field is explaining in a ps command. Man page only has this: time The cumulative execution time for the process. Is this a combined CPU time? if that is the case then it should be impossible to have a 00:00 time on any process. ... (1 Reply)
Discussion started by: nhatch
1 Replies

10. UNIX for Dummies Questions & Answers

exec command and field descriptors..

according to the many sources the exec command other than its use in find and escaping the shell, has another definitive use.. which I am having a hard time understanding. according to many resources and info pages that I have read I can use the exec command with a file descriptor.. such as exec... (5 Replies)
Discussion started by: moxxx68
5 Replies
Login or Register to Ask a Question