2022 Developer Survey is open! Take survey.

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
5 votes
0 answers
70 views

Why does ps not exit when listing full command line arguments?

Any time I attempt to run the ps command or another similar command in a way that would make it output the arguments for any process, the command runs and produces output, but then freezes, entering ...
user avatar
0 votes
2 answers
53 views

How do I list all background processes?

Is it possible to list all running background processes with the ps command, or is the only option for getting a list of background processes the jobs command?
user avatar
  • 115
0 votes
0 answers
24 views

ps command: Practical difference between the -p and -q options [duplicate]

According with man ps exists: -p pidlist Select by PID. This selects the processes whose process ID numbers appear in pidlist. Identical to p and --pid. -q pidlist Select by PID ...
user avatar
1 vote
1 answer
28 views

ps command: strange behavior with 'O' option, extra column/header does not appear as expected

About the ps command - to add one/many extra column/header with the default headers according with the option(s) used with the ps command - it through O the option. Intro If ps x is executed the ...
user avatar
3 votes
1 answer
55 views

ps command: how to know all the headers with their respective descriptions?

Through the following valuable tutorial: Ps Command in Linux (List Processes) If the ps -ef command is executed then the output has the following header: UID PID PPID C STIME TTY ...
user avatar
0 votes
0 answers
28 views

What does '-x' mean in the context of the 'ps' command?

If is executed ps x (observe there is no -) then the output is as follows: PID TTY STAT TIME COMMAND 2489 ? Ss 0:00 /lib/systemd/systemd --user 2490 ? S 0:00 (sd-pam) ...
user avatar
0 votes
0 answers
27 views

ps command: what does "/bin/login -p --" exactly mean? What is its purpose to be shown?

Through Virtual Box for Ubuntu Server, having: the 6 tty being logged with 3 different users (2 users in 2 tty, for example user1 logged at tty1 and tty3, user2 logged at tty2 and tty4 and so on) 3 ...
user avatar
0 votes
1 answer
28 views

ps command: How generate the report of processes but according with only either tty or pts?

Through the ps --help all command about the option(s) related with tty exists the following: -a all with tty, except session leaders a all with tty, including ...
user avatar
4 votes
2 answers
114 views

What does '-P' mean in the context of the 'ps' command?

If is executed ps -p 3384 3395 (observe -p is lowercase) then the output is as follows: PID TTY STAT TIME COMMAND 3384 tty6 S+ 0:00 man ls 3395 tty6 S+ 0:00 pager Until ...
user avatar
1 vote
1 answer
41 views

How to display process title by ps?

As per setproctitle(3), the process title appears on the ps command. But after looking up the ps(1), I still have no idea how to display it by ps.
user avatar
0 votes
2 answers
25 views

ps aux --headers problem on openSUSE Leap 15.3 when redirect output

The following works ok on openSUSE Leap 15.3. As in the header line is repeated for each screen of output when I scroll the screen back with the scroll bar on the terminal: ps aux --headers But when ...
user avatar
0 votes
1 answer
20 views

full command is missing in ps aux output ubuntu 20

Version: No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 20.04.4 LTS Release: 20.04 Codename: focal When i check my process' with htop or ps aux i cant see ...
user avatar
-2 votes
2 answers
35 views

how to kill huge process by killing the daemon itself

on our rhel machine we saw huge lines as ( total lines numbers are 856 ) that cause very high cpu load average root 110490 108840 0 07:32 ? 00:00:00 /usr/bin/python /var/tmp/get_params/...
user avatar
  • 10.9k
0 votes
1 answer
73 views

`exec env` vs `env`

Both exec and env don't fork, see the following example: docker run --rm -it ubuntu:18.04 sh -c 'exec sleep 1 & ps -Ho pid,ppid,cmd' PID PPID CMD 1 0 sh -c exec sleep 1 & ps -Ho ...
user avatar
  • 1,039
0 votes
2 answers
61 views

How to pass output of ps x | grep rclone to kill command?

This is the output: $ ps x | grep rclone 7111 ? Sl 0:00 rclone mount xxx 7112 ? Sl 0:00 rclone mount xxx 7113 ? Sl 10:16 rclone mount xxx 9843 pts/1 S+ ...
user avatar
  • 135
0 votes
0 answers
34 views

NFS: how can i make nlockmgr relinquish a port

I was running Nfs-server on a rhel7.8 machine. Now the NFS server has been stopped but a Port 35191 is listening on the server, verified it using netstat and telnet. I tried various ways to find the ...
user avatar
  • 1
0 votes
1 answer
24 views

Summary Report of Running JVMs

Would like to output a summary of the currently running java processes. The fields I am interested in are PID, start time, min heap, max help and name of the app. The PID and start time are always at ...
user avatar
  • 3
0 votes
0 answers
20 views

How can I best track agrs in the environment without using ps?

I am working with a customer BusyBox v1.23.2 container, trying to track args being passed in the environment. I wanted to use pslogger to show when foo is sent in the environment. However, the ps tool ...
user avatar
0 votes
0 answers
17 views

How can a process have this value for a command? [duplicate]

I'm wondering how a process can have this command line ~ % pgrep -ai dhc 1681 dhcpcd: [master] [ip4] [ip6] Same for ps ~ % ps -o command 1681 COMMAND dhcpcd: [master] [ip4] [ip6] This seems to come ...
user avatar
  • 309
0 votes
0 answers
41 views

Process state "S+" [duplicate]

One of the processes state in Ubuntu is interruptible sleep, which is denoted by "S" . I have two questions regarding this state : What is the exact meaning of the word interruptible in ...
user avatar
  • 87
0 votes
0 answers
21 views

is there a cli like : `cpu-cli app.sh`?

is there a cli that get the avg of CPU usage launching like usual cli tool like $ time app.sh without avoiding the forked process $ cpu app.sh avg 22.2% CPU usage max 55.5% CPU usage min 11.1% CPU ...
user avatar
2 votes
1 answer
38 views

two terminals, one not showing processes

While I have two terminals open, when I run [program name] & in one terminal, why is it that when I then run ps on both terminals, only the one I have used to run the program shows the processes?
user avatar
  • 21
2 votes
0 answers
16 views

Meaning of `u k-pcpu` options in ps

In this answer to this question, user @doneal24 suggests using, in part, the following call to ps to print information about the process with ID PID: ps u k-pcpu -p $PID According to ps's man page, ...
user avatar
  • 14.3k
4 votes
1 answer
121 views

Full command line in ps -o call

On Ubuntu 20.04.3, calling ps -e -o args,pid,etime,%cpu,%mem --forest | egrep "firefox|PID" | grep -v grep gives me the following result: COMMAND PID ELAPSED %CPU ...
user avatar
  • 43
2 votes
1 answer
71 views

Why does `ps e` show more processes than `ps`?

From the ps man page: By default, ps selects all processes with the same effective user ID (euid=EUID) as the current user and associated with the same terminal as the invoker. On my Ubuntu system, ...
user avatar
  • 554
1 vote
1 answer
148 views

top shows different pid for threads of same process. How to fix it?

when i do a ps -efT (where -T = Show threads, possibly with SPID column.), i see all the threads have the same PID, which is as expected. myroot 24958 24958 7942 0 20:20 pts/12 00:00:00 java -...
user avatar
  • 554
0 votes
1 answer
17 views

Xen: is possible to see processes of the domU on dom0?

I have installed on a Debian dom0 a paravirtualized domU(Opensuse) When I use lxc I can see the process with the "translated" uid for example, on a Slackware lxc "host" I can see ...
user avatar
  • 11k
0 votes
2 answers
246 views

how to find the number of open files per process

we have kafka service ( as systemctl service ) and we configured in that service number of open files example: [Service] LimitMEMLOCK=infinity LimitNOFILE=1500000 Type=forking User=root Group=kafka ...
user avatar
  • 10.9k
0 votes
1 answer
57 views

How many bytes is a kilobyte in `ps` command?

I use ps command to get information about the memory consumption of a process. According to the man page, the memory size unit is "kilobyte". Is that 1024 bytes or 1000 bytes? Can you ...
user avatar
  • 101
2 votes
3 answers
252 views

How to list all processes by non-root users?

I want to see a list of processes similar to what ps aux outputs but not show any root processes.
user avatar
0 votes
1 answer
116 views

How to reconnect to the same terminal where your ssh connection was lost?

I did a ssh to my server and started the yocto build on that server. Howeve, I lost my connection and now when I reconnect it I don't know how to see how my existing build is going on? I want to see ...
user avatar
0 votes
1 answer
76 views

CPU LOAD AVRG + how to deal process with D state

we can see from our RHEL 7.6 server ( kernel version - 3.10.0-957.el7.x86_64 ) that following process are with D state ( they runs from HDFS user ) Note - D state code means that process is in ...
user avatar
  • 10.9k
0 votes
2 answers
24 views

How do I determine what task is launching another task

I am dealing with some essentially virus-like behavior that I'd like to end. A task 'foo' is running on my computer, generating a lot of calls that are bringing my system performance to its knees. I ...
user avatar
4 votes
1 answer
519 views

What is the difference between "ps -eu" and "ps -u"?

I check the manual of ps, and it said -e will list all processes, while -u will list processes for a specific user. So I try to use ps -eu myaccount | wc -l and it outputs 280. But if I use ps -u ...
user avatar
  • 181
0 votes
1 answer
61 views

Sorting Linux ps command

I am trying to print a process tree of only my login on a Linux server. I have used: ps -e --forest to print the process tree, but it gives the process tree of all other users in Linux. What can I do ...
user avatar
0 votes
1 answer
60 views

Why don't I find ping process in ps list?

Why can't I see the 'ping' process in my 'ps' listing when I started it as a regular user? The ping binary has setuid bit, ls -l /bin/ping -rwsr-xr-x 1 root root 64424 jun 28 2019 /bin/ping Running ...
user avatar
0 votes
1 answer
38 views

Huge delay in ps output from systemd in Azure Linux

I'm getting huge a delay in ps output -- when it outputs the first line (systemd-networkd), there is a huge delay about 20 to 25 seconds, then the rest are displayed instantly. $ ps -eaf . . . systemd+...
user avatar
  • 495
0 votes
2 answers
67 views

How to set "unlimited" screen width for `ps` to prevent it from truncating output?

ps truncates output when standard output is a terminal to accommodate the terminal's width. I see from ps --help output that ps supports --width and --lines options for controlling the screen width ...
user avatar
  • 3,317
1 vote
1 answer
90 views

Why the value of PRI is different in ps and top?

nginx PID is 19910 The value is 19 in ps -eo pri ps -eo pid,ppid,ni,pri,psr,pcpu,stat,cmd |head -n1;ps -eo pid,ppid,ni,pri,psr,pcpu,stat,cmd |grep nginx PID PPID NI PRI PSR %CPU STAT CMD 19910 ...
user avatar
  • 31
2 votes
1 answer
305 views

What does it mean if the TTY field is a question mark?

What does it mean when ps lists a process's TTY as ? instead of a tty device name/number? For example: piotr@thinkpad:~$ ps -A | head -2 PID TTY TIME CMD 1 ? 00:00:04 ...
user avatar
  • 181
1 vote
1 answer
54 views

Is it possible to display NodeJS app path inside top command's output?

I'm trying to monitor system processes cpu & memory usage on a Ubuntu server with many running NodeJS applications. top command only shows "node" without specifying which script is it. ...
user avatar
  • 111
0 votes
1 answer
40 views

capture commands from each PID and calculate the memory consuming of command in GIGA ( with sort way )

I am running this approach in order to verify the commands that consuming memory from high to low on linux redhat machine I wrote this approach as 1024/1024 , in order to get the values in GIGA ps -...
user avatar
  • 10.9k
2 votes
2 answers
68 views

Prevent a disabled account to run processes

Daily I look at processes on my Debian (Stretch) server using something like top or ps -aux and I see an account which is inactive $ sudo passwd --status myuser myuser L 12/12/2016 ... yet, ps and ...
user avatar
0 votes
1 answer
651 views

How do I do "ps" command on a thread?

The ps command can be done in terminal to view information about a process. For example, #list processes ps aux #with executable paths ps -ef #path for a specific process ps -p [pid] However, if a ...
user avatar
2 votes
1 answer
94 views

zsh completion for kill listing unexpected "0"

I have following in my .zshrc: zstyle ':completion:*:kill:*' command 'ps -u $USER -o pid,%cpu,tty,cputime,cmd' When I press TAB, in addition to processes being listed, there is always a last line ...
user avatar
0 votes
1 answer
126 views

Command, args and process name

I learned recently of pidof, and I was comparing it to pgrep. While doing that, I noticed that pidof returned several PIDs for Firefox, while pgrep returned just one. I checked pgrep's man page and ...
user avatar
0 votes
0 answers
117 views

bash to kill a process by name

I have these attempts to shut down processes (and childs) by name (I got both from this site and adapted them): read -p "Set process name: " PS # first option f() { ps ax | grep "$1&...
user avatar
  • 781
2 votes
1 answer
116 views

Kill processes only if a specific number of PIDs match criteria

I am trying to improve this one liner I use as an (abused) docker-compose healthcheck that runs inside a container: ps -C program.bin -o pid,pcpu --no-headers | awk '$2 > 98 {print $1}' | xargs ...
user avatar
-1 votes
1 answer
742 views

Difference Between ps -ef and ps -auxwww?

Can anyone explain to me what is the difference between ps -ef and ps -auxwww with some examples? I just want to know the difference between them. I have checked a post that provides the ...
user avatar
0 votes
1 answer
132 views

What does "user # # # #" mean in "ps -eo args" output?

I am trying to determine what these running processes are on a lab machine I'm trying to use. I've run the following to determine the top 5 cpu-using processes: ps -eo pid,user,pcpu,args | sort -k3 -n ...
user avatar
  • 133

1
2 3 4 5
13