Questions tagged [ps]

ps is the UNIX command for retreiving process information.

From the Linux User's Manual:

DESCRIPTION
   ps displays information about a selection of the active processes.

By default, ps displays the current processes owned by the user executing the command and attached to the same process group as the shell that launches it. On most UNIX systems, the command
ps -A (or ps -e) will display information about all processes running on the system.

See also:
[unix] tag info
[process] tag info
[fork] tag info


  • For questions about the Postscript language, please use the tag instead.
  • For questions about the windows power shell, please use the tag instead.
585 questions
7
votes
3 answers

How to find/kill a specific python program

There are two different python programs running in this VM one is a background job who monitors a folder and then 'does stuff' (with several workers) 10835 ? Sl 0:03 python main.py 10844 ? Sl 34:02 python main.py 10845 ? …
Chris
  • 129
  • 1
  • 2
  • 11
6
votes
4 answers

Python process management

Is there any way python is natively, or through some code available online (preferably under the GPL), capable of doing process management. The goal is similar to the functionality of ps, but preferably in arrays, lists, and/or dicts.
cpf
  • 1,461
  • 2
  • 15
  • 26
6
votes
1 answer

How to identify memory consumption per thread in a process?

A multi-thread process written in C exhausts almost all of system memory. To find out the thread which is consuming most of the memory, I made a core file using gcore [pid] to check the memory usage per threads, but I can't find the way to do…
박영길
  • 61
  • 1
  • 1
  • 3
6
votes
1 answer

golang CPU usage

I am aware of [1]. With a few lines of code, I just want to extract the current CPU usage from the top n processes with the most CPU usages. More or less the top 5 rows of top. Using github.com/shirou/gopsutil/process this is straight-forward: //…
Patwie
  • 4,360
  • 1
  • 21
  • 41
6
votes
6 answers

How to kill a process with 'kill' combined with 'grep'

I'd like to kill a process/script with a simple command using. At the moment I do the following ps -ef | grep myscriptname kill 123456 But is there a way to maybe combine the 2 command together so I don't need to look and manually write the pid,…
Edito
  • 3,030
  • 13
  • 35
  • 67
6
votes
2 answers

How does ps show the argv for all processes on Mac OS X?

I'm trying to identify when a particular process is running, based on its arguments, on Mac OS X. There may be several processes running with the same name, but only one will have the arguments I'm looking for. The processes are not owned by the…
DNS
  • 37,249
  • 18
  • 95
  • 132
6
votes
2 answers

Process information in OpenBSD

I am new to OpenBSD. I have worked on Linux before. I am looking for the directory where I can find the information about the processes running currently. In Linux, we have /proc directory where the entire list is present. But I can not find a…
iqstatic
  • 2,322
  • 3
  • 21
  • 39
5
votes
1 answer

Sorting results of ps by start time

I'm displaying information about the current processes using this variety of the ps command: ps -eo pid,start,stime,command How can I sort these results by start? I've read man ps and tried -m, -r and -v sorting options. Unfortunately I haven't…
SundayMonday
  • 19,147
  • 29
  • 100
  • 154
5
votes
1 answer

Why does malloc() cause minor page fault?

I'm trying to learn about memory and page fault, so I wrote the code below to check my understanding. I don't understand why calling malloc caused MINFL to increase since malloc() shouldn't affect physical memory (from what I understand). This is my…
Cabbage
  • 53
  • 1
  • 4
5
votes
2 answers

Docker --format with json. Specific placeholder syntax for multiple placeholders

I am trying to produce an output that looks like this using docker ps and the json format command {"Names":"name"} docker ps --format '{{json .Names}}' outputs {"name"} without the label. docker ps --format '{{json .}}' gives all the container…
John Barker
  • 53
  • 1
  • 3
5
votes
6 answers

Extend ps output to more than 80 characters in Solaris 8

How do you extend the output of ps -fe in Solaris so that it displays more than 80 characters? My process has several arguments and the process name could not be displayed anymore.
jasonline
  • 8,646
  • 19
  • 59
  • 80
5
votes
1 answer

bash ps print info about process with name

I need to print UID PID PPID PRI NI VSZ RSS STAT TTY TIME columns using ps of processes with typed name. GNU nano 2.0.6 File: file2 …
Andrii Tytarenko
  • 121
  • 1
  • 10
5
votes
1 answer

How do I set the command line arguments in a C program so that it's visible when users type "ps aux"?

When you type "ps aux" the ps command shows command arguments that the program was run with. Some programs change this as a way of indicating status. I've tried changing argv[] fields and it doesn't seem to work. Is there a standard way to set the…
vy32
  • 28,461
  • 37
  • 122
  • 246
5
votes
1 answer

VSZ vs RSS memory and swap space

I am trying to understand the memory usage of a large scale simulation that we are trying to run. When I run it "ps" reports USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND myuser 5252 97.7 0.5 5751412 377392 ? Rs …
ftiaronsem
  • 1,524
  • 4
  • 19
  • 32
5
votes
1 answer

find effective id euid for process with pid=

How to find euid of a process if I know its pid I tried I get process id using : ps -f -u user1 then I tried ps aux , ps -ef with grep pid but can not see euid I always try to get info from man pages but man ps seems too confusing for a newbie…
Ameyj
  • 597
  • 1
  • 7
  • 16