cancel
Showing results for 
Search instead for 
Did you mean: 

Maximum number for PID?

SOLVED
Go to solution
Tim Bingham_1
Occasional Advisor

Maximum number for PID?

Greetings,

Is there a way to set a maximum limit for a PID on Tru64 5.1B? For example, if I wanted to keep PIDs to fewer than 6 digits, could I set a limit to 99999 somehow? The server is an Oracle data warehouse that rarely runs over a couple hundred individual processes. Third party software requires fewer than 6 digits in the PID. If it is possible, would it cause any problems to do that?

Thank you,
Tim

8 REPLIES
Archunan Muthiah
Honored Contributor

Re: Maximum number for PID?

Tim,

I think you can lookinto the variable PID_MAX defined in /usr/include/limits.h:
#define PID_MAX INT_MAX
and INT_MAX defined in /usr/include/machine/machlimits.h

Thanks
Archunan
God is Artist, we are all just brushes
Tim Bingham_1
Occasional Advisor

Re: Maximum number for PID?

Okay, thanks. So I see limits.h sets PID_MAX equal to INT_MAX. If I change PID_MAX to be equal to SHRT_MAX (32767) like it is on my older Tru64 4.x system, will I need to rebuild the kernel, reboot, or some other special action to get it the change to take effect? Thanks again.
jim owens_1
Valued Contributor

Re: Maximum number for PID?

Changing limits.h has no effect on the kernel.

The values in limits.h are compiled into the kernel binary .mod files. Rebuilding the kernel is a relink, not a recompile.
Archunan Muthiah
Honored Contributor

Re: Maximum number for PID?

Tim,

Yes, you will have to compile and you can try rebooting system.


Thanks
Archunan


God is Artist, we are all just brushes
Tim Bingham_1
Occasional Advisor

Re: Maximum number for PID?

Thank you to Archunan and Jim for the help so far. I hate to ask another question that might have an obvious answer but... If a doconfig rebuild of the kernel is a relink and not a recompile, what do I need to do before the doconfig to recompile and incorporate the changes from limits.h into the kernel modules? I have searched through the Tru64 admin manuals and have been able to locate instructions for rebuilding but not for recompiling the kernel. Many thanks!

Tim
jim owens_1
Valued Contributor
Solution

Re: Maximum number for PID?

I guess I wasn't clear that unless you work at HP and have access to the Tru64 sources you can not make a kernel with a different limits.h.

But even if you could recompile the kernel, PID_MAX is only information for application builders, not how the kernel limit is set.

A non-cluster tru64 system limits the pid to a max value of 524287. In a cluster, the pids begin at 524288 (member1 pid 0) and jump by 524288 * member_ID. There is no way to configure Tru64 to limit these numbers.

You need a corrected application.
Tim Bingham_1
Occasional Advisor

Re: Maximum number for PID?

Ah, okay - great info! It looks like it's in the vendor's hands to change their code. Thanks again for all the help.
Tim Bingham_1
Occasional Advisor

Re: Maximum number for PID?

Closing thread...