[daip] install.pl - more reliable memory detection for solaris

Eric Greisen egreisen at nrao.edu
Wed May 3 10:22:16 EDT 2006


Thanks

                                        # Solaris
if (!$mem) {
    if ( -f "/usr/sbin/prtdiag") {
       open(FOO, "/usr/sbin/prtdiag 2>/dev/null |");
       while (<FOO>) {
          if (/memory size: *([0-9]+) *megabytes/i) {
             $mem = $1 * 1024;
             last;
          }
       }
       close(FOO);
   }
}

is what I actually put in - otherwise it tries to open a file which on
non_solaris machines is likely to be missing.  This is an old error in
our code

Eric Greisen




More information about the Daip mailing list