Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ps v 2

Status
Not open for further replies.

Dagon

MIS
Jan 30, 2002
2,301
GB
Is there any way to stop "ps v" wrapping its output onto the next line. For one particular process I get:

PID TTY STAT TIME PGIN SIZE RSS LIM TSIZ TRS %CPU %MEM COMMAND
63708 - A 122:54 23739 20524 24784 32768 27161 9192 5.9 2.0 oraclePF
M

It seems to insert a carriage return at the 80th character. This messes up the awk script I was going to use to analyze the output.

I've tried stty columns and setting the COLUMNS environment variable.
 
w Specifies a wide-column format for output (132 columns rather than 80). If repeated, (for example, ww), uses arbitrarily wide output. This information is used to decide how much of long commands to print.

so

ps wv
 
It does produce a wider output but it still wraps this line at the 170th character:

ps wv 63708
PID TTY STAT TIME PGIN SIZE RSS LIM TSIZ TRS %CPU %MEM COMMAND
63708 - A 125:16 23739 20524 24868 32768 27161 9276 6.0 2.0 oraclePFMIS01 (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq
)

I tried increasing COLUMNS and stty columns 200, but that didn't help.
 
That seems to work. Thanks a lot.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top