Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. Listen now

Questions tagged [ps]

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

Filter by
Sorted by
Tagged with
0
votes
1answer
65 views

linux - ps have different column with process ID

I have simple Docker's command to kill database process: docker exec app-pgsql bash -c 'ps axuf |grep ils |cut -d" " -f3 |xargs kill -9 || :' and as you can see, I'm looking for 3rd column from ps ...
0
votes
1answer
194 views

ps + kworker with state D

we have redhat machines in cluster redhat version is - 7.2 when we perform ps ax on the machine we saw many kworker with state D example 17165 ? D 0:00 [kworker/u66:1] 2151 ? D 0:58 [...
2
votes
1answer
411 views

Enter-PSSession : Connecting to remote server failed

I have three VMs: A, B and C. I use Enter-PSSession to connect them. But recently connecting B from A (A->B) never succeeds. Others ways (A->C, C->A, B->A, B->C, C->B) have no problem. The error ...
0
votes
1answer
56 views

invisible php process on linux

I have a php script running in an endless loop on my Linux server. I know it's running because it's the only script that does X, and X is definitely happening. However, it's not listed in crontab, and ...
0
votes
1answer
96 views

How to tell threads from processes in top and ps on Linux?

I find it quite confusing to differentiate threads and processes when I run top and then press H or run ps -Hef. I know that they share the same attributes, which makes them similar but was wondering ...
0
votes
1answer
45 views

Unable to fork children even after exiting previous ones

I have a CentOS VM on which I'm running a php socket server, that forks on every connection. The child process does its job and then exits. The parent is also waiting to reap the dead zombie process (...
1
vote
1answer
118 views

Why does my “ps aux” command column now show gibberish?

While using ps aux to find the PID of a process, I came across some output that prevented me from doing so. I've done this before, on this same server, within the last month. Today's output looked ...
1
vote
1answer
48 views

Ubuntu ps command showing wrong values in START column

I have just noticed that my server has wrong value in START column of ps 's output. It always display 2017 value, while it should show hour:minute format. The problem is not fixed after I reboot the ...
0
votes
1answer
33 views

Script to list httpd instances

I have a RHEL7 server (no GUI) running several distinct instances of httpd (distinct PID files, not defined as services...don't ask). Trying to build a simple script that will tell me which of my ...
0
votes
1answer
27 views

Process start time and running time do not match

We have a situation where times present by START TIME and TIME presented by "ps" are not matching. When I say matching I mean - TIME shows that a service is running longer than it actually is. ...
0
votes
2answers
100 views

User shown in ps does not exist

This is strange: » ps -ef | grep gitlab gitlab-+ 19663 4237 0 06:45 ? 00:00:00 postgres: gitlab gitlabhq_production [local] idle But the gitlab-+ user does not exist: » cat /etc/passwd | ...
1
vote
1answer
366 views

ps sniffing on mysql password

I am passing the password to a mysql connection via a script using : mysql -u root -p'mypass' so I can execute task on that line using --execute. I have seen in many stackexchange forums that ...
0
votes
0answers
62 views

Is there any way to sort processess by UNshared (private) memory use in ps or top?

I've been able to calculate unshared memory use by summing anonymous and stack mappings from pmap -x e.g. sudo pmap -x $THE_PID |egrep 'anon|stack' | awk '{print $2}' | paste -sd+ | bc but can't ...
2
votes
1answer
81 views

AWS / EC2 / Ubuntu 16.04: apache2 processes although apache is not installed?

I created an AWS Ubuntu 16.04 EC2 instance a while ago and had it running for some time not really doing anything. Now as I try to bring that machine bring to service, I notice a few things I can not ...
0
votes
1answer
662 views

How to hide a password from ps, if it's given to a process via script or command line

So I have a certain program, which is running almost 24/7. I have a start script I've written in bash which simply does: ./app --user XXX --pass YYY There are a few more options, but they are ...
-1
votes
1answer
717 views

How to get ps output with headers [duplicate]

The question is basic, How to get output of ps with headers in Linux. Linux details: PRETTY_NAME="Debian GNU/Linux 7 (wheezy)" NAME="Debian GNU/Linux" VERSION_ID="7" VERSION="7 (wheezy)" I can get ...
2
votes
1answer
250 views

Process claims to use a lot of memory, but 'free' indicates that the memory is still free

I've seen the opposite of this, but this is puzzling. In short, I have a process where %MEM claims to use 74% of memory when using 'ps' and 'top'. However, 'free' shows that I'm only using 32% of the ...
2
votes
1answer
63 views

how to find Linux processes started at a certain time

I am trying to debug Linux vnc session that is not responding. I think I clicked the KDE konsole icon and that is when the vnc session became frozen. I can see the windows and menu in KDE but nothing ...
0
votes
2answers
136 views

Discrepancy between “ps aux” and the 1-minute average server load

I am a Linux rookie, so I'm trying to figure out a discrepancy. The problem is that the 1-minute average load available in /proc/loadavg doesn't make sense when compared to the output of the "ps aux" ...
0
votes
1answer
263 views

More elegant ps aux | grep [g]rep do not work

I am running the command: ps -ef | grep [p]ts/1 The result is: root 13820 1733 0 14:19 ? 00:00:00 sshd: root@pts/1 root 13822 13820 0 14:19 pts/1 00:00:00 -bash root 15847 ...
0
votes
1answer
700 views

Apache2 seems busy

I have an Ubuntu 14.04.4 LTS server running Apache/2.4.7 and my error.log file is frequently getting this kind of message below: [Thu Sep 01 19:45:40.571637 2016] [mpm_prefork:info] [pid 1696] ...
0
votes
1answer
1k views

How do I list the user that started a service in freebsd

Just a simple question, but I've looked everywhere and can't seem to find this. I just need to know what user started a particular service. In this case, I want to know what user runs the headphones ...
1
vote
2answers
623 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 ...
1
vote
1answer
186 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. ...
0
votes
1answer
712 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 ...
-1
votes
1answer
1k 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 ...
2
votes
2answers
17k 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 ...
1
vote
1answer
1k views

extra sshd root instance

I have logged in to my server running Centos 7 via ssh and executed the following command: [me@server ~]$ ps -ef --forest | grep ssh root 476 1 0 Dec02 ? 00:00:00 /usr/sbin/sshd -D ...
0
votes
2answers
71 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 ...
-2
votes
1answer
507 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
1
vote
1answer
977 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:...
0
votes
1answer
1k 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
2answers
2k 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 ...
1
vote
2answers
5k 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 ...
2
votes
2answers
2k views

Wchan section in ps output not showing anything

I know that if a process go into D state then it means that it is in uninterruptable state. The process can not be killed by any signal. It will only come out of that state on reboot or if I/O wait is ...
-3
votes
3answers
10k 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 ...
2
votes
1answer
1k views

ps is giving a segmentation fault

I'm getting a segmentation fault when I try to run a simple "ps aux" for a certain user. If I run as root or another user it runs well. So I think is something related with ulimits, but I think that ...
0
votes
2answers
477 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 ...
4
votes
1answer
7k views

ps show column name

Using these ps options I cut 10 lines and order output of ps by cpu usage (pcpu): ps -eo pcpu,etime,pid,user,args --no-headers| sort -t. -nk1,2 -k4,4 -r |head -n 10 I need also show the name of ...
1
vote
0answers
109 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 of ...
1
vote
5answers
3k 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
2answers
3k views

How to get the path details from the proccess ID?

In order to see the path of the running process 25014 I do on Linux the following: ls -l /proc/25014/exe Output: lrwxrwxrwx 1 root root 0 Mar 9 16:35 /proc/25014/exe -> /etc/syscconfig In ...
0
votes
1answer
2k 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 -...
1
vote
3answers
4k 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 ...
2
votes
1answer
539 views

Linux: ps command's output is randomly different than expected, can you find the reason?

I wrote a Nagios check which counts how many pgpool processes are running and how long each process runs. I'm running on Linux CentOS 6.4 In order to get the time the process is running, I'm using ...
2
votes
1answer
52 views

How to spec VM requirements based on historical data of transient processes on Linux?

I've been given a task to break apart the services on one of our main VMs (Amazon EC2) and appropriate additional VMs to suit the services needs. The type of services that I am dealing with are ...
0
votes
1answer
1k 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
0answers
176 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
1answer
1k 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
0answers
477 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 ...