Illumos::SMF - SMF control object
use Illumos::SMF; ... my $smf = Illumos::SMF->new(zonesupport => 1, debug => 0); ...
object to manage SMF
if enabled, SMF can handle FMRI in zones (requires Illumos::Zones)
Illumos::Zones
print debug information to STDERR
refreshs the instance
$smf->refreshFMRI();
lists all child entities of a FMRI. lists instances only if 'instancesonly' is set.
$smf->listFMRI($fmri, { zonename => $zone, instancesonly => 1 }); $smf->listFMRI($fmri, { instancesonly => 1 });
checks if the FMRI exists
$smf->fmriExists($fmri, { zonename => $zone }); $smf->fmriExists($fmri);
returns the state of the FMRI
$smf->fmriState($fmri, { zonename => $zone }); $smf->fmriState($fmri);
checks if the FRMI is online
$smf->fmriOnline($fmri, { zonename => $zone }); $smf->fmriOnline($fmri);
enables the FMRI
$smf->enable($fmri, { zonename => $zone }); $smf->enable($fmri);
disables the FMRI
$smf->disable($fmri, { zonename => $zone }); $smf->disable($fmri);
restarts the FMRI
$smf->restart($fmri, { zonename => $zone }); $smf->restart($fmri);
adds an FMRI to SFM
$smf->addFMRI($fmri, { zonename => $zone }); $smf->addFMRI($fmri);
removes an FMRI from SMF
$smf->deleteFMRI($fmri, { zonename => $zone }); $smf->deleteFMRI($fmri);
adds an instance to an existing FMRI
$smf->addInstance($fmri, $instance, { zonename => $zone }); $smf->addInstance($fmri, $instance);
returns a list of property groups
$smf->getPropertyGroups($fmri, { zonename => $zone }); $smf->addInstance($fmri);
returns whether a property exists or not
$smf->propertyExists($fmri, $prop, { zonename => $zone }); $smf->propertyExists($fmri, $prop);
returns whether a property group exists or not
$smf->propertyGroupExists($fmri, $pg, { zonename => $zone }); $smf->propertyGroupExists($fmri, $pg);
adds a property group to a FMRI. $type defaults to 'application' if not given.
$type
$smf->addPropertyGroup($fmri, $pg, $type, { zonename => $zone }); $smf->addPropertyGroup($fmri, $pg, $type);
deletes a property group from a FMRI
$smf->deletePropertyGroup($fmri, $pg, { zonename => $zone }); $smf->deletePropertyGroup($fmri, $pg);
sets a property of a FMRI. $type is guessed if not given.
$smf->setProperty($fmri, $prop, $value, $type, { zonename => $zone }); $smf->setProperty($fmri, $prop, $value, $type);
sets a set of properties of a property group of a FMRI
$smf->setProperties($fmri, { %props }, { zonename => $zone }); $smf->setProperties($fmri, { %props }, $type);
gets the set of properties of a property group of a FMRI
$smf->getProperties($fmri, $pg, { zonename => $zone }); $smf->getProperties($fmri, $pg, $type);
sets all properties of a FMRI
$smf->setFMRIProperties($fmri, { %props }, { zonename => $zone }); $smf->setFMRIProperties($fmri, { %props });
gets all properties of a FMRI
$smf->getFMRIProperties($fmri, { zonename => $zone }); $smf->getFMRIProperties($fmri);
Copyright (c) 2015 by OETIKER+PARTNER AG. All rights reserved.
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
Dominik Hassler <hadfl@cpan.org>, Tobias Oetiker <tobi@oetiker.ch>
2015-05-07 had Initial Version
To install Illumos::SMF, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Illumos::SMF
CPAN shell
perl -MCPAN -e shell install Illumos::SMF
For more information on module installation, please visit the detailed CPAN module installation guide.