Questions tagged [ps]

For questions pertaining to ps, a command for printing information about running processes. Use this tag for questions about ps itself or questions about issues arising from using the ps command-line utility.

Filter by
Sorted by
Tagged with
0
votes
0answers
30 views

Understanding background processes and terminal process group id

I am reading the bash reference manual about Job control found here (emphasis mine): To facilitate the implementation of the user interface to job control, the operating system maintains the notion ...
0
votes
2answers
34 views

Unable to construct command from the output of ps

I wish to get the httpd process and then get the bin\apachectl command/file -v output Output: ps -eo cmd | grep httpd | grep -v grep /home/myapache/app/httpd/bin/httpd -k start /home/myapache/app/...
0
votes
1answer
46 views

Bash Command to Parse `ps -ef` for XRDP Geometry/Resolutions

The following bash command (run on Ubuntu 18.04) displays the required XRDP information in a table, except for the resolution (geometry) of each XRDP session { echo "user pid Xdisplay port"; ...
3
votes
2answers
134 views

Why doesn't “pgrep firefox” work on Ubuntu 20.04

As the title suggests, the following command on Ubuntu 20.04: pgrep firefox ... returns no results. Meanwhile, the following command: ps aux |grep firefox ... returns 6 results, 5 of which should ...
0
votes
1answer
51 views

how to check memory usage, in detail

There are commands such as top, ps, pmap (and others) that show how much memory is used by a process, but they only show the total memory. Using the free -g command output we see total, used, shared, ...
0
votes
1answer
21 views

Can 'ps' combine processes?

I created a command to show me what processes eat RAM alias psmem='ps -eo user,pid,pcpu,pmem,args --sort -pmem --columns $(tput cols) | head -25' However, the output typically looks like this: USER ...
2
votes
0answers
25 views

How to default `ps aux` to `ww`?

When you use a default Terminal + Bash from Ubuntu 20.02.1 LTS with Gnome 3.36.3, ps aux seems to automatically include the unlimited width. But when I use powershell or xterm, the ps aux is truncated ...
1
vote
0answers
23 views

apache2 crashes suddenly and leaves zombie processes

I am experiencing recurring problem with my apache server, where after few hours/days of light usage, the apache process suddenly crashes and leaves zombie processes. In ps, I then see this: root ...
0
votes
3answers
48 views

ps does not support the -x flag on a particular version of linux

My ps command works except on a particular version on Linux as you can see below. [root@failinghost ~]# ps -xef | grep -v grep | grep websphere Warning: bad syntax, perhaps a bogus '-'? See /usr/share/...
0
votes
1answer
29 views

Why is a process being shown while using “jobs” command after killing the process manually?

Why is the parole(just a media palyer) still listed in the "JOBS" command output even after killing maually and why is not listed in the "PS" command output ? Does this mean the ...
1
vote
2answers
40 views

ps -C behavior changed between Centos 6 and Centos 8

Our system often uses ps -C cmdName to check if a process is running and, if not, restart it. In moving from Centos 6 to Centos 8 it seems the behavior of ps -C has changed which broke much of our ...
0
votes
0answers
24 views

Display process tree for a set of processes with the ps command?

The ps command ps axjf shows the process tree of all processes. Is there a way to to restrict this output to a specified list of processes based on PID choose what fields are printed in the output ...
0
votes
1answer
46 views

How to get this list? Don't miss any [PID] (running & ended)

How to get this list (table)? From turn on the computer until now. Don't miss any [PID] (still running [PID], already ended [PID]). List field: PPID, PID, Threads, USER, Start-time, Change-time, End-...
0
votes
0answers
18 views

PID changing when using ps --no-header command [duplicate]

When I user the tag --no-header or the = at the end of the column name the last PID always changes adding 1 to it. Why does it change? Is there a way to fix it?
1
vote
1answer
17 views

How can I perform a partial matching of the command name using `ps -C`?

I find the ps -C <cmd> option very useful, since it lets me limit the output of ps to only those processes started with command name <cmd>. Compared to performing a grep, I also get the ...
2
votes
1answer
56 views

ps - filter by user and processes without terminals

I've been scrounging around the man page trying to understand ps better. Is there a combination of flags that causes ps to return all of the processes for my user that aren't attached to a terminal? ...
0
votes
0answers
19 views

How can I check the status of a pytest process?

I was thinking of putting this question in StackOverflow since it deals with Pytest, but it is actually more of a linux question so I put it here. I am running pytest tests on linux (ubuntu),with ...
3
votes
1answer
53 views

Is there a way to bypass the pipe in a shell script or function?

I would like to write a small wrapper around ps so that no matter what the options are or if I grep the result, I could have the first line of the output of ps which tells me what the columns are. ...
2
votes
1answer
49 views

Is it possible to append `-o` options to `ps -Af` to display e.g. UID/GID as part of the output?

I find ps -f very useful, since it provides a robust default set of output columns. However, I also often want to display the UID/GID etc as part of the output. Is it possible to append output columns ...
-1
votes
2answers
60 views

What is meaning of “hrtimer” in the output of `ps -elf`?

As the subject, here is the related output: F S UID PID PPID C PRI NI ADDR SZ WCHAN STIME TTY TIME CMD 0 S john 124024 118530 0 80 0 - 4930 hrtime 05:09 pts/9 00:00:...
0
votes
0answers
51 views

Storing PIDs From the Result of PS command into an array

I want to write the PIDs of some of the running processes into an array for further use. Function() { declare -a arr ps -e -o pid,%mem,command | awk -v val="$1" '{if($3 == val) print $...
1
vote
1answer
28 views

Inline tool for Linux process time series for CPU and memory

I have a Ubuntu server. There are some jobs running. I have to monitor their CPU, memory usage over complete time of their execution (time series). I know there are a lot of CLI tools like top, htop ...
0
votes
0answers
24 views

ps + how to know the path of the cli from the ps output

from ps -ef , I can see the following process hdfs 2419 24531 19 11:45 ? 00:01:13 du -sk /data/sdb/hadoop/hdfs/data/current/BP-140168-17.19.71.15-15847200 this is means that someone ...
1
vote
0answers
87 views

ps command output, WCHAN column '-' for all processes

ps axo ppid,pid,stat,wchan,cmd outputs - for the WCHAN column for all processes, including the ones in sleep, on Debian bullseye, did I do something wrong? BTW, wchan shows 'the kernel function in ...
0
votes
2answers
52 views

Format ps STIME on Linux

I recently moved to Linux from HP-UX and I noticed that STIME of a process is in "MonthDate" format(e.g. Apr21) while on HP-UX it was "Month Date"(e.g. Apr 21). There is no space between month and ...
0
votes
1answer
24 views

`ps -o pcpu` shows very obsolete CPU usage

ps -o pcpu must show really obsolete CPU usage: user@comp:~/acr/bin$ ps -o pid,pcpu,comm k-pcpu -u `whoami` | head PID %CPU COMMAND 3709 34.7 R 15292 34.4 R 3603 33.8 R 3593 33.1 R 3864 33.1 R ...
-2
votes
1answer
190 views

What are the differences between pgrep and `ps aux | grep`?

Why is pgrep needed? If we can use ps and grep together, why do we need pgrep? It'd be weird if we have a command lsgrep or curlgrep. But one difference I noticed was, if we first start a tmux ...
0
votes
0answers
25 views

Difference between ps -eH and ps -e --forest regarding indentation for parent/child processes?

Just looking for some confirmation. When running ps -eH, systemd shows indented child processes underneath it. Yet when running ps -e --forest, there is no indentation and no branches even for ...
-1
votes
2answers
60 views

why ps not see sleep process?

I creart the first terminal , then I use "sleep 1000 &" and I found it by "ps". The problem is when I creat the second terminal and put "ps" ,there is no sleep process. I want to know why ? (my ...
1
vote
1answer
73 views

Why is memory (rss) from ps command different than memory seen in top command?

When checking the memory usage of a process I see that ps command shows a RSS value which is different than memory shown in top: $> ps e -o command,vsize,rss,%mem|grep "myapplication"|head -n 1 ...
-2
votes
1answer
46 views

How to filter by column

Surprisingly hard to find a good example of this one. Say I have this command: ps -aeF the 7th column is the processor # (?). I just want to filter by processses running on the 2nd core. How can I ...
0
votes
0answers
28 views

Getting more info about Linux process

I've realized that I have dozens of processes running on my machine which I didn't expect to have. I've been using podman for Docker so a lot of these tasks are for podman; however, I'm having trouble ...
0
votes
1answer
23 views

“ps -fC tmux” command does not show tmux process

I am running a tmux server. When I checked the process, I can see the tmux process: # ps -ef | grep tmux | grep -v grep root 4129 1424 0 17:47 pts/0 00:00:00 tmux root 4131 ...
0
votes
0answers
22 views

OOM - How to get full details of killed processes?

Assume there are 40-50 large memory-hogging processes running on one server. Is there a way to setup the environment, or create a script, which will capture the full command line (as shown in ps -ef)...
1
vote
0answers
102 views

unable to kill process in AIX 6.1

Below is the script I have that generates 180320.tar file cat Bckup.sh tar -X ./exclude.txt -cf /backup/180320.tar ./1043 gzip /backup/180320.tar While this script was running, I force deleted the ...
0
votes
0answers
20 views

Can't see process opened in previous ssh session

I have a server, and control it via ssh. I am using Windows PowerShell. So I first connect to the server and run my python script in background with python3 -m PKG & If I use jobs or ps, I can ...
0
votes
0answers
74 views

Why does (nohup'ed) script need to sleep in order for `ps -ef` to work?

In a script that contains the following lines and is called by ansible (via ssh and then sudo), about 4 out of 5 times, I end up in the if branch, although the process I'm trying to ps and grep is ...
2
votes
1answer
53 views

process list with quoted arguments, portably

How can an original command issued at the command line be acquired without using proc or any other non standard tool? When printing a process list using ps, the arguments passed in to initiate the ...
0
votes
1answer
84 views

How Do I Select awk Columns Using Regex?

I have lots of java processes running on a server and since this is a dev server I have more than one env running. If I want to list the processes for a particular environment I do this to give a ...
0
votes
1answer
71 views

Why does `ps -Af` display usernames in the “UID” column, while `ps -Ao uid` displays the numerical user IDs in that column?

While I find the -f option to ps really useful, I miss the numerical UIDs in the output. Using ps -Ao uid it's possible to display the numerical UIDs: nlykkei@debian:/proc/1839/net$ ps -Af | head -...
0
votes
1answer
51 views

Get output of parts of PS in one single CSV line

I need to collect the CPU consumption of some processes that match a string but i need it on a single line separated by comman and was wondering if anyone knows if this is possible to do in one single ...
0
votes
1answer
81 views

How to kill a subprocess shortly after called from parent programmatically?

How can I terminate a process that is launched from within an application programmatically? To clarify, there is an application that launches a WebKit subprocess from time to time, and I want to kill ...
0
votes
1answer
127 views

Utility to Visualize CPU and Memory Usage based on process tree

Modern desktop applications spawn several child processes to offload tasks to them. Notable examples in this regard are: Google chrome - spawns a new process per tab VSCode - spawns a bunch of ...
0
votes
2answers
129 views

“Xorg” process does not take limits from /etc/security/limits.conf

I have this in my /etc/security/limits.conf: #<domain> <type> <item> <value> root - memlock 65536 root - stack 524288 root ...
-1
votes
1answer
103 views

Ps aux u shows little CPU usage, but sys_getloadavg() has 3.34

Some time ago our site had been hacked, and we were able to recover successfully, however there still seems to be something weird that we havent got rid off yet. Once per hour, there is a job starting ...
4
votes
1answer
148 views

How to monitor the performance of “iptables” kernel module?

I would like to know how much CPU / memory my current iptables rules consume. I have tried looking in ps and htop, but even with kernel threads displayed and did not see anything related to iptables. ...
0
votes
0answers
69 views

plist-sz value not matching with actual process running

My plist-sz (sar -q) value is around 28000 but when I check ps -ef |wc -l it shows only around 300. What could cause high value of plist-sz?
1
vote
1answer
81 views

Getting different value for ps command when assigning to a variable

I get a different output when I assign this to a variable. Why is this? #!/bin/bash P=$(ps -ef | grep ${APP} | grep -v grep | wc -l) echo ps -ef | grep ${APP} | grep -v grep | wc -l echo $P Output:...
0
votes
1answer
28 views

Get data about system load in an easy-to-process format

Often I feel the need to run some computation on the data about my system load. For instance about the data that top shows. And possibly iotop and htop as well. Some of the things I'd like to do are ...
0
votes
1answer
52 views

Apache uses 9GB of RAM but htop only shows 2.7GB of used RAM. Why?

My website is very slow at some times of the day, and I'm on the quest of finding out why. I'm currently looking into Apache memory usage and I have 2 tools that are supposed to tell me how much RAM ...

1
2 3 4 5
11