# IBM_PROLOG_BEGIN_TAG # This is an automatically generated prolog. # # bos720 src/bos/usr/sbin/snappd/scripts/SetPage.pl 1.5 # # Licensed Materials - Property of IBM # # COPYRIGHT International Business Machines Corp. 2000,2002 # All Rights Reserved # # US Government Users Restricted Rights - Use, duplication or # disclosure restricted by GSA ADP Schedule Contract with IBM Corp. # # IBM_PROLOG_END_TAG # #!/usr/bin/perl -T # @(#)11 1.5 src/bos/usr/sbin/snappd/scripts/SetPage.pl, snapp, bos720 5/31/02 07:51:03 #------------------------------------------------------------------ #--------Page Space Setting Page for Snapp Program ----------- #------------------------------------------------------------------ #--------This page is used to execute the command to change the --- #--------size of the paging space in use now ----------- #------------------------------------------------------------------ $ENV{'PATH'} = '/bin:/usr/bin:/usr/sbin'; $temp = `/usr/sbin/lsdev -C | /usr/bin/grep Memory`; $temp =~ /([a-z0-9]+).*/g; $memoryID = $1; $temp = `/usr/sbin/lsattr -El $memoryID | /usr/bin/grep Total`; $temp =~ /[a-z\t\s]+([0-9]+).*/g; $totalMemSize = $1; $temp = `/usr/sbin/lsps -s | /usr/bin/grep MB`; $temp =~ /\s+([0-9]+).*/g; $pagingSpace = $1; $temp = `/usr/sbin/lsvg rootvg | /usr/bin/grep "FREE PP"`; ($temp, $temp1) = split(" megabyte", $temp); ($temp1, $temp) = split("FREE PPs", $temp); $temp =~ s/\s+//g; $temp =~ /[0-9]+.([0-9]+).*/g; $rootvgAvailable = $1; $recoSpace = `/usr/lib/assist/calc_pgspace recommended_ps`; #generate page, this page also includes a link to view the message that was returned open(OUTFILE,">/var/snapp/snapp.fres.tmp"); print OUTFILE < Manage System Paging Space 150 12 5 30 15 10 15 10 15 15 95 55 $recoSpace 10 130 60 15 70 EOXML close(OUTFILE); system("/usr/bin/cp /var/snapp/snapp.fres.tmp /var/snapp/snapp.fres");