max no of open files with perl on solaris

Jim Levie jim at ENTROPHY-FREE.NET
Mon Dec 23 16:11:32 GMT 2002


On Mon, 2002-12-23 at 02:32, Ron Campbell wrote:
>  The following little perl script opens as many files as possible
> and then tells you how many it managed to open -
>
>
> $ cat   of.pl
> #!/usr/bin/perl
>
> $count = 0 ;
> while ( $count >= 0  ) {
>
>    $count++ ;
>    $FH = "FH" . "$count" ;
>    open $$FH , "/dev/null" or  last ;
>    }
>
>    print "\n $count File opens\n" ;
>
>
>
> Obviously, this is a rewrite of a C program which someone posted last
> week. Interesting thing is that, no matter what I try, I cant get
> more than 255 open files with perl on Solaris. I tried perl 5.6.1, 5.8
> Solaris 2.6, Solaris 9 - makes no difference.
>
I think it is fopen() on Solaris that has a documented limit of 256 open
files.
--
The instructions said to use Windows 98 or better, so I installed
RedHat.



More information about the MailScanner mailing list