ps is a command for printing information about running processes

learn more… | top users | synonyms

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 ...
1
vote
1answer
27 views

In which directory is node running?

In trying to figure out how some application that listens on port 8088 is running, I see that it has PID 15020: $ netstat -ntulp Proto Recv-Q Send-Q Local Address Foreign Address ...
1
vote
1answer
19 views

Why is my second tmux session not shown in ps aux or htop but in tmux list-sessions it is?

I start two new tmux sessions, the session name is variably build from a timestamp. (the commands create a new, detached tmux session, which first changes the directory, lists the content and then ...
1
vote
1answer
37 views

List connected via SSH users [duplicate]

I checked this answer and this option - it is good, but it requires sudo rights. I need that this command may be performed by any user, for this reason I am using next command ps -ef | grep sshd: | ...
0
votes
1answer
28 views

grep for specific process in ps but not the grep command itself [duplicate]

If I want to check if something is running, I do ps aux | grep flamethrower, expecting just to show the processes containing flamethrower in the name. This will always find at least one process, as ...
0
votes
1answer
17 views

Average CPU utilization of a process

I am trying to conduct some experiments for determining what the CPU utilization of my process is. I am familiar with the top and ps commands. Which would be a better solution for getting the average ...
1
vote
3answers
30 views

ps to show only processes that match more than one condition (AND)

According to the ps man page: Except as described below, process selection options are additive. The default selection is discarded, and then the selected processes are added to the set of ...
2
votes
2answers
20 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 ...
1
vote
1answer
25 views

Missing space in `ps` output near EOL

Note the missing space before foo: $ ps wafux | grep foo [....] 21742 0.0 0.0 10688 2296 pts/2 S+ 23:30 0:00 \_ grep --color=autofoo $ echo $COLUMNS 99 Compare with this: ...
1
vote
0answers
89 views

Unable to figure out what hogs my RAM [SOLVED] [closed]

Solution: It was file buffers causing the used RAM that didn't show up in htop. To resolve this issue I used the command sync && echo 3 | sudo tee /proc/sys/vm/drop_caches OP: I have a VM ...
1
vote
1answer
37 views

Using “ps -C java -o pid,user,cmd” Can I reduce the output of cmd?

I am trying to get this command down to just the essential information that I need. In the command cmd comes back with this output... /usr/local/jre1.7.0_51/bin/java -Dwd.tag=boxect ...
1
vote
2answers
101 views

awk - Group by and sum column values

I have command to list system process by memory usage: ps -A --sort -rss -o comm,pmem Which list a table like COMMAND %MEM firefox 28.2 chrome 5.4 compiz 4.8 ...
0
votes
2answers
88 views

The program pstree and htop showing threads with unique PIDS. How is this possible?

I ran the program pstree -p 31872 which printed the following output: ruby(31872)─┬─{ruby}(31906) └─{ruby}(32372) The man page for pstree says: Child threads of a process ...
0
votes
0answers
39 views

Possibly Compromised - ./brute xml2014 user x08 300?

I have a long list of a process called "./brute xml2014 user x08 300" when I type in "ps aux". What does this mean? Does this mean my server is being used as a DDoS bot? Here's a screenshot of what ...
5
votes
1answer
273 views

Why does “cat /tmp/out1 > /tmp/in2 &” appear as “bash” with the “ps” command?

Consider: mkfifo /tmp/out1 mkfifo /tmp/in2 cat /tmp/out1 > /tmp/in2 & When I run ps it appears as bash in the CMD section. Why?
4
votes
3answers
125 views

How to get whole command line from a process?

How can I get the command arguments or the whole command line from a running process using its process name? For example this process: # ps PID USER TIME COMMAND 1452 root 0:00 ...
10
votes
6answers
684 views

How to extract a key value pair from ps command

I am trying to extract application name from ps command: ps -af -u sas |grep "java"| grep -v "grep" above command produces the following: sas 24431 1 0 Oct10 ? 00:51:08 ...
6
votes
1answer
179 views

Format cputime for ps

I'm trying to write a script that can monitor a process's CPU usage over an interval (to create a graph). So far, this is the command I'm using ps -p $PROCID -o cputime,etimes My only concern is ...
1
vote
2answers
76 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
251 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
76 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
154 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 ...
2
votes
0answers
118 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
468 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
176 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
21 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
614 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
199 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
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 & ...
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}` ...
1
vote
2answers
83 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
95 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
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 ...
1
vote
3answers
49 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
1k 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
213 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
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 ...
1
vote
0answers
119 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
631 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
538 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
414 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
120 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
676 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
102 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
68 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
121 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
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
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 ...
-3
votes
1answer
226 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
335 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. ...