Questions tagged [pid]

Use this tag for questions about Process ID. For questions about PID-controllers, use [pid-controller] instead.

In computing, the process identifier (normally referred to as the process ID or just PID) is a number used by most operating system kernels (such as that of UNIX, Mac OS X or Microsoft Windows) to (temporarily) uniquely identify a process. This number may be used as a parameter in various function calls allowing processes to be manipulated, such as adjusting the process's priority or killing it altogether.

If your question is about Proportional Integral Derivative control, please use instead.

1697 questions
53
votes
10 answers

IIS Application pool PID

is anyone familiar with a way to get the Application pool that is associated with a process ID ? I am using Win32_Process to query the W3WP services and return the PID now I am trying to get the app pool associated with it.
Adonis L
  • 1,679
  • 4
  • 20
  • 23
51
votes
9 answers

How can I check from Ruby whether a process with a certain pid is running?

If there is more than one way, please list them. I only know of one, but I'm wondering if there is a cleaner, in-Ruby way.
Pistos
  • 23,070
  • 14
  • 64
  • 77
50
votes
7 answers

How can I list all processes running in Windows?

I would like to find a way to loop through all the active processes and do diagnostics checks on them (mem usage, cpu time etc) kinda similar to the task manager. The problem is broken down into two parts: Finding all the processes Finding…
Statement
  • 3,888
  • 3
  • 36
  • 45
48
votes
3 answers

What is the difference between a Process' pid, ppid, uid, euid, gid and egid?

Context: I'm getting the current Ruby process ID. Process.pid #=> 95291 Process.ppid #=> 95201 Process.uid #=> 501 Process.gid #=> 20 Process.euid #=> 501 Process.egid #=> 20
Joshua Pinter
  • 45,245
  • 23
  • 243
  • 245
46
votes
11 answers

Redis Daemon not creating a PID file

The Redis startup script is supposed to create a pid file at startup, but I've confirmed all the settings I can find, and no pid file is ever created. I installed redis by: $ yum install redis $ chkconfig redis on $ service redis start In my…
jsmartt
  • 1,404
  • 1
  • 15
  • 22
44
votes
6 answers

How to kill process on GPUs with PID in nvidia-smi using keyword?

How to kill running processes on GPUs for a specific program (e.g. python) in terminal? For example two processes are running with python in the top picture and kill them to see the bottom picture in nvidia-smi
salehinejad
  • 7,258
  • 3
  • 18
  • 26
43
votes
3 answers

How to get PID from forked child process in shell script

I believe I can fork 10 child processes from a parent process. Below is my code: #/bin/sh fpfunction(){ n=1 while (($n<20)) do echo "Hello World-- $n times" sleep 2 echo "Hello World2-- $n times" n=$(( n+1…
Sam
  • 4,521
  • 13
  • 46
  • 81
42
votes
8 answers

How do I increase the /proc/pid/cmdline 4096 byte limit?

For my Java apps with very long classpaths, I cannot see the main class specified near the end of the arg list when using ps. I think this stems from my Ubuntu system's size limit on /proc/pid/cmdline. How can I increase this limit?
user27635
  • 423
  • 1
  • 4
  • 4
41
votes
4 answers

Determine programmatically if a program is running

In C, how can I find out programmatically if a process is already running on Linux/Ubuntu to avoid having it start twice? I'm looking for something similar to pidof.
Frank Vilea
  • 8,323
  • 20
  • 65
  • 86
40
votes
10 answers

How to check whether specified PID is currently running without invoking ps from PHP?

We would like to check if a specified process is currently running via PHP. We would like to simply supply a PID and see if it is currently executing or not. Does PHP have an internal function that would give us this information or do we have to…
anonymous-one
  • 14,454
  • 18
  • 60
  • 84
37
votes
8 answers

PID error on mysql.server start?

I've just tried installing MySQL using homebrew (on Mac OS X 10.6), but I've run across an issue at the first hurdle. When trying to manually start the server (mysql.server start), I get the following error: . ERROR! Manager of pid-file quit without…
joecritch
  • 1,095
  • 2
  • 10
  • 25
36
votes
7 answers

Programmatically get parent pid of another process?

I tried google, but found getppid() which gets the parent pid of the current process. I need something like getppid(some_other_pid), is there such a thing? Basically takes the pid of some process and returns the parent process' pid.
hasen
  • 161,647
  • 65
  • 194
  • 231
35
votes
3 answers

ms c++ get pid of current process

Parts of my application are in C++ under windows. I need the process id for the current process. Any thoughts?
Bogdan Gavril MSFT
  • 20,615
  • 10
  • 53
  • 74
33
votes
7 answers

Process name from its pid in linux

How to get a process name from his pid ? For example I execute cat file1.txt, but I want to figure out that cat command and its arguments since its pid in the system. Is there a struct to determine it or something similar? Any idea?
TheForbidden
  • 1,533
  • 4
  • 22
  • 30
32
votes
4 answers

How can I get the PID of the parent process of my application

My winform application is launched by another application (the parent), I need determine the pid of the application which launch my application using C#.
Salvador
  • 16,132
  • 33
  • 143
  • 245