cheekoo has asked for the wisdom of the Perl Monks concerning the following question:

Hi All!!
This is my first query here, I will be able to solve my problem here hopefully... I have AIX 5.3 and perl 5.8.2.60 installed on it. I am not able to set the data segment to unlimited using perl. I have a perl script that starts a Java process, for that process, I need unlimited data segment. I tried :
[root@laka09]/ # ulimit -a time(seconds) unlimited file(blocks) unlimited data(kbytes) unlimited stack(kbytes) 4194304 memory(kbytes) unlimited coredump(blocks) unlimited nofiles(descriptors) unlimited
This is by default.

Now i try to run the following
# ! /usr/bin/perl system("ulimit -a"); The result is : time(seconds) unlimited file(blocks) unlimited data(kbytes) 2097152 stack(kbytes) 4194304 memory(kbytes) unlimited coredump(blocks) unlimited nofiles(descriptors) unlimited
I saw somewhere BSD-Resource-1.28 could help me out, but i wasnot able to get it running.
[root@laka09]/results/sumit/127711/jdk142/lib/perl/BSD-Resource-1.28 # perl Makefile.PL Configuring BSD::Resource... Checking whether you have certain header files... [cccmd = cc_r -c -o tmp245954.o -I/usr/opt/perl5/lib/5.8.2/aix-thread- +multi/CORE -D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=16 +384 -qnoansialias -DUSE_NATIVE_DLOPEN -DNEED_PTHREAD_INIT -q32 -D_LAR +GE_FILES -qlonglong] [cccmd = cc_r -c -o tmp245954.o -I/usr/opt/perl5/lib/5.8.2/aix-thread- +multi/CORE -D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=16 +384 -qnoansialias -DUSE_NATIVE_DLOPEN -DNEED_PTHREAD_INIT -q32 -D_LAR +GE_FILES -qlonglong] Your operating system does not seem to have <sys/resource.h> or <sys/r +usage.h>. (Run "perl Makefile.PL" with the environment variable VERBOSE set to 1 + (one) too see in more detail what went wrong.) There is no way BSD::Resource is going to work. I am awfully sorry but I cannot go further. Aborting configuration of BSD::Resource.

Please help!
Cheekoo

I tried this, see:
[root@laka09]/results/sumit/127711/jdk142/lib/perl # ! /usr/bin/perl system("ulimit -a"); system("ulimit -d unlimited"); system("ulimit -a"); time(seconds) unlimited file(blocks) unlimited data(kbytes) 2097152 stack(kbytes) 4194304 memory(kbytes) unlimited coredump(blocks) unlimited nofiles(descriptors) unlimited time(seconds) unlimited file(blocks) unlimited data(kbytes) 2097152 stack(kbytes) 4194304 memory(kbytes) unlimited coredump(blocks) unlimited nofiles(descriptors) unlimited

Replies are listed 'Best First'.
Re: ulimit value not getting set on AIX
by Anonymous Monk on Nov 17, 2007 at 11:52 UTC
    Try
    system "ulimit .... ; that which needs ulimit"