Okay, Red Hat always comes with Perl. I have a script which may work for
you. First start the server using the widgets inside of OpenDX. OpenDX must
already have its connection to the server in order to have a PID. My script
gets the PID and allots it the max allowable memory per the OS. It works
just fine in BSD. May also do for Linux as is often the case.

Put the script anywhere and call it like so...

perl hog_memory.pl

The script is here. Cut and paste. Then save as "hog_memory.pl".

<snip>
#!/usr/bin/perl
# Avoids out-of-memory error for OpenDX on BSD.
# Large data files exceed default datasize limit. This script will set
# per-process limits to ma ximum for these two already-running programs.
# Must have already have started the OpenDX server else there'll be no PID.

sub hog_memory {
    my @procs = @_;

    # Get max datasize from NetBSD.
    my @lines = split ' ', `sysctl proc | grep datasize.hard`;
    my $datasize_max = $lines[-1];

    foreach my $proc ( @procs ) {
        @lines = split "\n",  `ps -xa | grep $proc`;

        # May be more than one copy of editor running.
        foreach my $line ( @lines ) {
            next if $line =~ /ps -xa|grep/;
            my @line = split ' ', $line;
            print "Increasing datasize to maximum for process $line[4]\n";
            print `sysctl -w proc.$line[0].rlimit.datasize.soft=$datasize_max`, 
"\n";
        }
    }
}

hog_memory('dxexec');
</snip>

If you get an error, tell me exactly what it says and I'll do my best to repair 
the
script for Red Hat Linux. I had to write this for my Unix box and it has a full
four gigabytes! I have to run it every time I want to open a really large file. 
What
it does is increase the OS-allowed data size. It's a temporay, per-process fix.
Close the process or reboot and its gone.

Gan

Bernd Jäger wrote:
The System is a 1.2 GHz AMD Athlon with a red hat 9 Linux,
Kernelversion is 2.4.20-8

Heim/Bernd LuB12]$ dx -version
Open Visualization Data Explorer Executive, version 04.3.3000 (15:06:32,
Jun 17 2003)
Open Visualization Data Explorer User Interface, version 04.03.0000
(15:43:27, Jun 17 2003)
Open Visualization Data Explorer Script, 04.3.0000

I tryed to start with: dx -memory 900 and when starting a script, I get
the message:
SOCKET bufsize mismatch: rcf buffer (131070 262140) (for send too)

The "Message Window" shows in the second line:
Memory cache will use 314 MB (18 for small items, 296 for large)

Bernd

On Tue, 12 Oct 2004, David Thompson wrote:


You need to give full info when you do this then. Which OS are you
operating on. What are your user limits on the system. Which version
of OpenDX are you running.

David


There is 1GB memory available, so I can't see why OpenDX just uses
324 MB

Bernd.

--
.............................................................................
David L. Thompson                   Visualization and Imagery Solutions, Inc.
mailto:[EMAIL PROTECTED]    5515 Skyway Drive, Missoula, MT 59804
                                    Phone : (406)756-7472



--
  Bernd Jaeger, Institut fuer Physikalische Chemie, Universitaet Wien,
              Waehringer Strasse 42, A-1090 Vienna, Austria
              Tel.: +43-1-4277-52417, FAX: +43-1-4277-9524
------------------- mailto:[EMAIL PROTECTED] --------------------




--

 Mistera Sturno - Rarest Extinct Bird

 <(+)__       Gan Uesli Starling
  ((__/)=-    Kalamazoo, MI, USA
   `||`
    ++        http://starling.us

Reply via email to