ps is a command for printing information about running processes

learn more… | top users | synonyms

1
vote
2answers
25 views

Format ps output without whitespace

I have the following ps command to get particular properties of all the running processes along with some properties: ps --no-headers -exo "uname,ppid,pid,etime,%cpu,%mem,args" I wish to have it ...
2
votes
1answer
156 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
-1
votes
1answer
37 views

how to close ports with no process attachedto it

how do you close ports if there are not processes attached to it? I used to run an application and they're using this ports previously for some reason the application crashed but if i restart the ...
1
vote
3answers
52 views

Suppress warning from ps -aux on Linux

When I run the ps command i get a warning saying Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.7/FAQ. How do i suppress this warning? Is there some system setting that i ...
1
vote
0answers
33 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" ...
1
vote
4answers
121 views

How to find the PID of nginx process

I am trying to fix a problem with nginx and think that there is an nginx process running on my machine. When I run this command I get this output. $ ps aux -P | grep nginx 1000 3947 0.0 0.0 ...
5
votes
2answers
95 views

Extract tomcat parameters from ps output

I'm trying to write a little diagnostic tool and one of the functions I want from it is that I want to run is: ps axu | grep tomcat | grep -v grep | awk '{ print $<list of desired fields> }' ...
0
votes
0answers
20 views

What is an integer between the square brackets after the command name in ps output? [duplicate]

I have a PC running Debian Wheezy and if I execute ps -o command -p 1 then there is a 2 between the square brackets after the command name for init process: root@vserver:~# ps -o command -p 1 COMMAND ...
3
votes
1answer
91 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 ...
4
votes
1answer
111 views

PS: what does “ps -o comm= -p $PPID” do

I have a script which does ps -o comm= -p $PPID. The explanation says this gets the parent process name. From the man page I found out -o means user defined format, comm means command and -p means ...
3
votes
1answer
54 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 & ...
2
votes
1answer
60 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}` ...
1
vote
2answers
41 views

How to see what processes WERE running?

Is there a chance to get the processes that RAN before my system crash? EDIT What I really want is to see the past processes. My system crashed & I want to know if a specific process was the ...
0
votes
1answer
37 views

Select PID by full command

I need to select the PID of a Java process. If I run something like this: ps -C java -o pid=, it will select all the Java processes. I am after a specific process where the command used to start is ...
2
votes
1answer
47 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 ...
1
vote
3answers
43 views

How can i get the process with the biggest pid?

How can I get the process with the biggest pid using ps?
0
votes
1answer
282 views

long format of ps command in Solaris

Jobs with a long command-line is not printing in Solaris: bash-3.2$ /usr/ucb/ps auxwww | grep ftf | awk '{print $NF}' | head -5 /proj/cmp01/app/btws/cfg/btw /proj/cmp01/app/btws/cfg/btw ...
4
votes
4answers
194 views

Single instance of script, but only with same arguments

I have this beautiful little code here that will exit from a script if there's another instance of it running: single_instance(){ if pidof -x "${0##*/}" -o %PPID >/dev/null; then exit ...
2
votes
1answer
58 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 ...
0
votes
0answers
62 views

top/ps/mpstat showing different output

When my top shows a load of 19/20 and my ps shows root@server:/home/nohup# ps -eo pcpu,pid,user,args | sort -k 1 -r | head -5 %CPU PID USER COMMAND 122131 18695 mysql /usr/sbin/mysqld xxxxx ...
1
vote
3answers
176 views

GREP for Processes by Directory and Kill it

I'm trying to grep for processes that originate from the /Applications/ directory (to kill them), but my grep command keeps catching some false ones as well. What am I doing wrong here? $ ps -ef | ...
3
votes
2answers
226 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.
1
vote
2answers
165 views

How can I find the process ID of a command started in another terminal?

If I run sleep 30 in one PuTTY window, how can I find the process ID of the sleep command from another PuTTY window?
0
votes
1answer
96 views

Job started by procmail does not appear in ps-output and cannot be stopped, even not after reboot

For testing purposes I called procmail by my .forward file |/usr/bin/procmail and by the rules in .procmailrc it started a job named "start", which was simply an infinite loop while true do ...
2
votes
0answers
266 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:~# ...
0
votes
0answers
57 views

unix process showing unusual cpu usage and timing in ps aux

USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND root 684 186912060 0.0 17140 988 ? Ss Feb24 54195432:44 root 7319 288895842 0.0 4096 668 ? S 04:30 ...
1
vote
1answer
49 views

CPU and RAM monitorization by parent id

I'm trying to monitor the CPU and RAM usage (in % of total for example) of a given process wich may spawn several processes. The parent process is /bin/rscw so I get its pid by ppid_bl=$(ps -ef | ...
-1
votes
1answer
78 views

Which is the most precise command to get processes and system information? [closed]

I'm trying to evaluate performances of some active processes of mine on linux. Searching the internet I found that ps and top are the only command available for that. More precisely here, it says ...
2
votes
1answer
747 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
3answers
552 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 ...
-3
votes
1answer
94 views

understanding ps -ef output

root@he:/home/he# ps -ef|grep init root 1 0 0 08:40 ? 00:00:02 /sbin/init root 3557 3545 0 10:09 pts/0 00:00:00 grep --color=auto init What are various columns ...
1
vote
2answers
208 views

Add sid field to ps -f output

I am reading the ps man page and there is something I don't understand. -f does full-format listing. This option can be combined with many other UNIX-style options to add additional columns. ...
0
votes
1answer
45 views

Different representation of bash in 'ps -f' command [duplicate]

I have two bash running; one is Terminal application that runs bash, the other one is xterm application that runs bash. With ps -f, I have -bash one, and bash at the other. What makes this ...
5
votes
1answer
815 views

How to identify executable path with its PID on AIX 5 or more

On AIX 5 or 6, `ps -ef` shows the executable full path randomly. Why and how to determine it? I find many thread through internet and also Unix & Linux and this stack overflow post about finding ...
4
votes
1answer
121 views

What is the meaning of “1-” in the output of ps?

This is the output of the command ps -ef | grep java on one of our machines. jboss 1965 1935 1 2013 ? 04:41:05 java XXXXXXXXXXXXXXXXX jboss 2170 2141 0 2013 ? 00:42:57 ...
4
votes
2answers
10k views

What does aux mean in `ps aux`?

ps aux seems to conveniently list all processes and their status and resource usage (Linux/BSD/MacOS), however I cannot comprehend the meaning of parameter aux using man ps. What does aux mean?
0
votes
4answers
476 views

How to check the process along with its arguments in process list?

I have written a script where i need to pass several arguments with the same script, the script is being executed after a certain time using cron. In order to make sure that there are no multiple ...
2
votes
1answer
79 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
0answers
416 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 ...
0
votes
2answers
169 views

Calculating CPU time of process in RHEL 5.3

For a process management,I would need to remove a process that exceeds a certain amount of CPU time, for example 1 hour.In PS command ,it has TIME parameter shows the total CPU time of a process .So ...
5
votes
1answer
147 views

What does `init [2]` mean in the COMMAND column of ps?

Reading What do the brackets around processes mean? I understand that the executable name is printed. Linux ps man page: Sometimes the process args will be unavailable; when this happens, ps will ...
0
votes
3answers
163 views

For the results of either ps aux or ps -ef, how do I just find the commands with brackets?

So I get the results of root 2 0 0 Jan18 ? 00:00:00 [kthreadd] root 3 2 0 Jan18 ? 00:00:23 [ksoftirqd/0] root 4 2 0 Jan18 ? 00:00:00 ...
1
vote
1answer
204 views

How do I print the process name next to the process ID number in a file?

I'm redirecting results for something into a file and I also need to find the process name and ID number and redirect it to the file as well. I'm guessing the process name is the command in which I'm ...
2
votes
2answers
183 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?
6
votes
3answers
2k views

What does the “interruptible sleep” state indicate?

I had Firefox running on a Parted Magic LiveCD, then (possibly) as a result of a key combination I don't recall, it quickly vanished from screen and Task Bar/Window List. However: ps ax | grep ...
3
votes
3answers
350 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 ...
1
vote
3answers
3k views

process id and killing process - ps commmand

Please see the output of below ps command: abc@smaug:~/Desktop$ ps ax | grep firefox 2213 ? Sl 2:01 /usr/lib/firefox/firefox 2644 pts/0 S+ 0:00 grep --color=auto firefox Please ...
1
vote
1answer
784 views

Difference between top and ps output

I have seen What is the difference between ps and top command? but I think my question is unrelated. My system is Lubuntu 13.04. I run top in one lxterminal window and ps -eo %c%C --sort -%cpu | head ...
4
votes
3answers
804 views

ps: full command is too long

Good day! I use 'ps' to see command that starts process. The issue is that command is too long and 'ps' does not show it entirely. Example: I use command 'ps -p 2755 | less' and have following ...
0
votes
3answers
130 views

ps output differs when run from command line and from script

I have to create list of PID's of the running processes. Here is the script ps echo "fields are " ps | cut -d' ' -f1 ps is showing PID TTY TIME CMD 2168 pts/4 00:00:00 sh 2177 ...