Lustre::Info - Perl interface to Lustre procfs information
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"; }
"Lustre::Info" provides an object interface to obtain various information about lustre
Creates a new Lustre::Info object.
Returns an array-ref with all OSTs hosted by this OSS (List will be empty on non-OST hosts)
Returns an array-ref with all known exports/nids/clients on this OSS.
Returns an array-ref with all known MDTs hosted by this MDS (Lustre < 2.0 installations will never have more than one MDT)
Returns TRUE if this server acts as an OST
Returns TRUE if this server acts as an MDS
Returns TRUE if this server is a MDT
Return currently running lustre (kernel module) version
Returns a blessed reference to Lustre::Info::OST
Lustre::Info::OST
Returns a blessed reference to Lustre::Info::Export
Lustre::Info::Export
Returns a blessed reference to Lustre::Info::MDT
Lustre::Info::MDT
Lustre::Info::* is in its early stages, the provided API should not be considered as 'stable'.
Copyright (C) 2010, Adrian Ulrich <adrian.ulrich@id.ethz.ch>
Lustre::Info::OST, Lustre::Info::Export, Lustre::Info::MDT, Lustre::LFS, http://www.lustre.org
To install Lustre::Info, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Lustre::Info
CPAN shell
perl -MCPAN -e shell install Lustre::Info
For more information on module installation, please visit the detailed CPAN module installation guide.