Unix administration - ps full output

This is Interesting: Free IT Magazines  
Home > Archive > Unix administration > October 2004 > ps full output





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author ps full output
chris-c

2004-10-17, 7:48 am

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
Bit Twister

2004-10-17, 7:48 am

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?

Michael Vilain

2004-10-17, 5:50 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:
>
> 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...



Kris Katterjohn

2004-10-17, 5:50 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.
Stephane CHAZELAS

2004-10-18, 7:50 am

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
chris-c

2004-10-18, 7:50 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>...
>
>
> 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.
Stephane CHAZELAS

2004-10-18, 5:53 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
chris-c

2004-10-18, 5:53 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:
> [...]
> [...]
>
> Try with /usr/ucb/ps axwww



Great thanks - that works a treat much obliged.
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com