Assigning PID for a Process

Hello Team,

Is there anyway to assign a dedicated pid for a particular java process(application).

Regards,
Gowtham.G

I don't think there is. What do you need it for?

We want to assign a dedicated PID for weblogic java process due to set high priority of that particular process during some peak periods.

I would record the pid when the process starts and use that to control the process..

It is not possible to assign specific PIDs to processes, because they are generated by the kernel at the start of each process. In fact Unix PIDs have to be somewhat upredictable (they are not used successively by incrementing a counter by 1 or something such.)

Here is an explanation of how the AIX kernel creates PIDs.

I hope this helps.

bakunin

Sometimes they are, it can vary.

Heard a legend mentioned here about a game-state restore hack which worked by forking, repeatedly, as many times as it took to get the right PID, which was thousands of times, even back then :stuck_out_tongue: