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
2 votes
1 answer
26 views

ps: show only processes owned by root, without showing kernel threads

I know how to hide kernel threads from ps: /bin/ps --pid 2 --ppid 2 --deselect -o user:10,pid,stat,pcpu,pmem,tty,start_time,cmd and I know how to show only processes owned by root: /bin/ps -U root -o ...
0 votes
1 answer
13 views

How to display process with status -R

I'm trying to output all processes with STAT field -R. I tried following command but it is not best matching. Any other way to display?? ps aux |grep R
  • 103
0 votes
2 answers
36 views

How to see process ID of TCP?

When I want to see the process ID for an application I do ps -aux | grep <application>. For example, when I do ps -aux | grep ssh I see the process ID for SSH. But when I do ps -aux | grep tcp ...
0 votes
4 answers
73 views

lsof: print custom fields on one line

Using the -F option for lsof, I can specify which fields are printed: lsof -w -F pcfn However, the output is split on multiple lines, ie one line per field: p23022 csleep fcwd n/home/testuser frtd n/ ...
1 vote
2 answers
47 views

Best way to get resource usage information for a process?

What would be the best way to go about monitoring resource usage of certain running processes? For example if I wanted to generate log files of CPU and memory usage over time. From what I understand ...
1 vote
0 answers
10 views

macOS: ps's columns "nswap nvcsw majflt minflt" are always empty, values are correct in top

Is there a system setting to enable reporting "nswap nvcsw majflt minflt" for ps on macOS? These fields are listed in the manual installed on macOS, but their column is always empty (shows -)...
0 votes
1 answer
45 views

How do I get process metadata for an exited process?

I'd like to read the process metadata for a process that has already exited. Say I ran a command some-bash-command and it exited. A few hours later, in another shell, I'd like to get the metadata for ...
0 votes
0 answers
134 views

linux + huge of sshd: root@notty from ps

we cant access to one of our RHEL server VIA ssh as ssh $remote_machine Last login: Sun Jul 24 12:37:25 2022 from ...... **login is HANG** also when we did ssh $remote_machine "uptime" ...
  • 11.4k
0 votes
0 answers
23 views

ps | grep returns two PIDs [duplicate]

I am trying to write an init.d script, I am trying to kill a named node process: kill $(ps aux | grep 'eproxy' | awk '{print $2}') The problem is, when running just the ps command on it's own, I am ...
-4 votes
1 answer
47 views

ps command: how does the '-q' option work?

According with the ps command, for the -q option Through the man is indicated: -q pidlist Select by PID (quick mode). This selects the processes whose process ID numbers appear in ...
0 votes
1 answer
32 views

ps command: how show the complete command with options, pipes and redirection? (or all together)

About the ps command, consider if for simplicity: in tty3 is executed the yes command in tty4 is executed the yes > /dev/null command through ps I need to show in the report the complete command ...
0 votes
1 answer
257 views

Network Activity on Mac OSX Monterey not showing all processes

My network activity is showing that I'm downloading huge amounts of data that are not showing up in my activity monitor. Is there a program I can use that actually works? I tried launchctl list but ...
0 votes
1 answer
75 views

ps command: how does the 'r' option work? How should be used?

About the ps command for the r option According with man ps it indicates r Restrict the selection to only running processes. And according with ps --help a it indicates r only ...
3 votes
2 answers
117 views

Why do X applications show a question mark as TTY in ps's result?

$ ps -ef | head -n 1 && ps -ef | grep calc UID PID PPID C STIME TTY TIME CMD user1 524014 5382 0 10:21 ? 00:00:01 gnome-calculator user1 532125 510665 ...
  • 1,124
0 votes
2 answers
99 views

Listing the process which are running for more than 3 hours

Note: I have an older version of ps without the option to use -o etimes to get the times in seconds. So the solution of list-processes-that-have-been-running-more-than-2-hours cannot be used directly ...
1 vote
0 answers
63 views

Process makes other processes hang

At some point, a number of scripts seemed to hang for no apparent reason. Running them manually still worked. I narrowed it down to a ps -ef that hanged. After a number of processes, output just ...
  • 3,437
5 votes
0 answers
131 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 ...
0 votes
2 answers
5k 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?
  • 115
0 votes
0 answers
33 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 ...
1 vote
1 answer
30 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 ...
3 votes
1 answer
218 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 ...
0 votes
0 answers
46 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) ...
0 votes
0 answers
39 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 ...
0 votes
1 answer
75 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 ...
4 votes
2 answers
169 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 ...
1 vote
1 answer
123 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.
0 votes
2 answers
37 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 ...
1 vote
1 answer
51 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 ...
  • 13
-2 votes
2 answers
54 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/...
  • 11.4k
0 votes
1 answer
192 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 ...
  • 1,079
0 votes
2 answers
270 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+ ...
  • 135
0 votes
0 answers
116 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 ...
  • 1
0 votes
1 answer
25 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 ...
  • 3
0 votes
0 answers
27 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 ...
0 votes
0 answers
19 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 ...
  • 319
0 votes
0 answers
122 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 ...
  • 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 ...
  • 116
2 votes
1 answer
79 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?
  • 21
2 votes
0 answers
23 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, ...
  • 14.9k
4 votes
1 answer
498 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 ...
  • 43
3 votes
1 answer
204 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, ...
  • 604
1 vote
1 answer
345 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 -...
  • 604
0 votes
1 answer
32 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 ...
  • 11.2k
1 vote
2 answers
1k 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 ...
  • 11.4k
0 votes
1 answer
108 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 ...
  • 101
2 votes
3 answers
816 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.
0 votes
1 answer
624 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 ...
0 votes
1 answer
188 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 ...
  • 11.4k
0 votes
2 answers
28 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 ...
4 votes
1 answer
549 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 ...
  • 201

1
2 3 4 5
13