![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| AIX AIX is IBM's industry-leading UNIX operating system that meets the demands of applications that businesses rely upon in today's marketplace. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| script running with "ksh" dumping core but not with "sh" | simhe02 | HP-UX | 9 | 11-04-2008 08:52 PM |
| Help req for...shell script to catch "db2 connect" errors ... | frozensmilz | Linux | 1 | 09-23-2008 07:34 PM |
| Development Releases: Linux Mint 4.0 Beta "Fluxbox", 4.0 Alpha "Debian" | iBot | UNIX and Linux RSS News | 0 | 01-04-2008 03:00 PM |
| Explain the line "mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`" | Lokesha | UNIX for Dummies Questions & Answers | 4 | 12-20-2007 01:52 AM |
| No utpmx entry: you must exec "login" from lowest level "shell" | peterpan | UNIX for Dummies Questions & Answers | 0 | 01-18-2006 04:15 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
"too big" and "not enough memory" errors in shell script
Hi, This is odd, however here goes. There are several shell scripts that run in our production environment AIX 595 LPAR m/c, which has sufficient memory 14GB (physical memory) and horsepower 5CPUs. However from time to time we get the following errors in these shell scripts. The time when these happen there is not much activity going on and the errors seem to eventually go away since the scripts which are getting these types of errors are scheduled to run from TWS (maestro) and run all day long. They run just fine during the peak hours of acitivity on the box. Can someone tell me what to check or do for these types of errors. Code:
vmstat System Configuration: lcpu=5 mem=14336MB Code:
oslevel 5.2.0.0 Code:
AAA.sh_20090203.log:/entH/bin/AAA.sh[277]: /usr/bin/rm: 0403-013 There is not enough memory available to run the command. AAA.sh_20090203.log:/entH/bin/AAA.sh[278]: /usr/bin/rm: 0403-013 There is not enough memory available to run the command. AAA.sh_20090203.log:/entH/bin/AAA.sh[279]: /usr/bin/rm: 0403-013 There is not enough memory available to run the command. AAA.sh_20090203.log:/entH/bin/AAA.sh[287]: /usr/bin/rm: 0403-013 There is not enough memory available to run the command. XXXXX.sh_20090203.log:/entH/bin/XXXXX.sh[106]: /usr/bin/grep: too big XXXXX.sh_20090203.log:/entH/bin/XXXXX.sh[124]: /usr/bin/grep: too big XXXXX.sh_20090203.log:/entH/bin/XXXXX.sh[124]: /usr/bin/wc: too big XXXXX.sh_20090203.log:/entH/bin/XXXXX.sh[129]: /usr/bin/ls: too big XXXXX.sh_20090203.log:/entH/bin/XXXXX.sh[130]: /usr/bin/wc: too big YYYYY.sh_20090203.log:/entH/bin/YYYYY.sh[107]: /usr/bin/grep: too big YYYYY.sh_20090203.log:/entH/bin/YYYYY.sh[125]: /usr/bin/wc: too big YYYYY.sh_20090203.log:/entH/bin/YYYYY.sh[125]: /usr/bin/grep: too big YYYYY.sh_20090203.log:/entH/bin/YYYYY.sh[130]: /usr/bin/ls: too big YYYYY.sh_20090203.log:/entH/bin/YYYYY.sh[131]: /usr/bin/cat: too big ZZZZZ.sh_20090203.log:/entH/bin/ZZZZZ.sh[107]: /usr/bin/grep: too big ZZZZZ.sh_20090203.log:/entH/bin/ZZZZZ.sh[125]: /usr/bin/wc: too big ZZZZZ.sh_20090203.log:/entH/bin/ZZZZZ.sh[125]: /usr/bin/grep: too big ZZZZZ.sh_20090203.log:/entH/bin/ZZZZZ.sh[130]: /usr/bin/ls: too big Please advise. Thanks Jerardfjay |
|
||||
|
Quote:
Code:
-rw-rw-rw- 1 userid groupid 266 Feb 05 12:12 AAA.sh_158098.tmp -rw-rw-rw- 1 userid groupid 327 Feb 05 12:12 AAA.sh_158098.sql.0 -rw-rw-rw- 1 userid groupid 6 Feb 05 12:12 AAA.sh_158098.0.AK5File -rw-rw-rw- 1 userid groupid 18 Feb 05 12:12 AAA.sh_158098.0.AK2File -rw-rw-rw- 1 userid groupid 78 Feb 05 12:12 AAA.sh_158098.0 |
|
||||
|
Neo, It is very strange. The frequency of the memory errors are more when compared to the "too big" error. One of the items that IBM support asked us to increase for the "too big" error was the value of ncargs from 512 to 1024. (Initially this value was 6). However this did not have a positive impact. Here is the individual limits for the userid under which the scripts execute. Code:
ulimit -a time(seconds) unlimited file(blocks) unlimited data(kbytes) unlimited stack(kbytes) 4194304 memory(kbytes) unlimited coredump(blocks) unlimited nofiles(descriptors) 8000 If anyone has any ideas we are willing to give it a shot. Thx. |
|
||||
|
Hmm, when a command as small as "/usr/bin/rm" does not fit into memory any more (as per your first post here) there is something seriously wrong.
If the problem goes away temporarily with a reboot chances are you have a memory leak problem. To track this sort of problems down is sometimes hard, because of the ephemeral nature of these. You could wait until the problem shows up and then use "ps -Alo vsz<,other options>" to get the "virtual memory footprint" of every process running. See the man page of "ps" for more information about possible options. Another common source of problems are java processes, which are generally known to be memory hogs. Find out if there are java processes running ("ps -fe | grep java") and if there are some you have a likely cause for your problem. Further lets examine the overall memory situation of your machine. Please post the output of the following commands: "svmon -G" (only as root) "vmstat -v" "lsps -a" Also examine the crontabs of all users on the machine. Maybe some memory hog is started regularly and this is whats causing your problems. I hope this helps. bakunin |
|
||||
|
I have seen the "too big" error come out when accessing a large number of files, say over 2000. how many files are you trying to process? Also do you have a sample of the scripts that you are trying to run? What else is going on on the server at the time of errors?
|
![]() |
| Bookmarks |
| Tags |
| grep or |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|