ps is a command for printing information about running processes

learn more… | top users | synonyms

4
votes
1answer
125 views

Get process list with logical intersection of selectors?

The Linux ps command allows multiple selectors, such as user and command name, but always returns the logical OR of those selectors (more than I want). Does anyone know of a method or tool already ...
4
votes
2answers
1k views

Convert PDF from sRGB color space to CMYK

Does anyone know how I can convert a PDF (or EPS) file from sRGB color space to CMYK color space? My workflow is currently the following: Draw an image with Powerpoint Print via postscript printer ...
4
votes
1answer
7k views

Linux : See CPU usage by a process for the last second

vmstat 1 Above will print virtual memory statistics each seconds. It will also show the CPU utilization for last second. I have a web server at hand which runs httpd and MySQL. I need to find how ...
4
votes
3answers
1k views

Uniquely identifying java processes with same name

I have two java processes which run using the same file name, MyApp.jar (for example). /usr/java/latest/bin/java -jar MyApp.jar These jars exist in different places and use different ...
3
votes
4answers
1k views

How to run java process to be seen not as 'java…' in processes list?

Is it possible to run a Java process in Linux in a way that it could be seen in ps as some sort of alias? It would be easier to restart it when it is down.
3
votes
1answer
2k views

What does a “[1]+ Exit 1” response mean?

I ran this command to try and get my python program to run in the background and let me exit the SSH connection I am using: nohup python files.py >> files.log & I then check ps to check ...
3
votes
2answers
1k views

How to list only non-<defunct> processes?

Is there a combination of command-line options for ps or pgrep or some other relatively direct way to determine if a particular process name is actually running (available for normal use).. By ...
3
votes
2answers
67 views

Sorting the output of `ps`

I am trying to understand why ps does not behave the way I expect it to. From the man pages, the following command should display ppid and lstart, with items sorted by lstart order. However when I run ...
3
votes
1answer
222 views

Enumerating\writing files in a specific directory hangs the command

I'm communicating with a machine remotely through ssh. This machine runs a custom-built Linux and it has very limited set of commands. At some point, a specific directory refuses files to be written ...
3
votes
2answers
391 views

Why can't pgrep find scripts started via env?

For example: $ cat foo.sh #!/usr/bin/env bash while true; do sleep 1 ; done $ ./foo.sh & $ pgrep foo.sh $ Contrast with: $ cat bar.sh #!/bin/bash while true; do sleep 1 ; done $ ./bar.sh & ...
3
votes
1answer
5k views

How to see process created by specific user in Unix/linux

I want to see list of process created by specific user or group of user in Linux Can I do it using ps command or is there any other command to achieve this?
3
votes
1answer
48 views

-p and -o comm doesn't work together?

I'm trying to get CPU usage of a process by, ps -p 12990 -o comm=comm,pcpu But that only print the command name (the process does exist), what's wrong with it?
3
votes
1answer
5k views

Understanding ps elapsed time format for long running processes

I'm using a ps command as part of an exercise to identify processes running longer than a given threshold. I'm using the following template to get the elapsed time for a know process command: ps -eo ...
3
votes
2answers
4k views

How to find out total memory resource usage with ps?

With ps command I can find out how much memory each program uses: ps -u mertnuhoglu -o pcpu,rss,pid,command Is it possible to find out the sums of each type of resource usage as well, easily?
3
votes
1answer
70 views

Grepping a variable

I've written a simple init script to start and stop a Python script as a service. I have to be explicit about the version of Python I'm running, because this is on a CentOS 5 box with Python 2.4 & ...
3
votes
2answers
528 views

How to count how many shell/terminals are running?

I´m trying to count how many shell or terminal windows are currently running. I tried ps a|grep bash; ps a|grep tty; But it can be inaccurate.
3
votes
2answers
544 views

How to set what field names are displayed in listings?

When I execute a command in Ubuntu, which results in a listing, I get results without the field names. Example is ls -l or ps l. I am not very experienced and always need to go digging through man ...
3
votes
4answers
810 views

Capture complete process structure/stack

There are a lot of java processes running on the server, generally, we capture the PIDs of the java processes using command 'ps -ef | grep java'. In general, the java processes have a lot of jars in ...
3
votes
1answer
1k views

ps command not giving output in home directory

I am logging into a solaris server, switching to bash, then switching to another user "sruser" and switching to bash. /home/batch/sruser/ is the home directory of the user "sruser". The issue is ps ...
3
votes
3answers
456 views

Command line options of rackup are not shown in ps output or procfs

As you know if you wish to get command-line runtime arguments for running command you can parse ps -e or /proc/<pid>/cmdline. But I have encountered issue when this method returns only command ...
3
votes
1answer
356 views

HP-UX SZ limit for ps?

Right so I have a fun little thing that I'm deathly confuzzled about. I have a program that is running and I am getting the following: using top: SIZE RES 1639M 359M using ps: SZ 20171 ...
3
votes
1answer
609 views

Process history in Unix/Linux systems

I know that ps -efl shows running processes on *nix systems. I would like to check history of the (past) processes that have been run on a particular machine, preferably with all the information ps ...
3
votes
0answers
151 views

Can I get WCHAN from ps on Mac OS X 10.7.4?

From the manual it seems that ps -AO wchan should tell me what everything is sleeping on, but everything comes up as -. (And nwchan as 0). Did they do away with the old sleep()/tsleep() interface in ...
2
votes
1answer
248 views

why “ps -ef -u root -U root” also displays user processes?

ps -ef -u root -U root Also displays processes whose user is not root (the current user). Can someone explain me why ? -u : EUID -U : RUID
2
votes
4answers
4k views

Alternative to `pkill` or `pgrep -f` on cygwin?

Suppose I have starting my process like: java -DSOME_STRING -jar foo.jar Then on linux, I can use the following to find or kill this process: pgrep -f SOME_STRING pkill -f SOME_STRING However ...
2
votes
2answers
1k views

How can I get a list of long running processes that match a particular pattern?

I know that I can do ps aux | grep cgi to get a list of all cgi scripts currently running, and ps -p [pid] -o etime= can get me the run time for each pid; is there a way to combine the two, or better ...
2
votes
1answer
484 views

UNIX-, BSD-, GNU-options in Linux's ps command. Where are they from? [closed]

In the manual for the ps command on Ubuntu there is this text: This version of ps accepts several kinds of options: 1 UNIX options, which may be grouped and must be preceded by a ...
2
votes
3answers
1k views

How to show CPU time for processes via top without 'root' procs

Okay, So I've been attempting this for about three hours now without success. How do you search/display/use the top command (or ps command if it works...) to output a list of all procs, sorted by CPU ...
2
votes
2answers
5k views

Frequently used “ps” (process status) commands in linux? [closed]

EDITED: These are the the only most commonly used (and important) ps command options I've come across so far: $ ps ux, $ ps au, $ ps aux, $ ps U aahan, $ ps uU aahan So, is that all, or am I missing ...
2
votes
1answer
2k views

A more readable ps

Are there any tools that improve the readability of ps in the same spirit as ack for grep? This would be especially on OS X where ps does not even have options such as --sort user. So far the nicest ...
2
votes
1answer
942 views

What is the meaning of ps process names printed in [] such as [cgroup]? [duplicate]

when I do a command such as ps -aux on CentOS 6 I get a bunch of processes whos command is listed in [] as shown below. What is the meaning of the [] in the name? I am assuming that these are special ...
2
votes
2answers
362 views

How do I tell `ps` to use all available columns?

To specify columns, I can use ps's -o option: ps -o pid,cmd How can I tell ps to output all of its available columns?
2
votes
2answers
876 views

“ps” command doesn't return to prompt

I have this linux box that I need to maintain periodically. To do that, I issue a ps command programmatically and check the running processes. But as shown in the screenshot, sometimes, the ps ...
2
votes
2answers
165 views

Print like Firefox

Made a CLI script to print Wikipedia articles: WIKI='https://en.wikipedia.org/w/index.php?title=' TITLE=$1 PRINTABLE='&printable=yes' SRC=$WIKI$TITLE$PRINTABLE HTML=$1".html" PS=$1".ps" wget ...
2
votes
1answer
49 views

Is “ps -ef” deprecrated?

I was doing some work on a linux and the system admin told me that ps -ef is deprecated though it still works. I can't seem to find any documentation towards the same. Has ps -ef really been ...
2
votes
1answer
67 views

Does this dispatcher produce zombie process?

I have such a dispatcher shell script. while read line do java TestProg $line & done < $tasklist On the zombie process Wikipedia page, it says if a parent fails to call wait, the ...
2
votes
3answers
2k views

How is it possible to sort ps command's CPU field?

I'm trying to make a small command that will find the processes that use the most CPU power. Firstly, I use ps aux > file.txt and then cut -c 16-20 file.txt | sort -n | tail -5. The result I get ...
2
votes
1answer
2k views

parsing process ID/names from /proc, thread IDs

When I'm parsing process IDs from /proc, obviously each thread of a process gets its own ID. And I realize that all the threads in that same process can be gathered from /proc/${pid}/task/. But my ...
2
votes
1answer
96 views

Does pgrep output ever include the parameters supplied to the process?

The snippet below (from an existing script) is used to check the xvfb processes and whether they are listening on a specific port: my_list=`pgrep -u $CurrentUserID -fl Xvfb | grep :${XVFBPORT}` ...
2
votes
2answers
124 views

How can I automate this manual task of finding a particular ancestor process from a given pid or command?

I know the full command "/bin/child_process" or its pid (3996 in this case) and I'm running ps auxf and then visually identifying its ancestor process /bin/parent_process foobar. root 3227 0.0 ...
2
votes
2answers
19 views

Getting transient PID from log into a PS search before it dies

I have a transient prelink process populating our audit log, but we're not sure what the process is. The error log gives us the PID, but it disappears pretty much instantly, as the process finishes ...
2
votes
1answer
84 views

Translate GNU ps flags to standard flags

I'm using oh-my-zsh and its ssh-agent plugin on OSX, but lately somebody upstream decided to use ps x. I'm not entirely sure what that even does, since I haven't used a GNU userland in something close ...
2
votes
1answer
8k views

Among “ps” command output fields, %CPU isn't the actual CPU usage of the process?

For example, one of the output fields of this BSD style command, ps aux, is "%CPU". The alternative command, ps -efl outputs the "C" (or CP) field. As per the ps man page: %CPU is the cpu ...
2
votes
0answers
113 views

Understanding “vncserver -list” with respect to Xvnc processes

I have a pretty standard setup on a Centos 6.5 VM. I've configured VNC sessions to start at boot per CentOS's wiki VNCSERVERS="1:root 2:moe 3:curly" VNCSERVERARGS[1]="-geometry 640x480" ...
2
votes
0answers
672 views

How is it that I can attach strace to a process that isn't in the output of ps?

I'm trying to debug why our integration tests are taking so long and it looks like they're hanging part way through. I logged onto our test service and saw the following behaviour: root@colossus:~# ...
2
votes
1answer
2k views

What is the difference in CPU utilization between 'ps aux' and 'ps -ef'?

I use Ubuntu 12.04.1 Linux. I see a difference between %CPU and C output format of ps command for a process. It is not clearly noted in the ps man page. Man pages says: CODE HEADER ...
2
votes
1answer
689 views

How to get start time for a defunct process on AIX?

When I run the following commands on AIX: 22:root@SERVER:/root # ps -ef | head -1 UID PID PPID C STIME TTY TIME CMD 22:root@SERVER:/root # ps -ef | grep defunct | head -1 ...
2
votes
1answer
102 views

“ps” output and comments

I'm pretty sure you cant do this but maybe someone has some weird hack... Is there a way to get comments (#blahblah) to show up in ps output? My problem is that i have a script, lets call it ...
2
votes
0answers
356 views

PS command ouput limited to 80 bytes only [duplicate]

Possible Duplicate: How can I get a full process list in solaris, without truncated lines? The output of ps command only returns 80 bytes. Below is the text from manual pages of Solaris ps ...
1
vote
3answers
6k views

What is the difference between ps and top command?

What is the difference between ps and top command ? I see that both can display information about running processes . Which one should be used when ?