- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- gawk error memory allocation error
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
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
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
09-06-2014 05:49 AM - last edited on 09-08-2014 06:33 PM by Maiko-I
09-06-2014 05:49 AM - last edited on 09-08-2014 06:33 PM by Maiko-I
gawk error memory allocation error
Hi,
i have following code
gawk -F, '{FS=","}
{
if (substr($1,3,1)=="-") array[$5","$1","$5","$6","substr($1,1,2)","$2","$7","$4]++
else arraytmp[$5","$1","$5","$6","$1","$2","$7","$4]++
}
END { for (counter in array) {print counter","array[counter] }
{ for (count in arraytmp) {print count","arraytmp[count]}} }
' Infile > OutFile
the Infile has more that 400 million records, by virute of this operation outfile will be reduce to 60million.
Error coming is:
gawk: cmd. line:4: (FILENAME=- FNR=8226772) fatal: more_blocks: freep: can't allocate 4000 bytes of memory (Not enough space)
Additional Information:
$ uname -a
HP-UX smsciuc0 B.11.31 U ia64 3651711977 unlimited-user license
$ swapinfo
Kb Kb Kb PCT START/ Kb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 67108864 0 67108864 0% 0 - 1 /dev/vg00/lvol2
reserve - 455428 -455428
memory 63799772 8378200 55421572 13%
$ kctune maxdsiz maxdsiz_64bit maxssiz maxssiz_64bit maxtsiz maxtsiz_64bit
Tunable Value Expression Changes
maxdsiz 1073741824 Default Immed
maxdsiz_64bit 4294967296 Default Immed
maxssiz 8388608 Default Immed
maxssiz_64bit 268435456 Default Immed
maxtsiz 100663296 Default Immed
maxtsiz_64bit 1073741824 Default Immed
PLZ HELP
P.S. this thread has been moevd from General to HP-UX > languages. - Hp forum Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2014 11:43 AM
09-06-2014 11:43 AM
Re: gawk error memory allocation error
I would bump maxdsiz_64bit from 4GB to 16GB.
This limit will allow programs to allocate large amounts of space.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2014 03:25 PM - edited 09-06-2014 03:27 PM
09-06-2014 03:25 PM - edited 09-06-2014 03:27 PM
Re: gawk error memory allocation error
>Infile has more than 400 million records, ... outfile will be reduced to 60 million.
Can you break up the file and then combine the results?
Is gawk a 32 or 64 program? If the former you'll need to increase maxdsiz to 4 GB.
And you'll have to use chatr(1) to take advantage.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2014 10:24 PM
09-07-2014 10:24 PM
Re: gawk error memory allocation error
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2014 10:26 PM
09-07-2014 10:26 PM
Re: gawk error memory allocation error
$ kcusage
Tunable Usage / Setting
=============================================
filecache_max 669466624 / 32665481216
maxdsiz 1054195712 / 4294963200
maxdsiz_64bit 46727168 / 17179869184
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-08-2014 03:55 AM - edited 09-08-2014 04:00 AM
09-08-2014 03:55 AM - edited 09-08-2014 04:00 AM
Re: gawk error memory allocation error
>Changed the same but still the error, reboot also done
Reboot not needed since kctune(1m) says "immediate".
As I mentioned above, chatr(1) or relinking with -N must be used to get > 1 GB in a 32 bit app.
What does this show: file /path-to-executable/gawk
These may help:
http://h30499.www3.hp.com/t5/White-Papers/32bits-virtual-addressing-and-Memory-Windows/m-p/2442383
http://h30499.www3.hp.com/t5/Languages-and-Scripting/Out-of-memory/m-p/4935279#M33135
http://h30499.www3.hp.com/t5/Languages-and-Scripting/chatr-and-C/m-p/3900953
The last one implies that if this is a Integrity executable, then you'll need to build and relink gawk with -N.