Questions tagged [process]

An instance of a running computer program.

761 questions
17
votes
4 answers

find command from PID

Is it possible to find the command line of a running process with its pid? the output of /proc/${PID}/cmdline seems that it removes the space character to it is hard to read the output.
mahmood
  • 1,022
  • 7
  • 20
  • 33
17
votes
9 answers

Documentation As-A-Manual vs. Documentation As-A-Checklist

I've had discussions in the past with other people in my department about documentation, specifically, level-of-detail and requirements. In their view, documentation is a simple checklist of Y things to do when X things go wrong. I disagree. I…
Avery Payne
  • 14,536
  • 1
  • 51
  • 88
16
votes
5 answers

How to exit all supervisor processes if one exited with 0 result

I run docker container with supervisor like this: Dockerfile CMD ["/run.sh"] run.sh #!/usr/bin/env bash exec supervisord…
Vitaly Velikodny
  • 361
  • 1
  • 2
  • 10
16
votes
2 answers

Determine process using a port, without sudo

I'd like to find out which process (in particular, the process id) is using a given port. The one catch is, I don't want to use sudo, nor am I logged in as root. The processes I want this to work for are run by the same user that I want to find the…
pat
  • 311
  • 1
  • 3
  • 9
16
votes
16 answers

How do I kill processes older than "t"?

First, yes I have seen this question: Find (and kill) old processes The answers there are incorrect and do not work. I have voted and commented accordingly. The processes I want to kill look like this when listed with ps aux | grep page.py: apache …
hobodave
  • 2,840
  • 2
  • 24
  • 34
16
votes
3 answers

How to get - number of threads per process?

This is one Ubuntu 9.10 server. Also how to see memory usage per process? Thanks
kapso
  • 2,083
  • 4
  • 15
  • 7
15
votes
1 answer

pgrep/pidof usage for complex process names?

I am trying to use pidof or pgrep to be able to send a HUP to a process in my system. The problem is that I only want to kill the process with a precise parameter. This is the output of 'ps awx' 657 ? S 0:00 processname software 658…
aseques
  • 718
  • 4
  • 12
  • 28
15
votes
6 answers

What's a proper way of checking if a PID is running?

I have a .pid file, and I need to check if the process is running. So far I found two options kill -0 `cat something.pid` which prints out an error if the pid isn't running. I know this can be redirected to /dev/null, but it makes me think that…
Jakub Arnold
  • 1,744
  • 10
  • 26
  • 33
15
votes
3 answers

How does Windows kill a process, exactly?

I'm unfamiliar with how processes are killed in Windows. In Linux, a "warm" kill sends a signal (15) which the process can handle by instantiating a signal handler. A cold kill is signal (9) which the OS handles by killing the process forcefully.…
IttayD
  • 1,087
  • 4
  • 11
  • 14
14
votes
1 answer

Kill process that keeps restarting itself

I need some advice on how to completely kill the Jenkins process. It keeps restarting itself. On Mac OSX. $ps -eaf 216 1143 1 0 0:01.65 ?? 0:04.03 /usr/bin/java -jar /Applications/Jenkins/jenkins.war try to kill the…
serverFaulter
  • 385
  • 2
  • 4
  • 9
14
votes
4 answers

Monitor open process files on Linux in real-time

The files opened by a process can be found with this command: ls -l /proc/PID/fd Is there any way that can be done in a more interactive way like tail, auto-refreshing every x seconds?
Frankie
  • 429
  • 1
  • 6
  • 20
14
votes
4 answers

Monitor all newly spawned processes on a Linux machine

Sometimes a process comes and goes faster than I can ps aux, I tried watch -d -n0.1 "ps aux | tail" but again, that's restricted to 1/10th of a second. What I really want is to run a command and follow all new processes, one per line, as they spawn.…
Vasiliy Sharapov
  • 243
  • 1
  • 2
  • 8
14
votes
4 answers

Does anyone know a simple way to monitor root process spawn

I want to exec a script when a new root process spawns. (on Linux) How can I simply do that ? Thanks
cerisier
  • 253
  • 2
  • 6
14
votes
5 answers

how to get process file name from PID in MacOS?

Is it possible to get a file name of a process using PID? ps displays a lot of useful information about a process, but not a hint about a process executable file location.
grigoryvp
  • 3,655
  • 11
  • 39
  • 59
13
votes
2 answers

Rotate a file that's open and being written at all times

I have an linux application that continually writes logging information into a log file, eg. /var/log/application.log. As the application does not rotate the file automatically, this log file can reach a size of gigabytes in some weeks, so I want to…
Bruno Polaco
  • 345
  • 2
  • 9
1 2
3
50 51