Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting The Full Result from "ps"

How do I get the full width result for the *nix command "ps"?
I know we can specify something like --cols 1000 but is there anyway I can the columns and just print out everything?

like image 759
Daisuke Shimamoto Avatar asked Oct 16 '08 08:10

Daisuke Shimamoto


People also ask

What will be the output of ps?

The output of ps also tells you the process ID of the background process and the terminal from which it was run. In its basic form, ps lists the following: Process ID (PID) A unique number assigned by UNIX to the process.

How do I get full output in PuTTY?

To capture a session with PuTTY, open up PuTTY. Under Session Logging, choose “All session output” and key in your desired log filename (the default is putty. log). This will create the file in the location you choose and begin logging everything from the session.

How can I see full output in Linux?

The simplest way to view text files in Linux is the cat command. It displays the complete contents in the command line without using inputs to scroll through it.

What is stime in ps command?

PPID - The ID of the parent process. C - Same as %CPU , the process CPU utilization. STIME - Same as START , the time when the command started.


2 Answers

Try ps -w -w aux. The -w option sets the output to wide, and doing it twice makes the width unlimited. The "aux" part makes it show more information, and is (afaik) pretty standard mode to use. This is of course platform-dependant, the above works with procps version 3.2.7 on Linux.

like image 151
unwind Avatar answered Oct 18 '22 21:10

unwind


Specify the w option twice, if you're using BSD-style ps. e.g., ps auwwx. A different set of options apply when using System V ps.

like image 33
Chris Jester-Young Avatar answered Oct 18 '22 21:10

Chris Jester-Young