In most Unix-like operating systems, the "ps" program displays the currently-running processes.

learn more… | top users | synonyms

1
vote
1answer
212 views

In the output of ps(1) on OS X-like systems, what do processes listed in parentheses mean, and how do I kill them?

username@yosemite ~ % ps wwwaux | grep java username 48111 0.0 0.0 0 0 ?? ?E 11:54AM 0:00.00 (java) username 91673 0.0 0.0 2432772 508 s006 R+ 3:19PM 0:...
1
vote
2answers
616 views

How to change time format to seconds in ps -p?

I wrote a rsync script which also checks for how long the process of the script has been running. This is the relevant part: time=$(ps -p $processid -o etime= | awk -F: '{print $2}') # number of ...
1
vote
5answers
681 views

Get the pid if 2 tomcat(s) is running

I have 2 tomcat's running, how do I get the pid if both have similar names? ps -ef | grep java root 12952 1 0 10:01 pts/0 00:00:03 /usr/lib/jvm/jre/bin/java -Djava.util.logging.config....
1
vote
1answer
427 views

Why does a suspended process show high CPU usage in ps?

Sometimes when a process is suspended (in T state) the output of ps shows the process using an unusual amount of CPU%. USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND cossey ...
1
vote
1answer
361 views

What could cause a PHP script run as a cron job to end up in D state?

My server is running Ubuntu 12.04 LTS (precise) and I'm having a weird issue. The server is hosting a large website which is used for data collection. The website is in PHP and uses Zend Framework. ...
1
vote
1answer
250 views

ps and top show a different command name then what pkill and pgrep sees

Often times I want to kill process that I believe has changed its command name (I think through setproctitle() or something similar). Apparent pkill, pgrep, and friends do not read the new command ...
1
vote
1answer
899 views

How to remove the hint in the terminal?

As a normal user , when I run some command like ps\netstat, the terminal hint me: (Not all processes could be identified, non-owned process info will not be shown, you would have to be root to see ...
1
vote
2answers
7k views

ps shows that migration/* processes consume a lot of CPU, but top keep silence about them

here is the result of ps command, shown only first 10 lines ps aufx | head USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND root 2 0.0 0.0 0 0 ? S ...
1
vote
0answers
18 views

ps output is not correlated to free command?

I am getting sum of all reserved memory in KBs by using following command:- ps aux --sort -rss | awk '{sum +=$6} END {print sum}' OUTPUT: 14746220 i.e. 14.74GB However free -g returns 27GB as used. ...
1
vote
0answers
58 views

“normal” number of processes/threads

Considering a standard LAMP server (aka webhosting) what should be a limit at number of processes/thread? ps -elfT | wc -l 475 "Limit" I mean: on DDOS probably the numbers of children-processes ...
1
vote
1answer
173 views

ps -o pcpu on Debian Squeeze is giving meaningless numbers

I'm trying to get the CPU percentage for processes on a busy server out of ps, but it's giving me nonsensical numbers. Here's a truncated example: $ ps -eo pcpu,pid | sort -n %CPU PID ... 36.5 ...
1
vote
0answers
117 views

Where is this extra number coming from in ps aux

A couple of processes returned by ps aux have an extra column. A monitoring tool I'm using is interpreting this as %CPU and reporting huge consumption. Here's the truncated output: USER PID %...
1
vote
1answer
158 views

Solaris ps output interpretation

I have a program that regularly forks and execs other programs. Occasionally, the programs that it starts get stuck in their processing and new programs never seem to start processing. We eventually ...
0
votes
1answer
280 views

Cron job running twice

I have a ubuntu linux ec2 instance running on AWS. Upon entering the command ps -ef to view all currently running processed, I see root 2346 944 0 06:08 ? 00:00:00 CRON ubuntu 2347 ...
0
votes
1answer
233 views

Why doesn't ps resolve usernames including dashes

On Debian and Ubuntu (probably on other GNU systems too), when ps lists a process' user, it normally resolves its name, but when a process is running as a user which has a dash in its name, the user's ...
0
votes
2answers
58 views

How to ensure that the script and its command get killed once terminal is closed

I have written a script and it is working fine . It do some tail and grep operations. When I am closing my terminal and the greping the PID of my script , I can find the script is still present in ...
0
votes
1answer
1k views

RHEL/Apache - meaning of WCHAN=“semtim”

What is the meaning of WCHAN="semtim"? ps -ylC httpd S UID PID PPID C PRI NI RSS SZ WCHAN TTY TIME CMD S 0 25330 1 0 78 0 16168 170563 - ? 00:00:14 httpd R ...
0
votes
2answers
1k views

What is the meaning of this result from running 'lsof -i:8080'?

When I run the following command: lsof -i:8080 This is the result: node 32419 root 6u IPv4 122865 TCP localhost.localdomain:webcache (LISTEN) That result is different from that of ...
0
votes
2answers
113 views

Unix / Linux command to see finished or killed processes

Is there a way to see processed that finished running or were killed a given amount of time ago? For instance, ps -ef will show all running processes, but if a process finishes, it is no longer ...
0
votes
1answer
150 views

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

this is the command to view the process path on Linux ps -auxwe | grep 24466 ( 24466 is only example ) but please advice is it possible to view the path of running process on Solaris if yes ...
0
votes
1answer
188 views

Accurately get memory usage on Linux

I am trying to incorporate this feature into a script I am writing. From what I understand "free -m" does not report accurately. From what I understand the memory is used, Linux does not "free" it ...
0
votes
2answers
452 views

Getting Running Script Names Via PS

I need to get a list of all running PHP scripts but piping PS thru grep just gives me a list of all references to PHP files How do I accomplish this? Is this even possible? root@myhost:/var/www/...
0
votes
3answers
1k views

Excluding child processes from ps

Background: To reload app configuration I need to kill -HUP the parent processes' PIDs. To find PIDs I currently use ps auxf | grep gunicorn with the following example output: $ ps auxf | grep ...
0
votes
2answers
5k views

How can you see clearly process data from ps -u $user?

The question is based on this thread. Problem: to find an installation within the process data I would like to know how you can see from the following data that I have the updates of MacPorts' ports ...
0
votes
1answer
139 views

How to combine lsof stat and ps to get more info in one line bash command

I can use lsof to get top open files stat for processes, as below: $ lsof -n|awk '{print $2}'|sort|uniq -c|sort -nr | head -n 5 17955 11945 10282 2786 5980 32152 1920 27803 1786 32107 ...
0
votes
2answers
163 views

ps aux shows only processes of the current user

On one of my servers running Debian 7.8, when I run ps aux, I only see processes belonging to the current user. If I check the permissions with sudo ls -al /proc/, procesess run by root have theses ...
0
votes
2answers
123 views

Print last column containing spaces and special characters

I need a full path/command thats been execued to start a process thats exposed on the network - listens on tcp/udp . I did manage to get all of that using below "one liner": netstat -nlp46|tail -n +3 ...
0
votes
1answer
213 views

how to view all process details from ps –ef command

hi all I am using the ack.pl in my bash script to search IP's in the Linux OS only for example , and only to show the problem I will give here short example # ( ./ack.pl -Q -a -l --max-count=1 -...
0
votes
1answer
344 views

Script that checks and runs a jar, sometimes runs it twice.

I jave written a small bash script to run every 10 minutes, check if a certain program is running and if not run it. However, I noticed that sometimes I have two instances of the same program running (...
0
votes
1answer
165 views

Identifying particular node processes in htop

I have a app that starts a number of nodeJs processes. The processes are not all running the same JS code, there are about three types of 'roles' for the processes. Currently if I run something like ...
0
votes
1answer
58 views

Monitoring Port Requests for Command

I have a command which I am running that starts a process listening on a port. I am currently getting the following error. socket exception: Address already in use The problem is, I don't know what ...
0
votes
1answer
175 views

Finding out total PHP usage in MB's

I'm trying to find out total memory used by all PHP processes on my CentOS server. After some grepping and awking this is my final command. ps -e | grep php | awk '{print $1}' | xargs pmap | grep ...
0
votes
1answer
191 views

ps throws error /proc/PID: No such file or directory

Can you please tell me why "ps auxw" returned me the following error ? /proc/15067: No such file or directory The following is the process which was running at that time and was listed by PS. ftpib ...
0
votes
2answers
63 views

Access /proc/$pid/exe as regular user

I am in the process of developing a custom Nagios plugin to monitor the absolute path of a few running processes. As a root user I have always used the command 'ls -l /proc/$pid/exe to find the path ...
0
votes
1answer
55 views

is there a way to pretty print the output of “ps” to include the “rss” memory value?

I have a python script which takes in processes in csv format and decides things based on what's running, it's name, and how much cpu time it's using. I would like to add processes that also use lots ...
0
votes
1answer
103 views

How can I log a linux command's process tree?

I'm trying to track the usage of a certain command so I want to log its parents (to see what is actually using it) Solaris has "ptree" which would be pretty easy to parse and log: # ptree 4198 4198 ...
0
votes
0answers
101 views

Nginx - change status code based on grep of process list or similar

We are using nginx as a reverse proxy in our cloud infrastructure, and it's pretty handy. I'd like to use it for something else though. On some of our VMs, there is a process that I need to be able ...
0
votes
0answers
292 views

Invalid format output from ps etime

We have some scripts that run to detect long running processes. It works using ps and etime e.g ps -eo uid,pid,etime This part works fine except that occasionally we get an etime back with an ...
0
votes
0answers
248 views

different result of counting the number of processes with ps command

Script A : #!/bin/bash cmdname=$1 process_num=$(ps -e | grep $cmdname | wc -l) timestamp=$(date +%s) echo -e "$timestamp\t process_num=$process_num" Script B: #!/bin/bash cmdname=$1 process_num=$(...
0
votes
1answer
761 views

load-causing processes disappearing from “top” ps -o pcpu shows bogus numbers

I administer a large number of servers, and I have this problem only with Ubuntu 10.04 LTS: I run a server under normal load (say load average 3.0 on an 8-core server). The "top" command shows ...
0
votes
1answer
413 views

Enable foreign users processes listing

how can I enable under Debian 6 to list the processes of a foreign user? I have the user nagios but this user can only list his own processes. Br
0
votes
1answer
209 views

ps segfaults on CentOS

I have a CentOS- 5.5 server with python2.6 installed from epel repo(disabled by default). It keeps segfaulting. I also have maatkit from epel repo installed. In addition, am running percona as a ...
0
votes
1answer
163 views

After updating debian lenny, ps stops recognising my users

Since upgrading my debian lenny box with apt-get, ps seems to be behaving strangely, and also if i run top i see under the user column the ids, not the names. whoami => foo ps -U foo => ERROR: ...
-1
votes
3answers
126 views

How to solve memory issues in Linux

How to get details of a process that is taking RAM. From top command i have found that Mysql is taking too much ram how can i know why Mysql is taking too much ram far from usual behavior? Is there ...
-2
votes
1answer
34 views

How to cut the result of ps command

Could you please explain this command? and what does 48 means ? ps -laef | cut -c 48- | sort | uniq -c | sort -n Thanks in advance
-3
votes
3answers
765 views

How to terminate a process(httpd) when its PID keeps on changing in CENTOS 7

When I tried to restart my httpd service using systemctl restart httpd Checking the status, I found that process is dead and another process is running. so I removed it using yum erase httpd As a ...