Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: overcoming the 80 character limitation of solaris ps

by hossman (Prior)
on Jun 26, 2002 at 19:08 UTC ( #177483=note: print w/replies, xml ) Need Help??


in reply to overcoming the 80 character limitation of solaris ps

try...

/usr/ucb/ps -w

Or...

/usr/ucb/ps -www

(ie: Wide Wide Wide)

abv-sfo1-x-app58:~> /usr/bin/ps -p 5136 PID TTY TIME CMD 5136 pts/32 0:33 java abv-sfo1-x-app58:~> /usr/ucb/ps 5136 PID TT S TIME COMMAND 5136 pts/32 S 0:33 /usr/local/depot/j2sdk-1.3.1_01/usr/j2se/bin/. +./bin/spa abv-sfo1-x-app58:~> /usr/ucb/ps -w 5136 PID TT S TIME COMMAND 5136 pts/32 S 0:33 /usr/local/depot/j2sdk-1.3.1_01/usr/j2se/bin/. +./bin/sparc/native_threads/java -server -native -ms64m -mx64 abv-sfo1-x-app58:~> /usr/ucb/ps -www 5136 PID TT S TIME COMMAND 5136 pts/32 S 0:33 /usr/local/depot/j2sdk-1.3.1_01/usr/j2se/bin/. +./bin/sparc/native_threads/java -server -native -ms64m -mx64m -classp +ath ./lib/weblogic510sp10boot.jar:./classes/boot -Dfile.encoding=iso- +8859-1 -Dweblogic.class.path=./lib/weblogic510sp10.jar:./license:./cl +asses:./lib/weblogicaux.jar:./server-7022/serverclasses:./server-7022 +/lib/activation.jar:./server-7022/lib/avs30.jar:./server-7022/lib/cos +.jar:./server-7022/lib/jakarta-oro-2.0.2-dev-2.jar:./server-7022/lib/ +jakarta-regexp-1.0.jar:./server-7022/lib/jconn2.jar:./server-7022/lib +/mail.jar -Dweblogic.home=. -Djava.security.manager -Djava.security.p +olicy==/var/httpd/weblogic-5.1.0/weblogic.policy -Dweblogic.system.na +me=server-7022 weblogic.Server

Replies are listed 'Best First'.
Re: Re: overcoming the 80 character limitation of solaris ps
by amphiplex (Monk) on Jun 26, 2002 at 21:50 UTC
    Thank you, that was exactly the advise I needed !

    Beeing curious, I wonder if you know why /usr/ucb/ps prints the full commandline, but when redirecting its output, the -www switch is needed ?

    thanks,
           Kurt
      (first of all, i realize now that -ww is usually all you need -- i can't remember why, but some where i got it in my head that on some systems, you need -www)

      I don't have any documentation to back this up, but as i understand it, this is what happens:

      • If /usr/ucb/ps has no idea where it's output is going (ie: you are redirecting it, or on a dumb terminal) then it follows the strict definition in the manpage: 80 chars, unless you use -w in which case it's 132 chars, unless you use -ww(w) in which case it's as wide as possible.
      • If you are using a non-dumb terminal, and /usr/ucb/ps can determine your terminal width, then it will use that width by default. if you use -w (or -ww or -www) it will output as much as possible

      you probably aren't really seeing -w truncated to 80 characters when you pipe it -- you're probably seeing it truncated to 132, which is all -w is documented to give you.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://177483]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2022-11-29 10:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?