Process Identifier (PID)

learn more… | top users | synonyms

0
votes
1answer
279 views

Shell script Process PID logging and maintenance using exec

I am trying to launch a java process as a server and then might periodically need to restart/kill it at certain times. Since I use a shell script to launch java jvm(to build classpath), I thought of ...
1
vote
1answer
1k views

Thread dump to a file

I read that I can find the process ID and then use kill command to save the thread dump to a file. But the following example does not return anything... # ps aux | grep -i java wcuser 9136 0.0 ...
0
votes
2answers
580 views

Memory usage by PID?

I was trying to measure how much memory an application is using in the current moment. So here we go, free -k -t: [user@server ~]$ free -k -t total used free shared ...
1
vote
4answers
3k views

Nagios monitor process by pid file

Is there any possibilty to monitor processes with nagios? I found the check_procs command, which I can't use because it doesn't let me specify a file to read the PID from. Also, I don't seem to find ...
0
votes
2answers
166 views

WinServer 2003: Cant find process holding onto ports

We have a couple of production WCF services failing to start because their ports are apparently in use by another process. I have done a netstat -ano and found the PID's that are using these ports, ...
7
votes
3answers
6k views

What is the range of a PID on Linux and Solaris?

What is the maximum and minimum value for a PID (Process ID) on Linux and Solaris?
10
votes
5answers
26k views

The PID of a bash child proccess (imapsync) - how do you get it?

Can any one tell me how to get the PID of a command executed in bash. E.g. I have a bash script that runs imapsync. When the script is killed the imapsync process does not always get killed, so I'd ...
17
votes
5answers
31k views

How to get pid of just started process

I want to start process (eg. myCommand) and get its pid (to allow to kill it later). I tried ps and filter by name, but I can not distinguish process by names myCommand ps ux | awk ...
0
votes
1answer
78 views

Do something with Apache's root PID before it forks

I need to set a property on the root Apache process which in inherited by its children (e.g. oom_adj, cgroup membership). However, Apache will fork itself as soon as it starts. Using $$ in the ...
8
votes
1answer
15k views

Init script does not create a PID file

I need to create an init script for an IRC logger. I copied /etc/init.d/skeleton. I filled in the configuration section to fit my needs and I also had to add --background to the start daemon command ...
26
votes
5answers
27k views

what permission to write PID file in /var/run

Ubuntu touch: cannot touch `/var/run/test.pid': Permission denied I am starting start-stop-daemon and like to write the PID file in /var/run start-stop-daemon is run as my-program-user /var/run ...
6
votes
2answers
6k views

Can start-stop-daemon use environmental variables?

I need to daemonize a Windows app running in Wine, and create a pid in /var/run. Since it requires an X11 session to run, I need to make sure the $DISPLAY variable is set in the running user's ...
1
vote
3answers
2k views

Identify PID of a transient network connection on HP-UX 11.23

We've tried lsof and tcpdump to capture the PID of a process that is attempting to make connections. Any ideas?
8
votes
5answers
6k views

Are .pid files reliable for determining whether a process is running?

Many programs such as sshd create .pid files in /var/run/ that contain their process ID. Are these files reliable for determining whether a process is running? My guess is that these files are ...
0
votes
1answer
560 views

How can I force a refresh of what ports have listeners

I'm trying to re-launch a WCF service that I killed earlier, but I'm getting an AddressAlreadyInUseException. The port it's attempting to use is 1819. I ran netstat -nao from the command line, and ...
0
votes
2answers
288 views

Given pid, find the long gone process

I know that a certain process is restarting my web server at a certain time (probably in a cron job? It doesn't happen every day, though) but I don't know which process, only it's id (from looking at ...
14
votes
2answers
8k views

Directory in /var/run gets deleted after hard reboot

I keep my sphinx pid in /var/run/sphinx/searchd.pid but every time I hard reboot the directory /var/run/sphinx disappears and sphinx fails to start. Is there a way to make that directory stick or ...
1
vote
2answers
774 views

Where is the apache pid file on Gentoo?

I need it to configure Monit, but the path in the sample config file is /usr/local/apache/logs/httpd.pid and it's not there. It's also not anywhere in /etc (at least not with that name).
4
votes
2answers
4k views

Possible to send kill signal to all processes with a given ppid?

I have found myself having to regularly send kill -STOP one million processes, but they all come from the same parent. Is there a smarter way to do this?
4
votes
8answers
25k views

Port 80 is being used by SYSTEM (PID 4), what is that?

I am trying to use port 80 for my application server, but when I perform "netstat -aon" I get TCP 0.0.0.0:80 0.0.0.0:0 LISTENING 4 When I look up the process in ...
6
votes
5answers
5k views

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.