Also punched out a web version.

#!/usr/bin/perl -T use strict; use warnings; use CGI qw/:standard/; # Clean up our UNIX environment # for more infor read perldoc perlsec $ENV{'PATH'} = '/bin:/usr/bin'; delete @ENV{qw(IFS CDPATH ENV BASH_ENV)}; my ($x,$pp,$mb,$fs,@MSG); print header,start_html; print "<h3><center><tt>AIX 512 byte block calculator</center></h3>\n", +br,hr,br; print start_form; print p,"From an AIX commandline type lsvg \<vgname>\n",br; print "You should see output looking something like the following:\n", +br; print p,"<pre> VOLUME GROUP: rootvg VG IDENTIFIER: 000345df7dda4 +98a VG STATE: active PP SIZE: 32 megabyte(s +) VG PERMISSION: read/write TOTAL PPs: 1084 (34688 m +egabytes) MAX LVs: 256 FREE PPs: 797 (25504 me +gabytes) LVs: 10 USED PPs: 287 (9184 meg +abytes) OPEN LVs: 8 QUORUM: 1 TOTAL PVs: 2 VG DESCRIPTORS: 3 STALE PVs: 0 STALE PPs: 0 ACTIVE PVs: 1 AUTO ON: yes MAX PPs per PV: 1016 MAX PVs: 32 </pre>",br; print p,"The fields we are interested in here are <b>PP SIZE</b>, and +<b>FREE PPs</b>\n",br; print "Enter the PP SIZE and the number of MB (Mega Bytes) you want to + enlarg your system by, below.\n",br; print "Enter the name of your filesystem in the final textfield and hi +t submit.\n",br; print "The AIX command that you will need to enter at the command line + as the root user will be displayed.\n",br; print p,"Physical Partition Size in MB\n",br; print textfield('PP'),br; print p,"Size to grow FS by in MB\n",br; print textfield('MB'),br; print p,"AIX Filesystem name\n",br; print textfield('FS'),p,submit; $pp=param('PP'); $mb=param('MB'); $fs=param('FS'); if ( $pp && $mb ) { print p,"<b>chfs -a size=+"; $x = ( $mb <= $pp ) ? print 2 * (1024 * $pp) : print (2 * (1024 * $mb)) - (2 * $pp); print " /$fs</b></tt>\n"; } else { print "",br; } print br,end_html;

In reply to Re: Get # of 512 byte blocks by tcf03
in thread Get # of 512 byte blocks by tcf03

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.