Questions tagged [ps]

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

127 questions
1
vote
5 answers

What does "-k start" mean in the output of ps command

I try to run an apache instance. It doesn't run properly. I am trying to get some diagnostic information. I gave ps command and the apache instance that don't run properly are output with -k start. What does "-k start" mean? Here is a piece of the…
Mert Nuhoglu
  • 207
  • 1
  • 3
  • 9
1
vote
1 answer

The ssh-agent process is not visible to the user who created it but is visible to root

I have adopted the following snippet from Visual Studio Code's documentaion to create an ssh-agent on login: if [ -z "$SSH_AUTH_SOCK" ]; then # Check for a currently running instance of the agent RUNNING_AGENT="`ps -ax | grep 'ssh-agent -s' |…
Matt
  • 111
  • 4
1
vote
2 answers

Why does `ps -x | grep foo` include the grep command?

I know that it does (often) include the grep process and I know adding | grep -v grep or grepping on [f]oo instead will prevent it, but my question is more about order of operations I guess. For example, in this contrived example, I see several…
jhericks
  • 113
  • 5
1
vote
0 answers

Outdated processes in ps aux

Some servers in the cluster have a lot of irrelevant processes in the process list. There are hundreds of them and some of them are about 2 years old. root 9903 0.0 0.0 10752 180 ? Ss 2019 0:00 bash -c /usr/local/bin/accel-cmd…
Mystic
  • 23
  • 5
0
votes
1 answer

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 to get process ID but sometimes this column is…
Damian
  • 133
  • 2
  • 6
0
votes
1 answer

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 [kworker/u33:0] 3866 ? D 0:26 [kworker/u65:0] 14967 …
shalom
  • 461
  • 13
  • 29
0
votes
1 answer

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 I can't find it using ps aux. The only thing I…
Ingrid
  • 1
  • 1
0
votes
2 answers

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 whether there is anything in the output that can…
user
  • 13
  • 4
0
votes
1 answer

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 (I have checked the ps auxf…
Dushyant Bangal
  • 123
  • 1
  • 1
  • 9
0
votes
1 answer

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 httpd instances are actually started. If I run ps -ef…
Felix
  • 51
  • 1
  • 1
  • 5
0
votes
1 answer

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. Example: someuser 29953 7.9 30.2 4928524 1171844 ? …
py9
  • 101
  • 1
0
votes
2 answers

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 | grep…
blueFast
  • 4,200
  • 13
  • 37
  • 54
0
votes
0 answers

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 find any way to get similar info from ps at all. top…
Craig Ringer
  • 11,083
  • 9
  • 40
  • 61
0
votes
1 answer

How to get ps output with headers

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 it with ps -ef | { head -1; grep query; }, but…
Saurabh
  • 123
  • 1
  • 8
0
votes
2 answers

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" command. For example, sometimes the 1-minute…
Jeff
  • 27
  • 6
1 2 3
8 9