Skip to main content

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
25 views

How to analyse cause of memory usage not shown by htop

How can I best debug the following issue from here on? I have a python application running in a podman container which has plenty disk I/O due to a numpy memmap of two huge files, one input file ...
Semnodime's user avatar
  • 377
0 votes
0 answers
16 views

How to print only parent processes during the snapshot of the current processes report?

I want to list all active processes and describe main features of them in text file by script. I want to get only parent processes so I can identify if the service exists at all. But there're cases ...
palmasd1's user avatar
  • 125
-2 votes
1 answer
61 views

list tree of a specific proc

I have a command to list the tree of a specific process number. So I did this: ps f -u "${USER}" --pid 1234 -eo command,pid,ppid,tty | awk 'NR <= 1 {print; next} !/awk/ && $0 ~ ...
user avatar
4 votes
1 answer
479 views

ps: invalid option -- 'p'

I'm using Yocto Project (honister) to build my OS image. When I'm trying to use vscode ssh extension, I'm getting an error: > ps: invalid option -- 'p' > BusyBox v1.34.1 () multi-call binary....
YoctoDragon's user avatar
3 votes
1 answer
472 views

Why is one process ps command showing spaces around a directory instead of slashes?

I'm trying to debug a failing legacy process monitor that searches processes that are running. I determined it is being caused by some mysterious linux behavior. The process being ran is /opt/my/path/...
k.schroeder31's user avatar
0 votes
1 answer
78 views

process ID of process launched with system command

Suppose I open a shell on ubuntu OS, then open a software such as matlab via matlab & In the matlab GUI, I do a system command system('/path/to/my/cppprog') % <-- PID of this running program? ...
simon's user avatar
  • 101
-1 votes
3 answers
53 views

"The rest of the line" How setup ssh client console to show all (/px aux) java process line to know the name of the java file?

I have 3 java process running on my host - i access the host by a ssh client. Some one of that process freezed and i need kill that pid process to re-start it I know the name of the file, but i dont ...
Felipe Braga Comonier's user avatar
3 votes
1 answer
272 views

Don't truncate the COMMAND column in ps

I want to list process by their executable name, using the comm column. But it always gets truncated even when it's the last column: $ ps -C systemd-tty-ask-password-agent -o %cpu,%mem,comm %CPU %MEM ...
Kyle Richards's user avatar
0 votes
1 answer
81 views

ps -e converts process name to lowercase

ps -e converts uppercase process names to lowercase. I could not find an explanation of that behaviour in the man page or online and I'm not good enough at source code reading to figure this out from ...
Allen Jabr's user avatar
7 votes
1 answer
803 views

Super-user privileges for Chromium browser

After apt-get install chromium and running it on Debian 12, ps alx | grep -e ^F -e ^5.*chromium returns: F UID PID PPID PRI NI VSZ RSS WCHAN STAT TTY TIME COMMAND 5 1000 ...
Juergen's user avatar
  • 722
0 votes
0 answers
155 views

How to identify which process is causing a high memory consumption?

I am running a virtualized Arch Linux machine. From time to time, it shows a high memory consumption and I do not know the reason because basically, the machine is sitting idle. # ps aux --sort=-%mem ...
Stacker12345's user avatar
0 votes
0 answers
49 views

Finding the WCHAN value

This is running on AIX version: 7, release: 2, on powerppc. I have a process that is hung, and the output of ps -ef -o THREAD is: USER PID PPID TID ST CP PRI SC WCHAN F ...
Jonathan Card's user avatar
1 vote
1 answer
144 views

The difference between `ps axjf` and `ps -axjf`

I'm trying to get a deeper understanding of the ps command in linux. I'm confused when using ps axjf and ps -axjf when I find they seem to have different meanings in the manual but their output is ...
lightxy233's user avatar
9 votes
2 answers
532 views

ps -o pid,ppid,stat,exe -e | grep deleted has "(deleted)" appended to the executable path

ps -o pid,ppid,stat,exe -e | grep deleted generates output like this: 1777 1346 Sl /usr/bin/python3.10 (deleted) 1778 1346 Sl /usr/bin/python3.10 (deleted) 1825 1327 Ss /usr/...
Dave The Dane's user avatar
0 votes
2 answers
188 views

i3 command to toggle picom that greps ps for "picom" works when it should fail, as "picom" is in the command and shows up in "ps" output

I have this line in my i3 config: bindsym $Super+Shift+F10 exec --no-startup-id ps aux | grep -q '[p]icom' && killall picom || picom It runs a shell command (everything after --no-startup-id ...
mutageneral's user avatar
0 votes
2 answers
37 views

Does the "ps" support service exclude?

I want to use ps to show all processes except some, e.g., exclude info about ssh or kthreadd processes. Am I able to indicate processes I want to exclude? For now, the only supported method is to post-...
palmasd1's user avatar
  • 125
1 vote
1 answer
172 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
50 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
583 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
  • 615
0 votes
1 answer
198 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
34 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
114 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
166 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
73 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
199 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
  • 610
1 vote
1 answer
188 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
2k 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
  • 297
2 votes
1 answer
350 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
85 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
238 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
256 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,463
0 votes
1 answer
374 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,888
0 votes
1 answer
47 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
  • 511
4 votes
1 answer
363 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
  • 333
3 votes
2 answers
3k 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
829 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,689
1 vote
2 answers
160 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
  • 511
-1 votes
2 answers
239 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
192 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
1k 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
399 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
633 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
438 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
User82949B's user avatar
0 votes
2 answers
327 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
  • 223
0 votes
4 answers
519 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
1k 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
65 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
  • 606
0 votes
1 answer
322 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

1
2 3 4 5
14