Slaughter::Info::linux - Determine information about a Linux host.
This module is the GNU/Linux version of the Slaughter information-gathering module.
Modules beneath the Slaughter::Info namespace are loaded when slaughter is executed, they are used to populate a hash with information about the current host.
Slaughter::Info
This module is loaded only on linux systems, and will determine such details as the local hostname, the free RAM, any IP addresses, etc.
The correct information-gathering module is loaded at run-time via the use of the $^O variable, and if no system-specific module is available then the generic Slaughter::Info::generic module is used as a fall-back.
$^O
The information discovered can be dumped by running slaughter
slaughter
~# slaughter --dump
Usage of this module is as follows:
use Slaughter::Info::linux; my $obj = Slaughter::Info::linux->new(); my $data = $obj->getInformation(); # use info now .. print "We have software RAID\n" if ( $data->{'softwareraid'} );
When this module is used an attempt is also made to load the module Slaughter::Info::Local::linux - if that succeeds it will be used to augment the information discovered and made available to slaughter policies.
Slaughter::Info::Local::linux
Now follows documentation on the available methods.
Create a new instance of this object.
This function retrieves meta-information about the current host.
The return value is a hash-reference of data determined dynamically.
Steve Kemp <steve@steve.org.uk>
Copyright (c) 2010-2015 by Steve Kemp. All rights reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The LICENSE file contains the full text of the license.
To install App::Slaughter, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::Slaughter
CPAN shell
perl -MCPAN -e shell install App::Slaughter
For more information on module installation, please visit the detailed CPAN module installation guide.