NAME
Lustre::Info - Perl interface to Lustre procfs information
SYNOPSIS
use strict;
use Lustre::Info;
my $l = Lustre::Info->new;
print "Host is an OST? ".($l->is_ost ? 'yes - running lustre '.$l->get_lustre_version : 'no')."\n";
if($l->is_ost) {
print "List of OSTs on this OSS:\n";
my @ost_list = @{$l->get_ost_list};
print join("", map { "\t$_\n" } @ost_list);
my $ost_ref = $l->get_ost($ost_list[0]);
print "OST ".$ost_ref->get_name." is hosted on ".$ost_ref->get_blockdevice."\n";
}
DESCRIPTION
"Lustre::Info" provides an object interface to obtain various information about lustre
CONSTRUCTOR
METHODS
- get_ost_list
-
Returns an array-ref with all OSTs hosted by this OSS (List will be empty on non-OST hosts)
- get_export_list
-
Returns an array-ref with all known exports/nids/clients on this OSS.
- get_mdt_list
-
Returns an array-ref with all known MDTs hosted by this MDS (Lustre < 2.0 installations will never have more than one MDT)
- is_ost
-
Returns TRUE if this server acts as an OST
- is_mds
-
Returns TRUE if this server acts as an MDS
- is_mdt
-
Returns TRUE if this server is a MDT
- get_lustre_version
-
Return currently running lustre (kernel module) version
- get_ost(OST_NAME)
-
Returns a blessed reference to
Lustre::Info::OST
- get_export(EXPORT_NAME)
-
Returns a blessed reference to
Lustre::Info::Export
- get_mdt(MDT_NAME)
-
Returns a blessed reference to
Lustre::Info::MDT
STATUS
Lustre::Info::* is in its early stages, the provided API should not be considered as 'stable'.
AUTHOR
Copyright (C) 2010, Adrian Ulrich <adrian.ulrich@id.ethz.ch>
SEE ALSO
Lustre::Info::OST, Lustre::Info::Export, Lustre::Info::MDT, Lustre::LFS, http://www.lustre.org