phrostyboi
2006-05-23 03:57:05 UTC
I'm having some trouble with getting purgeable space to display using
volscgi, the code is fairly similar to the sample volscgi script, but with
a purgeablespace part added...
# Create an HTML table based on the values from the db
#
print "<table border><TD>";
print "<tr><B><th>Description</th><th>Total Space</th><th>Free
Space</th><th>Block Size</th><th>Total Dir<th/></tr>";
my $vm;
if ($] < 5.006) {
$vm = UCSExt->new("UCX:Volumemgr");
} else {
$vm = Perl2UCS->new("UCX:Volumemgr");
}
my $db = $vm->{"Volumes"}; # fails for the first time in mod_perl
my $retVal1 = $db->reset();
$retVal1 = $db->hasMoreElements();
do
{
my $retVal2 = $db->Next();
my $retVal3 = $retVal2->{"Name"};
my $tb = $retVal2->{"TotalSpace"};
my $fb = $retVal2->{"PurgeableSpace"};
print "<tr><td> ";
print $retVal3;
print "</td>";
print "<td>";
print $tb;
print "</td>";
print "<td>";
print $fb;
print "</td><td>";
my $mt = $retVal2->{"BlockSize"};
print $mt;
print "</td><td>";
$mt = $retVal2->{"TotalDir"};
print $mt;
print "</td></tr>";
$retVal1 = $db->hasMoreElements();
} while ($retVal1);
print "</table>";
I'd expect this to fill in the 'freespace' column with the purgeable space
values, but all i get is empty table spaces, there is a PurgeableSpace
variable available, but it doesnt seem to work with perl?
volscgi, the code is fairly similar to the sample volscgi script, but with
a purgeablespace part added...
# Create an HTML table based on the values from the db
#
print "<table border><TD>";
print "<tr><B><th>Description</th><th>Total Space</th><th>Free
Space</th><th>Block Size</th><th>Total Dir<th/></tr>";
my $vm;
if ($] < 5.006) {
$vm = UCSExt->new("UCX:Volumemgr");
} else {
$vm = Perl2UCS->new("UCX:Volumemgr");
}
my $db = $vm->{"Volumes"}; # fails for the first time in mod_perl
my $retVal1 = $db->reset();
$retVal1 = $db->hasMoreElements();
do
{
my $retVal2 = $db->Next();
my $retVal3 = $retVal2->{"Name"};
my $tb = $retVal2->{"TotalSpace"};
my $fb = $retVal2->{"PurgeableSpace"};
print "<tr><td> ";
print $retVal3;
print "</td>";
print "<td>";
print $tb;
print "</td>";
print "<td>";
print $fb;
print "</td><td>";
my $mt = $retVal2->{"BlockSize"};
print $mt;
print "</td><td>";
$mt = $retVal2->{"TotalDir"};
print $mt;
print "</td></tr>";
$retVal1 = $db->hasMoreElements();
} while ($retVal1);
print "</table>";
I'd expect this to fill in the 'freespace' column with the purgeable space
values, but all i get is empty table spaces, there is a PurgeableSpace
variable available, but it doesnt seem to work with perl?