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

Does the p(rocess)s(napshot) support service exclude?

I want to use ps to show all processes except the some of them - exclude info about ssh or kthreadd processess. Am I able to indicate processes I want to exclude? The only supported way for now - non ...
palmasd1's user avatar
1 vote
1 answer
59 views

Process appears with square brackets ([]) around name after being SIGKILL'd

I am executing and killing a process as follows: python some_script.py &; pid=$!; sleep 5; kill -9 $!; ps -o pid,sid,uid,state,start,command In other words: I execute a script in the background, ...
Alessandro Power's user avatar
0 votes
0 answers
19 views

Service load is high - service_process listed in top

I can't find any information on service_process which appears intermittently when server load is high. Is there any information about this process? Is there a way to see which other process is using ...
supmethods's user avatar
6 votes
2 answers
516 views

How can I use ps and pwdx both together?

I have a Top command that I use to see what's going on in my server: ps -eo pid,cmd:50,%mem,%cpu --sort=-%mem | head 20 Basically it's using ps and removes a bunch of columns. For each process id I ...
Saeed Neamati's user avatar
0 votes
0 answers
19 views

ps with custom output and separators [duplicate]

I get a list of running processes with a custom separator (;;;). ps -o "%p ;;; %a" Output normally is like this: PID ;;; COMMAND 28819 ;;; bash 29752 ;;; ps -o %p xxx %a This ...
chris01's user avatar
  • 549
0 votes
1 answer
92 views

Using grep with ps and column width specification

I'm trying to limit the column width of the command column when running a ps command, but also trying to pipe that output into a grep command. However, this is not working. This runs fine: ps -eo pid,...
risingTide's user avatar
0 votes
0 answers
33 views

Why doesn't pid $$ refer to bash here? [duplicate]

In my Bash shell the $$ variable expands to the process ID of the shell. So why does ps print its own name when I execute this? $ bash -c 'ps -p $$ -o comm=' ps When I follow it with a no-op command, ...
Iain Samuel McLean Elder's user avatar
0 votes
1 answer
69 views

Introduce literal strings in PS command

I usually lauch this command: ps -p 1 --format "command %c running from %t" But last version in Debian 12, I can't: ps -p 1 --format "command %c running from %t" error: improper ...
Mario Castilla's user avatar
1 vote
1 answer
54 views

get PID by name

I'm running an autopilot on a closed environment running Linux, and I've got a kernel thread whose priority I need to change. I'd prefer not to patch the kernel for this. This thread is created early ...
rsaxvc's user avatar
  • 150
1 vote
0 answers
50 views

why is process running on cpu core that is disabled in affinity mask

when I run taskset -p 242306 I got following output 3ffffffffffc000000000000000000000000000000000000000000038000000 sorry for the long string, there are 256 cores on the box. used taskset -c -p ...
Lei Yu's user avatar
  • 111
0 votes
3 answers
133 views

Why does $0 and all arguments disappear from running bash script as viewed by ps?

I have a bash script (first line #! /bin/bash) called do-doruns that I invoke from the bash command line with ./do-doruns arg1 arg2 ... That script in turns calls the script ./dorun a1 a2 a3 ..., and ...
Eliot Moss's user avatar
6 votes
4 answers
2k views

Exclude ps itself from ps output

I want to get information about all processes in the system except the ps process itself. That is, something like: ps --no-headers --pid 1111 -N where 1111 is the process id of the currently running ...
FedKad's user avatar
  • 590
1 vote
1 answer
101 views

Discover which process is asking for sudo?

I have a fairly long-serving Ubuntu 18.04 LTS desktop computer onto which I have installed a great many apt packages from mainstream and non-mainstream repositories as well as numerous random tarballs ...
rvse2003's user avatar
7 votes
3 answers
1k views

Why does ps aux | grep <something> return extra hit [duplicate]

Let's say I want to know the PID of kate editor that is currently running (kate is just an example, it works as described for many programs). So, I execute ps aux | grep kate. Here is the output: ...
S. N.'s user avatar
  • 165
2 votes
1 answer
98 views

ps -aux -U "user" not filtering on user as expected

I have a quick question. I would regularly like to list all the processes running under my account on Linux. After reading the manpage, I thought I'd have to write: ps -aux -U "joshua" to ...
Joshua Schroijen's user avatar
1 vote
0 answers
46 views

Background process does not show up in ps

I used ssh to start a dotnet app as background job on a remote server dotnet MyApp.dll & I confirmed, that the app was running and then terminated the ssh session. Now I want to kill this ...
AracKnight's user avatar
0 votes
1 answer
130 views

Why is a gap between `journalctl -k -b -0` and `ps ho lstart 1`?

I encounter a strange observation: If I do: journalctl -k -b -0 | sed -e 's/^\(.\{76\}\).*/\1.../;3q' I will see something like: -- Journal begins at Sun 2022-08-07 12:06:55 CEST, ends at Mon 2023-02-...
F. Hauri  - Give Up GitHub's user avatar
2 votes
3 answers
145 views

Find all Processes Except These Specific Ones

Is there a ps or pgrep option or standard practice what will let me list all the running processes on a machine EXCEPT for a few specific ones I don't want to see? Put another way -- let's say I have ...
Alana Storm's user avatar
  • 1,423
0 votes
1 answer
159 views

Search processes by executable name, excluding those without a TTY?

I'm trying to search for processes that have a given executable name and have an associated TTY. My use-case is an attempt to identify running abduco client processes. Since abduco runs client ...
ivan's user avatar
  • 1,848
0 votes
1 answer
44 views

maintain appended logs in separate file despite tail command termination

I have tomcat catalina.log file that keeps getting updated. I wish to maintain its past 500 lines + any appended logs into a new file catalina.log_new for the next 2 hours. To start off I run nohup ...
Ashar's user avatar
  • 489
3 votes
1 answer
295 views

Equivalent to "ps -p"

I'm using a board without the full ps command installed. What I need is ps -p equivalent (something that sets $? if a specific PID is found or not). Is there a way to accomplish this with another ...
DDS's user avatar
  • 323
3 votes
2 answers
2k views

What does the SPID abbreviation stand for?

The ps command with the -T flag outputs the SPID column, which is also called TID(Thread ID). But what does SPID stand for? The ps source code doesn't seem to know why this name is either: trace("...
deevroman's user avatar
0 votes
2 answers
597 views

missing btime in /proc/stat how do i fix it?

what does misning btime mean? # ps aux | grep ssh missing btime in /proc/stat I'm on an embedded system (ts-7600)running a Debian version via UART. #uname -a Linux ts7600-4aa86d 2.6.35.3-571-gcca29a0+...
j0h's user avatar
  • 3,537
1 vote
2 answers
128 views

how to print PID along with the process dump

I wish to combine both the below commands: ps -ef| grep -v grep|grep java | awk ' {print "PID is:" $2}'; PID is:515 PID is:22145 PID is:32703 ps -ef| grep -v grep|grep java wladmin 515 ...
Ashar's user avatar
  • 489
-1 votes
2 answers
174 views

FreeBSD ps command: is it possible to change output columns to match Linux format?

In Linux ps outputs: UID PID PPID C STIME TTY TIME CMD In FreeBSD similar but not the same output can be achieved by ps -lu or ps -ju commands. The problem with the latter is ...
Jobber's user avatar
  • 11
0 votes
1 answer
128 views

How may I uninstall the "ps" (process status) utility on a *nix system?

I have heard that ps (process status) can store users' commands history, like what shell history does. Source: comment on StackOverflow, Note that if the goal is to hide passwords in command line ...
rm -rf's user avatar
  • 3
0 votes
1 answer
733 views

Recursively list child and parent processes as a tree for a PID

To get all child process in a tree format, you can run the below $ ps -g 24154 --forest PID TTY TIME CMD 24154 pts/4 00:00:00 bash 25745 pts/4 00:00:00 \_ ps How can I get the ...
k_vishwanath's user avatar
1 vote
0 answers
261 views

ps command not showing full name of thread

When I have run ps command as below on a linux machine ps c -wo %cpu,%mem,cmd:20 -L -p 137985 %CPU %MEM CMD 0.0 4.5 java 0.0 4.5 java 0.7 4.5 GC Thread#0 0.0 4.5 G1 Main Marker 0.0 4.5 G1 ...
Pushparaj's user avatar
  • 113
2 votes
1 answer
401 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 ...
Martin Vegter's user avatar
0 votes
1 answer
285 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
Shukurillo Baikhanov's user avatar
0 votes
2 answers
216 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 ...
Noob_Guy's user avatar
  • 103
0 votes
4 answers
373 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/ ...
Martin Vegter's user avatar
1 vote
2 answers
541 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 ...
Euchidna's user avatar
1 vote
0 answers
59 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 -)...
codepoet's user avatar
  • 576
0 votes
1 answer
228 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 ...
Vinay Keerthi's user avatar
0 votes
0 answers
1k 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" ...
yael's user avatar
  • 12.8k
0 votes
0 answers
94 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 ...
JLCarveth's user avatar
-4 votes
1 answer
278 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 ...
Manuel Jordan's user avatar
0 votes
1 answer
416 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 ...
Manuel Jordan's user avatar
0 votes
1 answer
1k 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 ...
Brian Patterson's user avatar
-1 votes
1 answer
529 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 ...
Manuel Jordan's user avatar
3 votes
2 answers
413 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 ...
ChennyStar's user avatar
  • 1,497
0 votes
2 answers
568 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 ...
Deep Mukherjee's user avatar
1 vote
0 answers
215 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 ...
Ljm Dullaart's user avatar
  • 4,397
5 votes
0 answers
329 views

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

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 ...
AJMansfield's user avatar
6 votes
2 answers
41k 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?
hal's user avatar
  • 175
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 ...
Manuel Jordan's user avatar
1 vote
1 answer
45 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 ...
Manuel Jordan's user avatar
4 votes
1 answer
2k 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 ...
Manuel Jordan's user avatar
0 votes
0 answers
482 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) ...
Manuel Jordan's user avatar

1
2 3 4 5
13