1827810 Members
1877 Online
109969 Solutions
New Discussion

egrep: not enough memory

 
Richard Jenkins
Occasional Contributor

egrep: not enough memory

What is the cause of this message ? I have checked the swap allocation, which seems adequate (0% in use ! ). The only other things that I can think of are the per-process kernel tunables maxdsiz and maxssiz. Even if these are the cause, how do I know what to set them to ? They are currently at the default for HPUX 11.0
6 REPLIES 6
Stefan Farrelly
Honored Contributor

Re: egrep: not enough memory


ive seen a similar problem with the more command on HP-UX 11. Eventually the RC said there is a problem with it which will be fixed soon. For now, copy the HP-UX 10.20 version of more to our 11 box and it works fine! Try using the 10.20 version of the egrep binary and see if that works.
Im from Palmerston North, New Zealand, but somehow ended up in London...
Andy Monks
Honored Contributor

Re: egrep: not enough memory

Richard, the default for maxdsiz is 64MB. This is pretty low to be fair.

You can check/change it in sam->kernel configuration->configurable parameters
Anthony deRito
Respected Contributor

Re: egrep: not enough memory

Richard, the "0% in use" figure you have seen in the PCT USED comlumn with swapinfo -tma refers to the percentage of swap that is being used for pageout activities. It does not reflect the amount of virtual memory actually being used by running processes.

Depending on how much VM you require, you could still be running out of room in your entire VM pool. What are your TOTAL figures when you run swapinfo -tma? Usually this type of error message is reflective of not enough swap. Also, do you have psuedo swap enabled? This will allow the Memory Management subsystem to use some of your available physical memory as swapspace.
Check kernel parameter swapmem_on for this.

Tony
James R. Ferguson
Acclaimed Contributor

Re: egrep: not enough memory

Richard:

Try setting the kernel parameter 'large_ncargs_enabled' to 1. This allows larger argument lists.

...JRF...
James R. Ferguson
Acclaimed Contributor

Re: egrep: not enough memory

Richard:

Another thought: If you are doing something like searching a large number of files in a directory, as for example:

# grep string *

...then instead try:

# find . -type f -print | xargs grep string

...JRF...
CHRIS_ANORUO
Honored Contributor

Re: egrep: not enough memory

Increase the kernel tunables maxdsiz and maxssiz to 1Gb and 100mb respectively.
Set swapmem_on=1 to enable pseudo swapping.

Check out more on kernel tuning: http://www.docs.hp.com/hpux/content/KCparams.OverviewAll.html
When We Seek To Discover The Best In Others, We Somehow Bring Out The Best In Ourselves.