AFS
view release on metacpan - search on metacpan
view release on metacpan or search on metacpan
examples/v2/vos/listvolume view on Meta::CPAN
#!/usr/local/bin/perl
use blib;
use strict;
use warnings;
use AFS::VOS;
use Time::localtime;
my ($vos, $volume, $Debugging);
$Debugging = 0;
if ($ARGV[0] eq '-d') { $Debugging = 1; shift; }
die "Usage: $0 volume\n" if $#ARGV != 0;
$volume = shift;
$vos = AFS::VOS->new;
$AFS::CODE and print "AFS::CODE = $AFS::CODE\n";
my $vollist = $vos->listvolume($volume);
$AFS::CODE and print "AFS::CODE = $AFS::CODE\n";
$Debugging && print_debug($vollist) && exit;
print_volume($vollist);
sub print_volume {
my $vollist = shift;
print "$vollist->{name} \t$vollist->{parentID} $vollist->{type} \t $vollist->{size} K $vollist->{inUse}\n";
print "\t$vollist->{server} $vollist->{partition}\n";
print "\tRWrite $vollist->{parentID} ROnly $vollist->{cloneID} Backup $vollist->{backupID}\n";
print "\tMaxQuota $vollist->{maxquota} K\n";
print "\tCreation ", ctime($vollist->{creationDate}), "\n";
print "\tCopy ", ctime($vollist->{copyDate}), "\n";
print "\tBackup ", ctime($vollist->{backupDate}), "\n";
print "\tLast Access ", ctime($vollist->{accessDate}), "\n";
print "\tLast Update ", ctime($vollist->{updateDate}), "\n";
print "\t$vollist->{dayUse} accesses in the past day (i.e., vnode references)\n";
}
sub print_debug {
my $vollist = shift;
foreach my $key (sort keys %{$vollist}) {
printf("%20s %s\n", $key, $vollist->{$key});
}
print "\n\n";
}
view all matches for this distributionview release on metacpan - search on metacpan
( run in 0.499 second using v1.00-cache-2.02-grep-82fe00e-cpan-2c419f77a38b )