view release on metacpan or search on metacpan
examples/afsmonitor view on Meta::CPAN
#
# Copyright © 2004 Alf Wachsmann <alfw@slac.stanford.edu> and
# Elizabeth Cassell <e_a_c@mailsnare.net>
#
# $Revision: 1.14 $ $Date: 2004/10/22 15:04:40 $ $Author: alfw $
#
use blib;
use strict;
use AFS::Monitor;
use Data::Dumper;
my @cmhosts = ("www.openafs.org", "virtue.openafs.org", "andrew.e.kth.se"); # cache manager machines to monitor
my @fshosts = ("www.openafs.org", "virtue.openafs.org", "andrew.e.kth.se"); # file server machines to monitor
my $configfilename = 'configs/configfile';
my $badconfigfile = 'configs/badconfig';
my $outputfilename = 'debug_out/outputfile';
my @tests; # choose which tests to run
$tests[1] = 1; # test of FS afsmonitor with detailed output file
$tests[2] = 2; # test of CM afsmonitor
examples/afsmonitor view on Meta::CPAN
if ($AFS::CODE) {
print "Error case: ", ref($fsinfo), "\n" if (defined($fsinfo));
print "Error case: ", ref($cminfo), "\n" if (defined($cminfo));
# die("Error: AFS::CODE = $AFS::CODE (", ($AFS::CODE+0), ")\n");
print "Error: AFS::CODE = $AFS::CODE (", ($AFS::CODE+0), ")\n";
return;
}
if ($showdump) {
local $Data::Dumper::Indent = 1;
local $Data::Dumper::Quotekeys = 0;
local $Data::Dumper::Maxdepth = 2;
local $Data::Dumper::Varname = "File Servers ";
print Dumper($fsinfo);
local $Data::Dumper::Varname = "Cache Managers ";
print Dumper($cminfo);
}
if ($readable) {
print "\nFile Servers:\n";
foreach my $host (@$fsinfo) {
print "\nFS HOSTNAME: $host->{hostName}\n";
if ($host->{probeOK}) {
print " probe successful\n";
examples/cmdebug view on Meta::CPAN
#
# Copyright © 2004 Alf Wachsmann <alfw@slac.stanford.edu> and
# Elizabeth Cassell <e_a_c@mailsnare.net>
#
# $Revision: 1.8 $ $Date: 2006/07/05 22:25:10 $ $Author: alfw $
#
use blib;
use strict;
use AFS::Monitor qw(cmdebug constant);
use Data::Dumper;
#my $server = "virtue.openafs.org";
my $server = "afs04.slac.stanford.edu";
my $port = 7001;
my @tests; # choose which tests to run
$tests[1] = 1; # test of server $server, port $port, long output
$tests[2] = 0; # test of server $server, no port
$tests[3] = 0; # test of nonexistant server
$tests[4] = 0; # test of server $server, bad port
examples/cmdebug view on Meta::CPAN
if ($AFS::CODE) {
print "Error case: ", ref($l), "\n" if (defined($l));
print "Error case: ", ref($c), "\n" if (defined($c));
# die("Error: AFS::CODE = $AFS::CODE (", ($AFS::CODE+0), ")\n");
print "Error: AFS::CODE = $AFS::CODE (", ($AFS::CODE+0), ")\n";
return;
}
if ($showdump) {
local $Data::Dumper::Quotekeys = 0;
local $Data::Dumper::Sortkeys = 1;
local $Data::Dumper::Varname = "Locks";
local $Data::Dumper::Maxdepth = 3;
local $Data::Dumper::Indent = 1;
print Dumper($l);
local $Data::Dumper::Maxdepth = 1;
local $Data::Dumper::Indent = 0;
local $Data::Dumper::Varname = "Cache Entries";
print Dumper($c);
}
if ($formatted) {
foreach my $lock (@$l) {
printf("Lock %s status: ", $lock->{name});
print_lock($lock->{lock});
print "\n";
}
examples/rxdebug view on Meta::CPAN
#
# Copyright © 2004 Alf Wachsmann <alfw@slac.stanford.edu> and
# Elizabeth Cassell <e_a_c@mailsnare.net>
#
# $Revision: 1.9 $ $Date: 2004/10/22 15:04:40 $ $Author: alfw $
#
use blib;
use strict;
use AFS::Monitor qw(rxdebug constant);
use Data::Dumper;
my $servers = 'virtue.openafs.org'; # machine to run this on
my $port = 7001; # port to run this on
my $onlyhost = 'andrew.e.kth.se'; # some of the tests will show only connections from this host
my $onlyport = 7000; # some of the tests will show only connections on this port
my $onlyauth = 'auth'; # some of the tests will show only connections with this auth level
my @tests; # choose which tests to run
$tests[1] = 1; # prints version
$tests[2] = 0; # prints all peers and all non-dallying connections.
examples/scout view on Meta::CPAN
#
# Copyright © 2004 Alf Wachsmann <alfw@slac.stanford.edu> and
# Elizabeth Cassell <e_a_c@mailsnare.net>
#
# $Revision: 1.6 $ $Date: 2004/10/22 15:04:40 $ $Author: alfw $
#
use blib;
use strict;
use AFS::Monitor;
use Data::Dumper;
my @servers = ("virtue");
my $debugfile = "debug_out/debug";
my $basename = "openafs.org";
my @tests; # choose which tests to run
$tests[1] = 1; # blank
$tests[2] = 1; # blank
my $all = 0;
examples/scout view on Meta::CPAN
my $info = shift;
if ($AFS::CODE) {
print "Error case: ", ref($info), "\n" if (defined($info));
# die("Error: AFS::CODE = $AFS::CODE (", ($AFS::CODE+0), ")\n");
print "Error: AFS::CODE = $AFS::CODE (", ($AFS::CODE+0), ")\n";
return;
}
if ($showdump) {
local $Data::Dumper::Quotekeys = 0;
local $Data::Dumper::Sortkeys = 1;
local $Data::Dumper::Indent = 1;
local $Data::Dumper::Varname = "scout";
print Dumper($info);
}
if ($formatted) {
foreach my $connection (@$info) {
print $connection->{hostName}, "\n";
if ($connection->{probeOK}) {
print " Results:\n";
foreach my $stat (sort keys %{$connection->{stats}}) {
print " $stat $connection->{stats}->{$stat}\n";
examples/udebug view on Meta::CPAN
#
# Copyright © 2004 Alf Wachsmann <alfw@slac.stanford.edu> and
# Elizabeth Cassell <e_a_c@mailsnare.net>
#
# $Revision: 1.8 $ $Date: 2004/10/22 15:04:40 $ $Author: alfw $
#
use blib;
use strict;
use AFS::Monitor qw(udebug constant);
use Data::Dumper;
my $server = "virtue.openafs.org";
my $non_sync_server = "andrew.e.kth.se";
my $port = 7003;
my @tests; # choose which tests to run
$tests[1] = 0; # test of server $server, port $port, long output
$tests[2] = 0; # test of server $non_sync_server, port $port, short output
$tests[3] = 0; # test of server $non_sync_server, port $port, long output
$tests[4] = 0; # test of server $server, no port
examples/udebug view on Meta::CPAN
my $info = shift;
if ($AFS::CODE) {
print "Error case: ", ref($info), "\n" if (defined($info));
# die("Error: AFS::CODE = $AFS::CODE (", ($AFS::CODE+0), ")\n");
print "Error: AFS::CODE = $AFS::CODE (", ($AFS::CODE+0), ")\n";
return;
}
if ($showdump) {
local $Data::Dumper::Indent = 1;
local $Data::Dumper::Quotekeys = 0;
local $Data::Dumper::Sortkeys = 1;
print Dumper($info);
}
if ($formatted) {
my $diff;
if (exists $info->{interfaceAddr}) {
print "Host's addresses are: ", join(" ", @{$info->{interfaceAddr}}),
"\n";
}
examples/xstat_cm_test view on Meta::CPAN
#
# Copyright © 2004 Alf Wachsmann <alfw@slac.stanford.edu> and
# Elizabeth Cassell <e_a_c@mailsnare.net>
#
# $Revision: 1.8 $ $Date: 2006/05/31 16:22:51 $ $Author: alfw $
#
use blib;
use strict;
use AFS::Monitor qw(xstat_cm_test constant);
use Data::Dumper;
my @cmname = ("virtue.openafs.org", "andrew.e.kth.se");
my @collID = (0, 1, 2);
my @tests; # choose which tests to run
$tests[1] = 1; # test of cmname @cmname and collIDs @collID
$tests[2] = 0; # test of cmname but no collID
$tests[3] = 0; # test of single cmname with collID
$tests[4] = 0; # test of single cmname but no single collID
examples/xstat_cm_test view on Meta::CPAN
my $info = shift;
if ($AFS::CODE) {
print "Error case: ", ref($info), "\n" if (defined($info));
# die("Error: AFS::CODE = $AFS::CODE (", ($AFS::CODE+0), ")\n");
print "Error: AFS::CODE = $AFS::CODE (", ($AFS::CODE+0), ")\n";
return;
}
if ($showdump) {
local $Data::Dumper::Quotekeys = 0;
local $Data::Dumper::Sortkeys = 1;
local $Data::Dumper::Indent = 1;
local $Data::Dumper::Maxdepth = 2;
local $Data::Dumper::Varname = "xstat_cm_test";
print Dumper($info);
}
if ($formatted) {
foreach my $host (@$info) {
if ($host->{probeOK} == 0) {
printf("CM_Handler: Probe 1, collection %d to CM on '%s' failed\n",
$host->{collectionNumber},
$host->{hostName});
return;
examples/xstat_fs_test view on Meta::CPAN
# Copyright © 2004-2006
# Alf Wachsmann <alfw@slac.stanford.edu> and
# Elizabeth Cassell <e_a_c@mailsnare.net>
#
# $Revision: 1.8 $ $Date: 2006/07/05 22:25:10 $ $Author: alfw $
#
use blib;
use strict;
use AFS::Monitor qw(xstat_fs_test constant);
use Data::Dumper;
#my @fsname = ("virtue.openafs.org", "andrew.e.kth.se");
my @fsname = ("afs101.slac.stanford.edu");
my @collID = (0, 1, 2, 3);
my @tests; # choose which tests to run
$tests[1] = 0; # test of fsname @fsname and collIDs @collID
$tests[2] = 0; # test of fsname but no collID
$tests[3] = 1; # test of single fsname with collID 0
$tests[4] = 1; # test of single fsname with collID 1
examples/xstat_fs_test view on Meta::CPAN
my $info = shift;
if ($AFS::CODE) {
print "Error case: ", ref($info), "\n" if (defined($info));
# die("Error: AFS::CODE = $AFS::CODE (", ($AFS::CODE+0), ")\n");
print "Error: AFS::CODE = $AFS::CODE (", ($AFS::CODE+0), ")\n";
return;
}
if ($showdump) {
local $Data::Dumper::Quotekeys = 0;
local $Data::Dumper::Sortkeys = 1;
local $Data::Dumper::Indent = 1;
local $Data::Dumper::Varname = "xstat_fs_test";
local $Data::Dumper::Maxdepth = 2;
print Dumper($info);
}
if ($formatted) {
foreach my $host (@$info) {
print "\n------------------------------------------------------------\n";
if ($host->{probeOK} == 0) {
printf "FS_Handler: Probe 1 to File Server '$host->{hostName}' failed\n",
} elsif($host->{collectionNumber} == constant("AFS_XSTATSCOLL_CALL_INFO")) {
parse_CallInfo($host);