# Operating Systems > Unix/Linux Options in ps command in UNIX

## blenda

I wanted to know what are the options available with ps command in UNIX ? All I know about ps command is it gives report or statistics about the processes. Any idea on this is also welcome

----------


## kalayama

I usually give ps-ef to list full details of the processes and to display ALL the processes. 

Here are some refference links.
http://unixhelp.ed.ac.uk/CGI/man-cgi?ps
http://en.wikipedia.org/wiki/Ps_(Unix)

Cheers!
Kalayama

----------


## SHIVANI GOYAL

> I wanted to know what are the options available with ps command in UNIX ? All I know about ps command is it gives report or statistics about the processes. Any idea on this is also welcome


PLZ HELP. M NT GETTING IT EXACTLY

----------


## kalayama

Well what is your doubt? Just follow the links I posted, all the necessary details are filed there.

*ps*  is a Unix command which lista down the processes that are running in the shell. You can pass a lot of arguments to it to get better/desired output for the command.


*Note:* When you make a post, please write the entire words. Sure, short forms look fashionable, but there are people who are not smart enough to understand the short forms. For example instead of writing 



> PLZ HELP. M NT GETTING IT EXACTLY


, you could've comfortable written, "Please help me. I am not getting it exactly". See? Sound more " readable ". Also, don't use CAPS unless you want to emphasize a point. (In general CAPS means shout, which is consdered rude).

Just a few little comments mate. Just to add class to your posts. hope to see a lot of great posts from you.

Cheers!
-Kalayama

----------


## chandan1008

ps stands for "process status"
The ps Command  is used to display the currently running processes on Unix/Linux systems. If you know the 'Task-Manager" which pops up under Windows NT/2000/XP when you press CTRL+ALT+DEL then you will quickly grasp what ps does on Linux. It can show you the processes on your system in various formats.
The info provided by kalayama will suffice your need. but just wanted to add a bit more to it.

----------


## moulmein

> I usually give ps-ef to list full details of the processes and to display ALL the processes.


On Linux, when you do a "ps -ef" you see a long description of the command.  However, if you pipe it to something, eg, "ps -ef | more", the command description is shortened.  Same thing if you tried to save it to a file with "ps -ef > /tmp/ps_output".

How do you maintain the long description in the output of a pipe or cat?

On Solaris, the long description is kept whether you pipe or cat, so the ps behaves differently between these two OSes.

----------


## SureshBV

simple way of finding answers for such query is "man" on unix system, pl do use of it.

$ man ps (will list the definition and options with detailed information)

to search a particular process 
$ ps -aef | grep <name>

----------


## moulmein

> simple way of finding answers for such query is "man" on unix system, pl do use of it.
> 
> $ man ps (will list the definition and options with detailed information)
> 
> to search a particular process 
> $ ps -aef | grep <name>


No, they do not mention what happens to ps into a pipe.

Behavior is drastically different between Unix and Linux.

On Linux, "ps -aef | grep" truncates the CMD description to 32 chars.

On Solaris, "ps -aef | grep" truncates to 78 or 79 characters, whereas "/usr/ucb/ps -auxwww" does not truncate the CMD at all.

But "/usr/ucb/ps" is not available in Linux.

So I have not been able to find a universal "Unix" solution to get the full CMD with its arguments through ps.

I saw something about the process information pseudo-filesystem files in /proc on both Solaris and Linux, but not sure is it's possible to get the command and argument information on a process that way. And if it could, would they be compatible between the two OSes.

----------

