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
1answer
49 views

99 % CPU taken up by “ps”

I have an EC2 t2.micro (Linux AMI) instance. Since a few days I noticed that RAM is being 99% used by "ps" . When that happens : $ free -m total used free ...
0
votes
0answers
15 views

How to sort command name + arguments output of ps in solaris

Below is my sample output of ps command in solaris myuser 26856 0.0 0.1 1716368 118576 ? S Feb 18 2:17 /web/bea/platform1221/jdk1.8.0_221/bin/java -Djava.security.manager -Djava.security....
0
votes
1answer
18 views

Sort ps output by the command in Solaris

The purpose of this exercise is to dump the output of ps sorted by command. While the system is running we wish to dump all the running process sorted by command in a file. There is a sort option in ...
0
votes
1answer
31 views

Why is my host displaying 2 cron processes?

I notice that I am getting 2 different cron processes in ps: [user@host ~]$ ps aux | grep -i cron 500 746 0.0 0.0 6384 676 pts/1 S+ 13:40 0:00 grep -i cron root 905 0.0 0.0 ...
0
votes
1answer
23 views

How to view process info for “host” and similar commands

I know how to view the current processes on my Ubuntu machine. For example, I can leave a ping running: ping localhost Then do: $ ps -ef | grep ping Which shows: user1 2875 1231 0 Feb08 ? ...
0
votes
2answers
33 views

What is the best and the efficient way of tracking whether Apache web server is up and running?

When I wanted to check whether the Apache web server is up and running on the linux server(CentOS), I came to two solutions by tracking through the ps command and ss command. Following I've tried: ps -...
0
votes
0answers
25 views

How to limit total amount of memory processes in for-loop use

I have a directory, and want to operate ffmpeg on each of the files. My command is something like this: $ find *|while read file; > do > ffmpeg -nostdin -i "$file" -vf "scale=iw/2:...
1
vote
1answer
11 views

BusyBox ps etime format is not as documented: 9h25

I've been using ps -o etime,cputime in a script to monitor spikes in CPU usage but when the server has been running for a while, the time is no shown in the widely documented format [DD-]hh:mm:ss, but ...
0
votes
0answers
64 views

mkfs complain about disk is apparently in use by the system

on our rhel server we want to re-create ext4 filesystem as [root@worker ~]# mkfs.ext4 -j -m 0 /dev/sdd -F mke2fs 1.42.9 (28-Dec-2013) /dev/sdd is apparently in use by the system; will not make a ...
2
votes
0answers
49 views

Why is pgrep/pkill so much slower than ps?

I would have thought that pgrep would be much faster than ps -ef yet the contrary is true - pgrep takes about 4x longer. But only on my laptop e.g.: $ time { ps -ef |grep foobar; } real 0m0.027s ...
2
votes
1answer
20 views

Linux: ps -o fuid,fuser,fgid,fgroup # what are these process filesystem access IDs used for?

From the ps command's man page, what are these four "filesystem access" output-fields, specified using an -o option, used for, i.e. what does a process use them for? fuid / fuser fgid / ...
1
vote
1answer
20 views

Is RAM usage of IPC a part of the RAM usage of a program

I'm learning how to use Message Queue in Linux and I've found a simple example: https://www.geeksforgeeks.org/ipc-using-message-queues/. With the reader and writer in this link, I can read and write ...
1
vote
1answer
40 views

Oldest process of users in who [closed]

How to show the oldest process of each user listed in the command who? I've tried using the command ps -u $user --sort +start_time but couldn't find a way to filter the users and extract the PID from ...
0
votes
3answers
74 views

Command “ps -e” in shell

I'm starting to learn shell, and I have a question about the command ps -e does this command show all the processes that exist that are running and not running on the machine, or only those who are ...
0
votes
0answers
98 views

hidden(?) process is taking 20GB of RAM Ubuntu

I have a PC with 64 GB of RAM in my work. I am noticing that there is something that is taking a lot of my memory, sometimes 20 GB or even more than 40 GB. I could not find which process is ...
0
votes
1answer
24 views

Getting a parent script name from a child script

CentOS/RHEL 7. GNU bash, version 4.2.46(2)-release I have two bash scripts, lets call them parent.sh and child.sh. The parent just calls the child thus: # parent.sh ./child.sh and in child.sh I want ...
0
votes
0answers
22 views

To read kernel space process

Can I use the following command to read all (including user space and kernel space) processes ps aux And use the following command to read all (including both user space and kernel space) processes ...
1
vote
3answers
145 views

If I run tmux and then `kill` the tmux process, I see two bash processes. How does this second bash relate to the first and how do I kill it?

As stated in the question, I'm trying to better understand sessions, processes, process groups, etc. A few questions that I came across while playing around with tmux. If I open tmux and run ps, I ...
0
votes
1answer
41 views

A ps command with the relevant options that shows the state / status of only ONE process

I start 2 processes in the background: xeyes and xclock -update 1. When I run this commane: ps T o pid,tty,time,args,state (this for to output state) it lists: PID TT TIME COMMAND ...
1
vote
2answers
62 views

Get working directory inside SSH client process from outside process

I have SSH'd into a remote machine. I would like to get the current working directory (and ideally execute commands like ls) on that remote machine, but from outside this process. Here are my ...
0
votes
1answer
49 views

Execute command as if in another open terminal window [closed]

Let's say I have three Terminal windows open: ttys001: the current terminal I am in. Current directory is ~ ttys002: current directory is ~/Desktop ttys003: a terminal where I've SSH'd into a remote ...
0
votes
1answer
79 views

How to get just the first match from grep?

I am writing a script, and I am using this as a variable. RESULT1=`ps -ef | grep -w "PHANTOM PHA-WRM-EXPIRE"`. What happens is that ps is listing two PIDs. [xhobando@noitu TNOITU]$ ps -ef | ...
0
votes
0answers
93 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
61 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
65 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
426 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
69 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
28 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
32 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
40 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
75 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
33 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
93 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
98 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
48 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
54 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
106 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
35 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
122 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
66 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
179 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
104 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
73 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
216 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
276 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
38 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
722 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
43 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
2 3 4 5
11