Questions tagged [pid]

Process Identifier (PID)

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.

Source: wikipedia

108 questions
10
votes
2 answers

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?
quodlibetor
  • 297
  • 2
  • 4
  • 12
10
votes
1 answer

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 since my IRC logger doesn't split off. The logger…
Cory Walker
  • 236
  • 2
  • 4
  • 11
9
votes
3 answers

Getting PID from lsof list

I have a react-native application and I want to write a script for start test version. I need to shotdown the :8081 port if it is alive. The command: lsof -i :8081 kill -9 The lsof getting back this result: COMMAND PID USER FD …
PumpkinSeed
  • 345
  • 2
  • 5
  • 12
6
votes
2 answers

Is it normal for PID's to be over 65535?

I have a managed VPS running on CloudLinux 6.6 x86_64 standard. It has a few websites with MySQL, PHP and Apache running with CPanel. I am working on a PHP system that needs to manage a PID and detect it's status. I have defined an smallint field (2…
Ismael Miguel
  • 173
  • 1
  • 10
5
votes
2 answers

How properly handle deletion of pid.file in service script

I'm trying to write service script for application. So I can control it like this: ./myscript.sh start|stop|status On startup pid.file with process id creates, and based on it I can check status and stop process. In stop command I remove pid.file -…
zella
  • 153
  • 1
  • 1
  • 5
5
votes
2 answers

Does kill -3 actually terminate a java process? Or just generate a thread dump?

CentOS 5.9 If I run kill -3 what actually happens? As per this red hat article, I understand that a Java Thread Dump is generated but is the process terminated? It doesn't appear to be based on my tests: [root@foobox ~]# kill…
Mike B
  • 11,871
  • 42
  • 107
  • 168
5
votes
1 answer

How to get the PID of a process started by /bin/su -c

I'm writing a init.d-script for an java-app. But the java-app should be run by another user. (The OS I'm using is Debian Squeeze.) I already got this: /bin/su - $USER - c "cd $PATH;echo $PASSWORD | $JAVA -Xmx256m -jar $PATH/app.jar -d > /dev/null" &…
crash3k
  • 53
  • 1
  • 3
5
votes
2 answers

Can't create PID file on MySQL server, permission denied

The MySQL server won't start and is reporting the following error: /usr/local/mysql/bin/mysqld: Can't create/write to file '/usr/local/mysql/data/James-Barnhills-Mac-Pro.local.pid' (Errcode: 13) Can't start server: can't create PID file:…
James Barnhill
  • 53
  • 1
  • 1
  • 4
5
votes
2 answers

Can I kill apt.system.daily to fix the apt install command?

When I try to install anything (Ubuntu 16.04) with apt or apt-get I get this: E: Could not get lock /var/lib/dpkg/lock-frontend - open (11: Resource temporarily unavailable) E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend),…
CzipO2
  • 157
  • 1
  • 1
  • 5
4
votes
3 answers

Apache Failure on Centos 7 not starting

hellau everyone, i have a problem, that i cant resolve alone, so i need your help. i have installed on a centos 7 apache when im asking for the status of the service (systemctl status httpd) so i got an error like this one: Starting The Apache…
Mira Mira
  • 141
  • 1
  • 1
  • 3
4
votes
3 answers

If I know the PID number of a process can I know its name?

If I have the PID number for a process (on a UNIX machine), how can I know the name of its associated process? What do I have to do?
AndreaNobili
  • 197
  • 2
  • 5
4
votes
4 answers

PID history of a process

What I want to know is PIDs that were assigned to a process before its last 2-3 restart. Scenario is after this particular process crashes, a log file is generated and PID of the process is concatenated to the name of log file. I have such 5 log…
stillStudent
  • 323
  • 2
  • 5
  • 13
3
votes
2 answers

systemd, logrotate and PID-files

I'm packaging some daemon for debian 8 and systemd. The daemon can create PID-file by itself, but it has no permissions to write into /run because of non-root user. It used to create PID-file via old sysV init-script, but it doesn't work on…
Paul K.
  • 125
  • 1
  • 1
  • 9
3
votes
2 answers

Reduce PID_MAX Safely

I have one server in a cluster that was experiencing a process table leak. Because the developer responsible for the code was unavailable for a few days I increased pid_max on the machine as follows: echo 4194303 > /proc/sys/kernel/pid_max This…
3
votes
4 answers

Apache process consumes too much CPU

I have an ubuntu apache/php server running php doing appx 100 hits/sec and a PHP cron running in the background. I get occasionally high CPU load on one of the Apache processes which stays high regardless of traffic or cron activity. It seems to me…
Niro
  • 1,401
  • 4
  • 20
  • 36