Is there a command in HP Unix which can be used inside a K shell to find out the maximum number of processes (PIDs) a pc can generate?
Any help will be greatly appreciated.
Steve
Is there a command in HP Unix which can be used inside a K shell to find out the maximum number of processes (PIDs) a pc can generate?
Any help will be greatly appreciated.
Steve
What do you mean by 'the maximum processes a pc can generate'? Do you want to know the largest pid that is possible on the system? Or do you want to know the maximum number of pids that a single user can have?
Sorry for the confusion.
I want to know the maximum amount of PIDS a pc can generate at once.
Sorry if I am sounding particularly dumb, but what is 'a pc'? Do you mean a connection to a server?
The pc is the machine which I am running processes locally.
I have this program which runs multiple processes at once but when this program runs for a long time I get a error "cannot fork, too many processes". So I want to create a shell which will stop new processes to be started when the machine reaches the limit of processes to be running at once to avoid this error.
You need to change the program... it looks like either the program logic is flawed, or it is going crazy...
Make sure that the program is checking for processes exiting before forking off new ones...
Ok, I'll fix the program later but is there a command to find out the maximum amount of PIDS a pc can run at once?
By PC, I assume that you mean a single user. This limit can be set in the /etc/system file on Sun systems. To see what the limit on your system might be, you can check the different values from this page. If you are running any other system, this will be very different.
Thanks blowtorch,
I am using HP Unix.
However I finally found the command:
getconf CHILD_MAX
I appreciate your help and time.
Cheers
Steve