- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- ksh: cannot fork: too many processes
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2006 06:13 AM
10-13-2006 06:13 AM
ksh: cannot fork: too many processes
i know that is related with a kernel parameter but i do not know which one is and what must be the new value ...
can you help me please ?
i mean:
it appears every time i run a script that only use the following commands into the file named serveruno.sh
- remsh (file into remote shell named hola.sh)
hola.sh contains:
- omnirpt command
and then (into the server where is showing the message continuew the script named server.sh working) continue the following commands:
- obtain a value that was captured as variable when remsh command was run(is the string of the file)
- send an email (email command)
ksh: cannot fork: too many processes
thanks, Manuales.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2006 06:16 AM
10-13-2006 06:16 AM
Re: ksh: cannot fork: too many processes
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2006 06:17 AM
10-13-2006 06:17 AM
Re: ksh: cannot fork: too many processes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2006 06:18 AM
10-13-2006 06:18 AM
Re: ksh: cannot fork: too many processes
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2006 06:18 AM
10-13-2006 06:18 AM
Solutionmaxuprc = The maximum number of processes each user can start.
nproc = The maximum number of system wide processes.
Check both parameters and see what their current values are.
ps -ef | wc -l
Will give a close count of the total number of processes on the system.
ps -ef | grep root | wc -l
will give you a count of the number of processes the root user, assuming that is who you are logged in as, is running. If you are logged in as a different user, substitute that id for root in the above statement.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2006 06:20 AM
10-13-2006 06:20 AM
Re: ksh: cannot fork: too many processes
Depending on your settings you might want to increase the appropriate parameter by 50% or perhaps 100%.
Note that depending on the version of HP-UX you are running, this could require a reboot.
If I recall correctly, maxuprc is dynamic at 11.11 and later, but requires a reboot for 11.0 and earlier.
I believe nproc still requires a kernel recompile and a reboot for all versions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2006 06:21 AM
10-13-2006 06:21 AM
Re: ksh: cannot fork: too many processes
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2006 06:21 AM
10-13-2006 06:21 AM
Re: ksh: cannot fork: too many processes
Check your scripts for unintentional looping.
maxuprc:
maximum number of processes per user
nproc: maximum number of processes system-wide
Under 11i, the default value of maxuprc is 1000, and nproc is (20+8*MAXUSERS), or 2020. maxuprc is dynamically tunable, while nproc is not.
PCS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2006 06:22 AM
10-13-2006 06:22 AM
Re: ksh: cannot fork: too many processes
$ ps -fea | wc -l
336
$ ps -fea | grep root | wc -l
138 -l
maxuprc: 2048
nproc: 3220
then, do i have to replace the id that i am using by root?
Manuales.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2006 06:25 AM
10-13-2006 06:25 AM
Re: ksh: cannot fork: too many processes
~hope it helps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2006 06:27 AM
10-13-2006 06:27 AM
Re: ksh: cannot fork: too many processes
I thought I said that before.......
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2006 06:31 AM
10-13-2006 06:31 AM
Re: ksh: cannot fork: too many processes
~hope it helps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2006 07:42 AM
10-13-2006 07:42 AM
Re: ksh: cannot fork: too many processes
remsh someserver "ps -ef -u user1 | wc -l"
Also check how close the current process count is to your nproc value:
remsh someserver "sar -v 1 1 | tail -1 | awk '{print \$4}'"
It will return numbers like 356/4033 which means 356 processes running with room for a total of 4033. If you see numbers like 3999/4033 then yes, you need to DOUBLE or TRIPLE the kernel parameter NPROC. Just increasing it a little bit means you'll probably have to change it again (requires a reboot) as your system gets busier.
So you first must test your remote command that it properly works. But most important: remsh (and rexec) do NOT have a login environment. The only variables set are:
LANG
PATH
LOGNAME
SHELL
HOME
PWD
TZ
Your remote script must setup all additional variables required for proper operation. You can also trace your remote script by inserting set -x at the top.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2006 07:48 AM
10-13-2006 07:48 AM
Re: ksh: cannot fork: too many processes
I'm just curious about this statement:
"grep is seldom accurate when used with ps. "
Can you clarify that? What should I be wary of when I use ps -ef | grep?
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2006 08:20 AM
10-13-2006 08:20 AM
Re: ksh: cannot fork: too many processes
look at the answers of me, Bill and James in the thread
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1067697
mfG Peter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2006 03:33 PM
10-13-2006 03:33 PM
Re: ksh: cannot fork: too many processes
ps -ef | grep 123
(matches PID 123 1234 2123 etc)
(also matches PPID 123 1234 3123 etc)
use: ps -f -p 123
ps -ef | grep bill
(matches bill billh waybill billg etc)
use: ps -f -u bill
ps -ef | grep sh
(matches sh ksh csh bash unhasdaemon etc)
use: UNIX95= ps -f -C sh
grep is working exactly like it is supposed to but you can't tell grep to look at a certain column.
man ps has a lot of details. See especially:
-u
-p
-x
and with UNIX95=
-C
-H
-o
Bill Hassell, sysadmin