ps full output

  • Follow


Hi All,
This is a question Ive been meaning to ask for ages but have never
found the answer. My quesion is howe to do you get the ps command to
show the output of all options to a process? ie when I do

ps -ef | grep mysql

I get
 mysql 28878     1  0 13:19:49 pts/3    0:00 /bin/sh
/usr/local/mysql/bin/safe_mysqld -O key_buffer=192M -O table_cache=128

but there are more arguments to this (when I started it) but they are
stripped off the end of the line. I want to see all arguments/options,
is there an autowrap function to ps or something?

Operating system is solaris 8. The terminal Im using is ssh client but
it does the same when I use a vt terminal.
Thanks
0
Reply cconnell_1 10/17/2004 12:29:02 PM

On 17 Oct 2004 05:29:02 -0700, chris-c wrote:
> Hi All,
> This is a question Ive been meaning to ask for ages but have never
> found the answer. My quesion is howe to do you get the ps command to
> show the output of all options to a process? ie when I do

Have you read the man page for ps looking for wide output?

0
Reply Bit 10/17/2004 12:31:41 PM


In article <slrncn4phd.iia.BitTwister@wb.home.invalid>,
 Bit Twister <BitTwister@localhost.localdomain> wrote:

> On 17 Oct 2004 05:29:02 -0700, chris-c wrote:
> > Hi All,
> > This is a question Ive been meaning to ask for ages but have never
> > found the answer. My quesion is howe to do you get the ps command to
> > show the output of all options to a process? ie when I do
> 
> Have you read the man page for ps looking for wide output?

Just in case he missed it:

args

"The command with all its arguments as a string. The implementation may 
truncate this value to the field width; it is implementation-dependent 
whether any further truncation occurs. It is unspecified whether the 
string represented is a version of the argument list as it was passed to 
the command when it started, or is a version of the arguments as they 
may have been modified by the application. Applications cannot depend on 
being able to modify their argument list and having that modification be 
reflected in the output of ps. The Solaris implementation limits the 
string to 80 bytes; the string is the version of the argument list as it 
was passed to the command when it started."

-- 
DeeDee, don't press that button!  DeeDee!  NO!  Dee...



0
Reply Michael 10/17/2004 6:27:09 PM

cconnell_1@lycos.com (chris-c) wrote in message news:<9607ea95.0410170429.7d775dd9@posting.google.com>...
> Hi All,
> This is a question Ive been meaning to ask for ages but have never
> found the answer. My quesion is howe to do you get the ps command to
> show the output of all options to a process? ie when I do
> 
> ps -ef | grep mysql
> 
> I get
>  mysql 28878     1  0 13:19:49 pts/3    0:00 /bin/sh
> /usr/local/mysql/bin/safe_mysqld -O key_buffer=192M -O table_cache=128
> 
> but there are more arguments to this (when I started it) but they are
> stripped off the end of the line. I want to see all arguments/options,
> is there an autowrap function to ps or something?
> 
> Operating system is solaris 8. The terminal Im using is ssh client but
> it does the same when I use a vt terminal.
> Thanks


i don't know about Solaris, but on Linux you would do:

ps ax|grep mysql

for example, when i do "ps ax|grep xterm" on my box i get:

30211 ?        S      0:00 xterm -ls -bg black -cr green -fg white -C
-fn 9x15 -sl 500

it shows you (in order) pid, tty, stat, time, command (with
arguments). i think this is what you were asking for.
0
Reply kjak 10/17/2004 7:48:11 PM

2004-10-17, 05:29(-07), chris-c:
[...]
> ps -ef | grep mysql
>
> I get
>  mysql 28878     1  0 13:19:49 pts/3    0:00 /bin/sh
> /usr/local/mysql/bin/safe_mysqld -O key_buffer=192M -O table_cache=128
>
> but there are more arguments to this (when I started it) but they are
> stripped off the end of the line. I want to see all arguments/options,
> is there an autowrap function to ps or something?
>
> Operating system is solaris 8. The terminal Im using is ssh client but
> it does the same when I use a vt terminal.
[...]

Try with /usr/ucb/ps axwww

-- 
Stephane
0
Reply Stephane 10/18/2004 9:41:35 AM

kjak@ispwest.com (Kris Katterjohn) wrote in message news:<4efb7f51.0410171148.78374271@posting.google.com>...
> cconnell_1@lycos.com (chris-c) wrote in message news:<9607ea95.0410170429.7d775dd9@posting.google.com>...
> > Hi All,
> > This is a question Ive been meaning to ask for ages but have never
> > found the answer. My quesion is howe to do you get the ps command to
> > show the output of all options to a process? ie when I do
> > 
> > ps -ef | grep mysql
> > 
> > I get
> >  mysql 28878     1  0 13:19:49 pts/3    0:00 /bin/sh
> > /usr/local/mysql/bin/safe_mysqld -O key_buffer=192M -O table_cache=128
> > 
> > but there are more arguments to this (when I started it) but they are
> > stripped off the end of the line. I want to see all arguments/options,
> > is there an autowrap function to ps or something?
> > 
> > Operating system is solaris 8. The terminal Im using is ssh client but
> > it does the same when I use a vt terminal.
> > Thanks
> 
> 
> i don't know about Solaris, but on Linux you would do:
> 
> ps ax|grep mysql
> 
> for example, when i do "ps ax|grep xterm" on my box i get:
> 
> 30211 ?        S      0:00 xterm -ls -bg black -cr green -fg white -C
> -fn 9x15 -sl 500
> 
> it shows you (in order) pid, tty, stat, time, command (with
> arguments). i think this is what you were asking for.

Thanks it does work on linux but not solaris. I cant seem to get it to
work on solaris even with the /usr/ucb/ps command.
0
Reply cconnell_1 10/18/2004 1:30:49 PM

2004-10-18, 06:30(-07), chris-c:
[...]
> Thanks it does work on linux but not solaris. I cant seem to get it to
> work on solaris even with the /usr/ucb/ps command.

/usr/ucb/ps ww

will give you the whole list of arguments

$ zsh
$ sleep 400 {1..100000} &
[1] 21687
$ /usr/ucb/ps ww $!| wc
       2  100011  588961

unless the arg list contains a non-printable character:

$ sleep 400 $'\r' &
[1] 22385
$ /usr/ucb/ps ww $!
   PID TT       S  TIME COMMAND
 22385 pts/1    S  0:00 [ sleep ]

-- 
Stephane
0
Reply Stephane 10/18/2004 1:54:07 PM

Stephane CHAZELAS <this.address@is.invalid> wrote in message news:<slrncn73ue.2ec.stephane.chazelas@spam.is.invalid>...
> 2004-10-17, 05:29(-07), chris-c:
> [...]
> > ps -ef | grep mysql
> >
> > I get
> >  mysql 28878     1  0 13:19:49 pts/3    0:00 /bin/sh
> > /usr/local/mysql/bin/safe_mysqld -O key_buffer=192M -O table_cache=128
> >
> > but there are more arguments to this (when I started it) but they are
> > stripped off the end of the line. I want to see all arguments/options,
> > is there an autowrap function to ps or something?
> >
> > Operating system is solaris 8. The terminal Im using is ssh client but
> > it does the same when I use a vt terminal.
> [...]
> 
> Try with /usr/ucb/ps axwww


Great thanks - that works a treat much obliged.
0
Reply cconnell_1 10/18/2004 8:32:36 PM

7 Replies
237 Views

(page loaded in 0.098 seconds)

11/7/2012 2:31:21 AM


Reply: