ps is a Unix operating system command and the like used to display the running processes.

learn more… | top users | synonyms

65
votes
3answers
94k views

ps aux output meaning

When typing ps aux, what does each column of the output mean? For example $ ps aux timothy 29217 0.0 0.0 11916 4560 pts/21 S+ 08:15 0:00 pine root 29505 0.0 0.0 38196 2728 ? ...
22
votes
5answers
31k views

How can I know the absolute path of a running process?

If I have multiple copies of the same app on the disk, and only one is running, as I can see with ps, how can I know the absolute path to distinguish from the others?
15
votes
4answers
9k views

Excluding grep from process list

I have cobbled together a command to return the process ID of a running daemon: ps aux | grep daemon_name | awk "{ print \$2 }" It works perfectly and returns the PID, but it also returns a second ...
11
votes
4answers
13k views

ps: How can i recursively get all child process for a given pid

How can I get the entire process tree spawned by a given process displayed as a tree and only that tree i.e. no other processes? The output could e.g. look like 4378 ? Ss 0:10 SCREEN ...
7
votes
5answers
5k views

How to find out from which folder a process is running?

In *nix you can use ps to see which process are running. But if an executable has multiple homonimous files in a device, we can't figure where it was invoked from. This is slightly different from my ...
7
votes
5answers
5k views

Why does ps aux displays a number instead of a username?

Running ps aux just gave me the following output: ... www-data 26254 0.0 0.7 27304 3544 ? S 15:07 0:00 /usr/sbin/apache2 -k start 1001 25807 0.8 0.8 48444 4332 ? Sl ...
7
votes
3answers
6k views

Why does my system hang when I run ps, w and possibly other commands?

I don't know why, but I cannot run the ps or w commands on my Ubuntu 10.04LTS machine. I did a trace for both, and both stopped when reading part of the same file. Here's the result of running ps ...
5
votes
1answer
13k views

In UNIX, what are the Ss, Sl, and Ssl proccess types I see with ps aux?

When doing a ps aux command, I see some process listed as Ss, Ssl and Sl. What do these mean? root 24653 0.0 0.0 2256 8 ? Ss Apr12 0:00 /bin/bash -c /usr/bin/python ...
5
votes
2answers
203 views

why ps -ef show the time like this

When I run the ps -ef command I receive something like this: root 26728 26725 99 Sep25 ? 1184018564-02:43:14 java -jar /root/TaskManager.jar I need to understand why the time is shown ...
4
votes
1answer
6k views

Unix : List children processes for a given pid

What I need is, given a process id, list all his children without any clutter (table header, other columns than the pid) What I have is : ps h --ppid $PID Which gives me: 26277 pts/13 S+ ...
4
votes
1answer
504 views

Is it possible to format ps RSS (memory) output to be more human friendly?

Executing ps ux returns a nice list of process information, easy to grep through or watch. However, there doesn't seem to be much flexibility in the memory usage output; the RSS (resident set size) is ...
3
votes
1answer
281 views

Why is the reported user “root” when a “normal user” executes “ps ux” on OS X? Is this normal behaviour?

I am running OS X 10.6.1 . When i am logged in as a normal user of group staff and do a ps ux it lists my ps ux command as being run by root: snies 181 0.0 0.3 2774328 12500 ?? S ...
3
votes
2answers
4k views

Is it possible to 'hide' a process from the listing of `ps` or `top` on Linux

First, I presume that if this is possible it would need to be done as root (or as a user who shares root's UID of 0). How can a process be launched so that it does not show up in a ps aux or ps ef or ...
3
votes
2answers
902 views

Multiple pages per sheet (PDF)

I use the following commands pdf2ps input.pdf - | psnup -pA4 -4 >> output.ps ps2pdf output.ps output.pdf rm output.ps to merge multiple pages (in this case 4) from input file to one sheet in ...
3
votes
1answer
223 views

How can I graph memory usage by user?

Basically, I want to graph the memory usage with each username as title, as time passes by. I would set that script as a cron job, to create a graph that shows memory usage of certain usernames. How ...
3
votes
2answers
292 views

find any script which is running for more than say 30 minutes in Linux System

Please share command to find any script which is running for more than say 30 minutes. in Linux System
3
votes
1answer
196 views

rsync … blocked for more than 120 seconds

I'm running an rsync between two external USB 2TB drives to make a copy on a CentOS 5.9 server. It appears to have stalled, and it hangs when I cd to the source drive in the copy, while the ...
2
votes
3answers
2k views

How to get only the user, the pid and the command run for a specific process? (Ubuntu 11.10)

When I do ps -ef|grep python I get the following: myusername 4492 2994 0 10:32 pts/0 00:00:01 /home/myusername/.virtualenvs/myproject/bin/ipython manage.py runserver root 6665 1 0 ...
2
votes
2answers
4k views

GhostScript noob help - Breaking a multipage PDF file into many single page PS or EPS files

I'm trying to do the following with ghostscript: Turn one multipage PDF file (about 3,000 pages, 200mb file) into: One file per page of the PDF, and convert each (page/file) to EPS or PS (post ...
2
votes
2answers
650 views

CMD in ps command in linux

Under CMD, I was wondering what the /1 or /2 ... are? What do they indicate? I couldnt find it in the man page. In general, does anyone have a good understanding of the CMD column that they could ...
2
votes
2answers
3k views

kill - no process found

when I list my processes I have: root@adam-ThinkPad-T410:~# ps -e | grep signals 11641 pts/0 00:00:00 signals 11642 pts/0 00:00:00 signals 11643 pts/0 00:00:00 signals but when I ...
2
votes
2answers
1k views

flag to 'ps' command that can filter on arguments?

I know the argument "-C" which can filter on the command. But in my scenario I may have some processes with the same process name and different args. How to filter on these args? (I know I could ...
2
votes
1answer
391 views

ps and top give different CPU usage

I've seen a few posts similar to this, most notably here, but wasn't quite satisfied with the answers. I'm comparing top and ps results on a specific process and see huge discrepancies in CPU usage. ...
2
votes
3answers
169 views

grep -c gives inconsistent outputs

I am trying to determine the number of processes that are running via the following command line: ps aux | grep -c 'Xvfb :1' When the process "fiji :1" is not running I sometimes get a value of 0 ...
2
votes
2answers
1k views

How to convert PDF to ASCII Postscript so the contained text can be searched/replaced?

According to Chapter 3.2 of the PostScript Language Reference, "there are three encodings for the PostScript language:ASCII, binary token, and binary object sequence". We've been generating PDF files ...
1
vote
1answer
3k views

In ps -ef, what information does the fourth column show?

For example, ps -ef Display full information about each of the processes currently running. UID PID PPID C STIME TTY TIME CMD hope 29197 18961 0 Sep27 ? 00:00:06 sshd: hope@pts/87 hope 32097 29197 ...
1
vote
2answers
139 views

How do I extend unix “ps -ef” command to see more info

I need to grep process by information containing in CMD column, but this column strings is cut(limited) and needed info is lost. Please suggest how can I enlarge string size allowed for CMD column.
1
vote
1answer
47 views

Why can ps know about the process that runs after it?

[root@myvm1 ~]# ps aux | grep ls root 13594 0.0 0.1 3912 672 pts/1 R+ 09:46 0:00 grep ls In the above, the ps aux runs first and its output is then redirected to the grep ls ...
1
vote
1answer
417 views

awk - max value of a rolling average

I have a bash command which gives me the highest value in the 9th column of a file: cat "log.txt" | grep 1923 | awk '{print $9}' | sort -n | tail -1 log.txt is a log of CPU usage for process 1923 ...
1
vote
1answer
64 views

Running ps with clauses as AND instead of OR

I am looking to see if a specific process is running as a specific user. For which I can do this ps --no-headers -C command -o user | grep user Which is pretty neat, it however gets slightly ugly ...
1
vote
1answer
2k views

Unix ps -l priority

Why does unix ps -l whows one number in column "PRI" but in same time ps -o pri shows another number? P.S. cpu and nice are zero for those processes
1
vote
1answer
362 views

Groff ignores line breaks from my shell

I've been using groff to make ps files for printing with the -man flag. If I want to convert anything else such as a header file or just the output from ls -l or other program the line breaks are ...
1
vote
2answers
22 views

two processes are listed for one shellscript?

I have a shell script which does somewhat simple. #!/bin/sh do something boring... When I execute the shell script like this, $ nohup sh mysh.sh > /null/dev/ 2>&1 & I see there are ...
1
vote
1answer
20 views

Show last 5 opened processes in terminal?

I am trying to have a terminal showing the last 5 processes opened. This is helpful for my debugging. At this point I have watch ps -ef --sort=start_time This works fine but it shows all processes ...
1
vote
2answers
45 views

how do I continuously do a ps auxw on OSX?

The question is this: If I open terminal and type ps auxw, I see a list of all processes running but this command is like a snapshot of that instant. What I need is this: I am trying to discover what ...
1
vote
1answer
516 views

What determines the process name in ps aux?

I'm trying to track down this script called ./launch.sh, that on my machine is currently in an infinite loop in which it calls a Java program, immediately crashes, then sleeps for 3 seconds. ps aux ...
1
vote
1answer
222 views

ps comm format always cuts the process name

I am trying to invoke ps -o comm:1024 --pid 1391 --cols 1024 -w in the hope of getting the full process name (and only that), but I always end up with this COMMAND notification-ar while the process ...
1
vote
1answer
149 views

What is the AIX's `ps -T PID` equivalent for Linux?

I really like the way ps -T PID works on AIX. It shows you a nice tree of processes in the right side, and their PID, PPID and other info in the left side. In AIX docs, the -T flag reads Displays ...
1
vote
1answer
454 views

What memory statistics does Linux' ps command really display?

Consider the following pmap output of a simple tail process on Linux: $ pmap -x 3974 3974: tail -F /var/log/syslog Address Kbytes RSS Dirty Mode Mapping 0000000000400000 60 ...
1
vote
1answer
60 views

How to determine full command with args given a pid (or port in use)

I've got this nice bash function for telling me the pid using a port: using_port() { lsof -i:${1} } Output looks like this: COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME ...
1
vote
1answer
117 views

pdf file resists converting to ps and printing

I'd like to print this file: http://florian-konnertz.de/public/Psychology_of_Computer_Programming.pdf I cant find out how I do that here. I tried on our Kyocera FD 2000 beside from pdf viewers from ...
1
vote
0answers
7 views

Finding all not responding tasks from the command line in OSX?

I know I can do ps -aux | xargs kill etc but I want to list the PIDs of all tasks that are not responding (the red ones in Activity Monitor). What command I can execute in my terminal to list these ...
1
vote
0answers
20 views

ps aux and processes between [ ] [duplicate]

Just wondering if there is a difference between processes listed between [ ] and others when running ps aux. What does it mean? Is the process still running or is it a recent process that has been ...
1
vote
0answers
53 views

Using systemd-cgls and cgroups as a user configured pstree

When using pstree I was annoyed that processes forget their grandparent process when they get orphaned since they get adopted by init, so I thought maybe I could use systemd-cgls and cgroups, since an ...
1
vote
1answer
163 views

What units does `ps -o` report memory usage in?

I'm using a script - memusg - to report the peak memory usage of my rails app. The script uses ps -o to measure memory usage. My question is: what units does ps -o report memory usage in? The script ...
1
vote
0answers
175 views

ps - Summing up memory usages

The more I read, the more confused I get.. I want to generate a list of processes and their memory consumption (physical + virtual). So far, this is what I have done: I take the VSZ of each ...
1
vote
2answers
192 views

Kill a process in Unix

When I execute theps -fea | grep ssh-agent command, I get the following output: tomcat 29057 14086 0 Jan 09 ? 0:00 ssh-agent oracle 1964 14086 0 Nov 26 ? 0:00 ...
1
vote
3answers
1k views

How to select processes by command name when using ps in Mac OS X

In Linux, I use ps -C command_name to select processes of specified command name. But it doesn't work in Mac OS X. I read the the man page of ps carefully, but just can not find any option to do this. ...
0
votes
1answer
44 views

What does ps axuwfw return?

I am getting strange output including my old makefile output and process tree when running below command on linux ps axuwfw Also, what is the usefulness of the following command and how does it ...
0
votes
2answers
2k views

ps warns me about bad syntax with “aux” options

When I attempt to run the command ps with the flags/switches/options aux I get the following message. If I run the command without grep, no message is displayed. What am I doing wrong? ps -aux | grep ...