Hallo, dies ist ein Test.
PWD: /www/data-lst1/unixsoft/unixsoft/kaempfer/.public_html
Running in File Mode
Relative path: ./../../../../../../usr/man/man8/svccfg.8
Real path: /usr/share/man/man8/svccfg.8
Zurück
'\" te .\" Copyright (c) 2011, 2023, Oracle and/or its affiliates. .TH svccfg 8 "21 Mar 2023" "Oracle Solaris 11.4" "System Administration Commands" .SH NAME svccfg \- import, export, and modify service configurations .SH SYNOPSIS .LP .nf \fB/usr/sbin/svccfg\fR [\fB-v\fR] [\fB-s\fR \fIFMRI\fR] .fi .LP .nf \fB/usr/sbin/svccfg\fR [\fB-v\fR] [\fB-s\fR \fIFMRI\fR] \fIsubcommand\fR [\fBargs\fR]... .fi .LP .nf \fB/usr/sbin/svccfg\fR [\fB-v\fR] [\fB-s\fR \fIFMRI\fR] \fB-f\fR \fIcommand-file\fR .fi .SH DESCRIPTION .sp .LP The \fBsvccfg\fR command manipulates data in the service configuration repository. \fBsvccfg\fR can be invoked interactively, with an individual subcommand, or by specifying a command file that contains a series of subcommands. .sp .LP Changes made to an existing service in the repository typically do not take effect for that service until the next time the service instance is refreshed. See the \fBrefresh\fR subcommand, below, or the \fBrefresh\fR subcommand in the \fBsvcadm\fR(8) man page for more details. .SH OPTIONS .sp .LP The following options are supported: .sp .ne 2 .mk .na \fB\fB-f\fR \fIcommand-file\fR\fR .ad .br .sp .6 .RS 4n Reads and executes \fBsvccfg\fR subcommands from \fIcommand-file\fR. .RE .sp .ne 2 .mk .na \fB\fB-s\fR \fIFMRI\fR\fR .ad .br .sp .6 .RS 4n Selects the entity indicated by \fIFMRI\fR (a fault management resource identifier) before executing any subcommands. If \fB-f\fR \fIcommand-file\fR is not provided and no subcommands are specified on the command line, then masked entities will be treated as non-existent. For more information, see the \fBsmf\fR(7) man page. .RE .sp .ne 2 .mk .na \fB\fB-v\fR\fR .ad .br .sp .6 .RS 4n Verbose. .RE .SH SUBCOMMANDS .sp .LP Subcommands are divided into the categories specified in the subsections that follow. .sp .LP All subcommands that accept \fIFMRI\fRs also accept abbreviated or globbed patterns. Instances and services can be abbreviated by specifying the instance name, or the trailing portion of the service name. For example, given the \fIFMRI\fR: .sp .in +2 .nf svc:/network/smtp:sendmail .fi .in -2 .sp .sp .LP All the following are valid abbreviations: .sp .in +2 .nf sendmail :sendmail smtp smtp:sendmail network/smtp .fi .in -2 .sp .sp .LP While the following are invalid: .sp .in +2 .nf mail network network/smt .fi .in -2 .sp .sp .LP Abbreviated forms of \fIFMRI\fRs are unstable, and should not be used in scripts or other permanent tools. If a pattern matches more than one instance or service, an error message is printed and no action is taken. .SS "General Subcommands" .sp .ne 2 .mk .na \fB\fBend\fR\fR .ad .br .na \fB\fBexit\fR\fR .ad .br .na \fB\fBquit\fR\fR .ad .br .sp .6 .RS 4n Exits immediately. .RE .sp .ne 2 .mk .na \fB\fBrepository\fR [\fB-p\fR \fIprefix\fR] \fIrepfile\fR\fR .ad .br .sp .6 .RS 4n Uses \fIrepfile\fR as a repository. By default, \fBsvccfg\fR uses the system repository. .sp Use the \fBrepository\fR subcommand only on files from the identical version of Oracle Solaris which is running in your system, including all SRUs. In other words, the version of the 'entire' package as reported by \fBpkg(1)\fR should match exactly. Do not use this subcommand with the system repository, \fB/etc/svc/repository.db\fR. .sp If you use \fBsvccfg repository\fR to pre-populate the SMF repository before deployment time, use \fB-p\fR option to specify the root prefix for the system standard location for manifests imported with \fBsvccfg import\fR. This prefix will be replaced by \fB/lib/svc/manifest\fR once the repository is on a live system. If manifests from your \fB-p\fR directory do not appear in a system standard location at runtime, the services associated with them will be removed. .RE .sp .ne 2 .mk .na \fB\fBset\fR [\fB-v\fR|\fB-V\fR]\fR .ad .br .sp .6 .RS 4n Sets optional behavior. If no options are specified, set displays the options currently in effect. .sp .ne 2 .mk .na \fB\fB-v\fR\fR .ad .br .sp .6 .RS 4n Turns on verbose mode. .RE .sp .ne 2 .mk .na \fB\fB-V\fR\fR .ad .br .sp .6 .RS 4n Turns off verbose mode. .RE .RE .SS "Service Manifest and Profile Subcommands" .sp .ne 2 .mk .na \fB\fBapply\fR [\fB-n\fR] \fIfile\fR | \fIdirectory\fR\fR .ad .br .sp .6 .RS 4n If the file is a service profile or manifest in a standard location or the directory is a standard location, apply the configuration to the layer of the SMF repository that corresponds to that location. .sp If a conflict exists between property values in the same profile or manifest layer, a message similar to the following is displayed and the configuration is not applied to the running snapshot: .sp .sp .in +2 .nf svccfg: svc:/service-name:instance-name: property group "pg-name" has a conflict. .fi .in -2 .sp If the file is a service profile or manifest in a non-standard location, apply the configuration to the admin layer of the SMF repository. .sp If the operand is a directory, all profiles found under that directory tree are applied. .sp The command fails if a specified file, or any file with a \fB.xml\fR extension found under a specified directory, is not a service profile. .sp Services, instances, property groups, and properties will be created as necessary. .sp If the type attribute of a property or property group is unspecified, an attempt will be made to determine the type from existing type settings or from the service template. If a type cannot be determined, a warning will be presented and the service will be skipped so inconsistent data will not be introduced into a service and instance. Non-existent services and instances are ignored. .sp To use the relaxed element definitions in a profile, the following definitions need to be added to the \fBDOCTYPE\fR entry: .sp .sp .in +2 .nf <!ENTITY % profile "INCLUDE"> <!ENTITY % manifest "IGNORE"> .fi .in -2 .sp Services and instances modified by the profile will be refreshed. If \fB-n\fR is specified, the profile is processed and no changes are applied to the SMF repository. Any syntax error found will be reported on stderr and an exit code of \fB1\fR will be returned. See \fBsmf\fR(7) for a description of service profiles. This command requires privileges to modify properties in the service and instance. See \fBsmf_security\fR(7) for the privileges required to modify properties. .RE .sp .ne 2 .mk .na \fB\fBextract\fR [\fB-a\fR] [\fB-l\fR \fIlayer\fR] [\fIfmri\fR] [\fI> file\fR] \fR .ad .br .sp .6 .RS 4n Displays a service profile for the specified FMRI or the whole system if an FMRI is not specified. .sp If \fB-l\fR is supplied, a list of layers can be selected from which to extract values. The \fB-l\fR option requires a layer name and takes the arguments: \fBmanifest\fR, \fBsystem-profile \fR, \fBenterprise-profile\fR, \fBsite-profile\fR, \fBnode-profile\fR, \fBsysconfig-profile\fR, \fBadmin\fR, \fBcurrent \fR, \fBall\fR. \fBcurrent\fR and \fBall\fR are synonyms, and select the highest-layer values. Multiple layers can be comma-separated or specified with multiple \fB-l\fR options. .sp If \fB-l\fR is not supplied, the default is \fB-l\fR \fBadmin,sysconfig-profile,node-profile,site-profile,enterprise-profile\fR. .sp If a property is defined in multiple selected layers, only the highest layer is exported in the profile. .sp Without the \fB-a\fR option, property groups containing protected information (identified by the presence of the \fBread_authorization\fR property\(emsee \fBsmf_security\fR(7)) will be extracted without their property values. When the \fB-a\fR option is specified, all values will be extracted. An error results if there are insufficient privileges to read these values. .sp If an FMRI is given and that FMRI is a service, the profile will contain customizations only for that service and the instances of the service. If the provided FMRI is an instance, the profile will contain customizations for the service and the instance provided. .RE .sp .ne 2 .mk .na \fB\fBexport\fR [\fB-a\fR] \fIservice_FMRI\fR [\fI>file\fR]\fR .ad .br .sp .6 .RS 4n The output from \fBsvccfg export\fR is similar to the following \fBsvccfg extract\fR command output. The difference is that \fBexport\fR generates a manifest, while \fBextract\fR generates a profile as described above. .sp .in +2 .nf svccfg extract -l current [-a] \fIservice_FMRI\fR [>\fIfile\fR] .fi .in -2 .sp .RE .sp .ne 2 .mk .na \fB\fBimport\fR [\fB-V\fR] [\fIfile\fR | \fIdirectory\fR]\fR .ad .br .sp .6 .RS 4n \fBsvccfg import\fR on a file in a subdirectory of \fB/lib/svc/manifest\fR invokes: \fBsvcadm restart manifest-import\fR. .sp Placing your manifests in a system-managed location and invoking \fBsvcadm restart manifest-import\fR to import them is the recommended practice. .sp \fBsvccfg import\fR on files in other locations imports their properties as administrative customization into the admin layer. It is equivalent to: \fBsvccfg apply\fR [\fIfile\fR | \fIdirectory\fR]. .RE .sp .ne 2 .mk .na \fB\fBinventory\fR \fIfile\fR\fR .ad .br .sp .6 .RS 4n If \fIfile\fR is determined to be a service manifest or profile, then the \fBFMRI\fRs of the services and instances the \fIfile\fR describes are printed. For each service, the \fBFMRI\fRs of its instances are displayed before the \fBFMRI\fR of the service. .RE .sp .ne 2 .mk .na \fB\fBvalidate\fR [\fIfile\fR | \fIfmri\fR]\fR .ad .br .sp .6 .RS 4n The \fBvalidate\fR subcommand can operate on a manifest file, an instance FMRI, or the current instance or snapshot entity selection. When an argument is specified, \fBsvccfg\fR will check to see whether the specified file exists. If the file exists, it will be validated. If a file of the specified name does not exist, the argument is treated as an FMRI pattern. If a conflict arises between a filename and an FMRI, use the \fBsvc:\fR and \fBfile:\fR prefixes to tell \fBsvccfg\fR how to interpret the argument. .sp When you specify a file, the file is processed in a manner similar to \fBimport\fR \fB-V\fR, but no changes are made to the repository. If any errors are detected, \fBsvccfg\fR displays the errors and exits with a nonzero exit status. .sp For an instance \fIfmri\fR, instance entity selection, or snapshot entity selection, the specified instance in its composed form (see "Properties and Property Groups" in \fBsmf\fR(7)) will be validated against template data in the repository. Instance FMRIs and instance entity selections use the "running" snapshot for validation. Warnings will be issued for all template violations. See \fBsmf_template\fR(7) for a description of templates. .RE .SS "Entity Selection, Modification, and Navigation Subcommands" .sp .LP An "entity" refers to a scope, service, or service instance. .sp .ne 2 .mk .na \fB\fBadd\fR \fIname\fR\fR .ad .br .sp .6 .RS 4n A new entity with the given name is created as a child of the current selection. See \fBsmf_security\fR(7) for the privileges required to create entities. .RE .sp .ne 2 .mk .na \fB\fBdelete\fR [\fB-f\fR] \fB{\fIname\fR | \fIfmri\fR}\fR\fR .ad .br .sp .6 .RS 4n The named child of the current selection or the entity specified by \fIfmri\fR is deleted. Attempts to delete service instances in the "online" or "degraded" state will fail unless the \fB-f\fR flag is specified. If a service or service instance has a "dependents" property group of type "framework", then for each of its properties with type "astring" or "fmri", if the property has a single value which names a service or service instance then the dependency property group in the indicated service or service instance with the same name as the property will be deleted. See \fBsmf_security\fR(7) for the privileges required to delete service configurations. .sp Invoking the \fBdelete\fR subcommand with an FMRI that identifies a service with a manifest in a standard location only masks, and does not delete, that service's definition. To delete a service, you must delete its manifest, then restart the manifest-import service with the following command: .sp .sp .in +2 .nf # \fBsvcadm restart manifest-import\fR .fi .in -2 .sp Note that reimporting a manifest does not remove a mask. .sp Use the \fBlistcust\fR subcommand with the \fB-M\fR option to list masked services. See \fBEXAMPLES\fR for an example of unmasking a service. .sp See \fBsmf\fR(7) for a description of the Oracle Solaris service management facility. .RE .sp .ne 2 .mk .na \fB\fBlist\fR [\fIpattern\fR]\fR .ad .br .sp .6 .RS 4n The child entities of the current selection whose names match the glob pattern \fIpattern\fR are displayed (see \fBfnmatch\fR(7)). ':properties' is also listed for property-bearing entities, namely services and service instances. .RE .sp .ne 2 .mk .na \fB\fBrefresh\fR\fR .ad .br .sp .6 .RS 4n Commit the values from the current configuration to the running snapshot, making them available for use by the currently selected instance. If the repository subcommand has not been used to select a repository, direct the instance's restarter to reread the updated configuration. If the selection is a service, all instances of the service will be refreshed. .RE .sp .ne 2 .mk .na \fB\fBselect\fR {\fIname\fR | \fIfmri\fR}\fR .ad .br .sp .6 .RS 4n If the argument names a child of the current selection, it becomes the current selection. Otherwise, the argument is interpreted as an \fBFMRI\fR and the entity that the argument specifies becomes the current selection. .RE .sp .ne 2 .mk .na \fB\fBunselect\fR\fR .ad .br .sp .6 .RS 4n The parent of the current selection becomes the current selection. .RE .SS "Property Inspection and Modification Subcommands" .sp .ne 2 .mk .na \fB\fBaddpg\fR \fIname\fR \fItype\fR [\fIflags\fR]\fR .ad .br .sp .6 .RS 4n Adds a property group with the given \fIname\fR and \fItype\fR (where, a type of \fBapplication\fR for application data is recommended) to the current selection. \fIflags\fR is a string of characters which designates the flags with which to create the property group. 'P' represents \fBSCF_PG_FLAG_NONPERSISTENT\fR (see \fBscf_service_add_pg\fR(3SCF)). See \fBsmf_security\fR(7) for the privileges required to create property groups. .sp If \fB-G\fR option is supplied, the specified argument is used as the property group name and may not specify a pattern. When not using the \fB-G\fR option, the property group name must be encoded if a reserved character is used (see \fBsmf\fR(7)). Specifying multiple \fB-G\fR arguments will create a nested property group. The parent property group must always exist, and the property group hierarchy will be traversed in the order the \fB-G\fR options appear. .RE .sp .ne 2 .mk .na \fB\fBaddpropvalue\fR \fB-G\fR \fBpg\fR [\fB-G\fR \fBpg\fR ...] \fB-P\fR \fIname\fR [\fB-T\fR \fBtype\fR] \fBvalue\fR\fR .ad .br .na \fB\fBaddpropvalue\fR \fBpg/name\fR [\fBtype\fR:] \fBvalue\fR\fR .ad .br .sp .6 .RS 4n Adds the given value to a property. If \fItype\fR is given and the property exists, then if \fItype\fR does not agree with the property's \fItype\fR, the subcommand fails. If the \fIpg\fR does not exist, \fBaddpropvalue\fR will create one if it can find the \fIpg\fR type and flags in the template definitions. If the selection is an instance, \fBaddpropvalue\fR will look for the \fIpg\fR type and flags in the service before looking up the template definitions. If no \fIpg\fR type and flags are found, found, the subcommand will fail. The value may be enclosed in double-quotes. When so enclosed, any character preceded by a backslash will be passed through with no additional interpretation or special meaning. String values containing whitespace, double-quotes or backslashes must be enclosed by double-quotes and the contained double-quotes and backslashes must be quoted by backslashes. When invoked non-interactively, care must be taken to ensure that your shell quoting conventions do not consume the required double quotes and backslashes. Non-existent properties are created, in which case the \fItype\fR specifier must be present. See the \fBsmf\fR(7) man page for a list of available property types. See the \fBsmf_security\fR(7) for the privileges required to modify properties. The new value will be appended to the end of the list of property values associated with the property. .sp If the \fB-G\fR option is supplied, the specified argument is used as the property group name and may not specify a pattern. When not using the \fB-G\fR option, the property group name must be encoded if a reserved character is used. When multiple \fB-G\fR options appear then the options indicate how to traverse the property group hierarchy. .sp If \fB-P\fR option is supplied, the specified argument is used as the property name and may not specify a pattern. When not using the \fB-P\fR option, the property name must be encoded if a reserved character is used. For more information, see the \fBsmf\fR(7) man page. .sp If \fB-T\fR option is supplied, the specified argument is used as the property's type and may not specify a pattern. .RE .sp .ne 2 .mk .na \fB\fBdecode\fR [\fB-n\fR] \fBname\fR\fR .ad .br .sp .6 .RS 4n Decode the given name as per RFC 3986 guidelines. .sp If the \fB-n\fR option is supplied, the newline at the end of the string is omitted from the output. .RE .sp .ne 2 .mk .na \fB\fBdelcust\fR [\fB-M\fR] [\fB-G\fR \fBpg\fR [\fB-G\fR \fBpg\fR ...] [\fB-P\fR \fBname\fR]]\fR .ad .br .na \fB\fBdelcust\fR [\fB-M\fR] [\fBpattern\fR]\fR .ad .br .sp .6 .RS 4n Delete any administrative customizations for the current selection. If an argument is supplied, it is taken as a glob pattern and only property groups and properties with names that match the argument are deleted. .sp If there is no current selection, no changes are made and the subcommand fails. .sp If \fB-M\fR is supplied, delete only masked entities. .sp To see what customizations \fBdelcust\fR would remove, use \fBlistcust\fR with the same options. As \fBdelcust\fR can potentially remove all administrative customizations on the current selection, always run \fBlistcust\fR first to determine you are removing what you intend to. .sp If \fB-G\fR is supplied, the specified argument is used as the property group name and may not specify a pattern. When not using the \fB-G\fR option the property group name must be encoded if a reserved character is used. When multiple \fB-G\fR options appear then the options indicate how to traverse the property group hierarchy. .sp If \fB-P\fR is supplied, the specified argument is used as the property name and may not specify a pattern. When not using the \fB-P\fR option, the property name must be encoded if a reserved character is used. For more information, see the \fBsmf\fR(7) man page. .RE .sp .ne 2 .mk .na \fB\fBdelpg\fR \fB-G\fR \fIname\fR [\fB-G\fR \fIname\fR ...]\fR .ad .br .na \fB\fBdelpg\fR \fIname\fR\fR .ad .br .sp .6 .RS 4n Deletes the property group \fIname\fR of the current selection. See \fBsmf_security\fR(7) for the privileges required to delete property groups. .sp If the property group is backed by a manifest or profile, it is masked. See \fBsmf\fR(7). .sp If \fB-G\fR is supplied, the specified argument is used as the property group name and may not specify a pattern. When not using the \fB-G\fR option the property group name must be encoded if a reserved character is used. When multiple \fB-G\fR options appear then the options indicate how to traverse the property group hierarchy. .RE .sp .ne 2 .mk .na \fB\fBdelprop\fR \fB-G\fR \fBpg\fR [\fB-G\fR \fBpg\fR ...] [\fB-P\fR \fIname\fR]\fR .ad .br .na \fB\fBdelprop\fR \fIpg\fR[\fI/name\fR]\fR .ad .br .sp .6 .RS 4n Deletes the named property group or property of the current selection. See \fBsmf_security\fR(7) for the privileges required to delete properties. .sp If \fB-G\fR is supplied, the specified argument is used as the property group name and may not specify a pattern. When not using the \fB-G\fR option the property group name must be encoded if a reserved character is used. When multiple \fB-G\fR options appear then the options indicate how to traverse the property group hierarchy. .sp If \fB-P\fR is supplied, the specified argument is used as the property name and may not specify a pattern. When not using the \fB-P\fR option, the property name must be encoded if a reserved character is used. For more information, see the \fBsmf\fR(7) man page. .RE .sp .ne 2 .mk .na \fB\fBdelpropvalue\fR \fB-G\fR \fBpg\fR [\fB-G\fR \fBpg\fR ...] \fB-P\fR \fIname\fR \fIglobpattern\fR\fR .ad .br .na \fB\fBdelpropvalue\fR \fIpg/name\fR \fIglobpattern\fR\fR .ad .br .sp .6 .RS 4n Deletes all values matching the given \fIglob\fR pattern in the named property. Succeeds even if no values match. See the \fBsmf_security\fR(7) man page for the privileges required to modify properties. .sp If \fB-G\fR is supplied, the specified argument is used as the property group name and may not specify a pattern. When not using the \fB-G\fR option the property group name must be encoded if a reserved character is used. When multiple \fB-G\fR options appear then the options indicate how to traverse the property group hierarchy. .sp If \fB-P\fR is supplied, the specified argument is used as the property name and may not specify a pattern. When not using the \fB-P\fR option, the property name must be encoded if a reserved character is used. For more information, see the \fBsmf\fR(7) man page. .RE .sp .ne 2 .mk .na \fB\fBdescribe\fR [\fB-v\fR] [\fB-t\fR] [\fB-G\fR \fIpropertygroup\fR [\fB-G\fR \fIpropertygroup\fR ...] [\fB-P\fR \fBproperty\fR]]\fR .ad .br .na \fB\fBdescribe\fR [\fB-v\fR] [\fB-t\fR] [\fIpropertygroup\fR/\fIproperty\fR]\fR .ad .br .sp .6 .RS 4n Describes either the current or the possible settings. .sp When invoked without arguments, \fBdescribe\fR gives basic descriptions (if available) of the currently selected entity and all of its currently set property groups and properties. A property group or specific property can be queried by specifying either the property group name, or the property group name and property name, separated by a slash (\fB/\fR), as an argument. .sp The \fB-v\fR option gives all information available, including descriptions for current settings, constraints, and other possible setting choices. .sp The \fB-t\fR option shows only the template data for the selection (see \fBsmf_template\fR(7)), and does not display the current settings for property groups and properties. .sp If \fB-G\fR is supplied, the specified argument is used as the property group name and may not specify a pattern. When not using the \fB-G\fR option the property group name must be encoded if a reserved character is used. When multiple \fB-G\fR options appear then the options indicate how to traverse the property group hierarchy. .sp If \fB-P\fR is supplied, the specified argument is used as the property name and may not specify a pattern. When not using the \fB-P\fR option, the property name must be encoded if a reserved character is used. For more information, see the \fBsmf\fR(7) man page. .RE .sp .ne 2 .mk .na \fB\fBeditprop\fR [\fB-a\fR]\fR .ad .br .sp .6 .RS 4n Comments of commands to reproduce the property groups and properties of the current selection are placed in a temporary file and the program named by the \fBVISUAL\fR environment variable is invoked to edit it. If \fBVISUAL\fR is not defined, \fBEDITOR\fR is used instead. If both environment variables are not defined, then the default editor \fBvi\fR(1) is used. Upon completion, the commands in the temporary file are executed. See \fBsmf_security\fR(7) for the privileges required to create, modify, or delete properties. .sp By default \fBeditprop\fR will not display SMF infrastructure property groups such as framework, dependency, templates, firewall, and notification parameters or properties templated with visibility hidden. If an instance is selected, the composed view of the properties are placed in the temporary file. The \fB-a\fR option will place all properties in the temporary file, including properties in SMF infrastructure property groups and those templated with visibility hidden. .RE .sp .ne 2 .mk .na \fB\fBencode\fR [\fB-n\fR] \fIname\fR\fR .ad .br .sp .6 .RS 4n Encode the given name as per RFC 3986 guidelines. .sp If \fB-n\fR is supplied, the newline at the end of the string is omitted from the output. .RE .sp .ne 2 .mk .na \fB\fBlistpg\fR [\fB-G\fR \fIname\fR ...]\fR .ad .br .na \fB\fBlistpg\fR [\fIpattern\fR]\fR .ad .br .sp .6 .RS 4n Displays the names, types, and flags of property groups of the current selection. If an argument is given, it is taken as a glob pattern and only property groups with names which match the argument are listed. .sp In interactive mode, a basic description of the property groups is also given. .sp If \fB-G\fR is supplied, the specified argument is used as the property group name and may not specify a pattern. When not using the \fB-G\fR option the property group name must be encoded if a reserved character is used. When multiple \fB-G\fR options appear then the options indicate how to traverse the property group hierarchy. .RE .sp .ne 2 .mk .na \fB\fBlistprop\fR [\fB-l\fR \fIlayer\fR...] [\fB-f\fR | \fB-o\fR \fIformat\fR] [\fB-G\fR \fBpg\fR [\fB-G\fR \fBpg\fR ...] [\fB-P\fR \fIname\fR]]\fR .ad .br .na \fB\fBlistprop\fR [\fB-l\fR \fIlayer\fR...] [\fB-f\fR | \fB-o\fR \fIformat\fR] [\fIpattern\fR]\fR .ad .br .sp .6 .RS 4n Lists property groups and properties of the current selection. For property groups, names, types, and flags are listed. For properties, names (prepended by the property group name and a slash (/)), types, and values are listed. See the \fBsmf\fR(7) man page for a list of available property types. If an argument is supplied it is taken as a glob pattern and only property groups and properties with names which match the argument are listed. .sp With the \fB-l\fR option, print the layer the value came from. The \fB-l\fR option requires a layer, and takes the arguments: \fB manifest\fR, \fBsystem-profile\fR, \fBenterprise-profile\fR, \fBsite-profile\fR, \fBnode-profile\fR, \fBsysconfig-profile\fR, \fBadmin\fR, \fBcurrent\fR, \fBall\fR. \fBcurrent\fR prints the same property values as \fBlistprop\fR without \fB-l\fR, along with the layer that value was defined in. .sp The \fB-f\fR and \fB-o\fR options are mutually exclusive. \fB-f\fR prints the file, if any, a property came from. \fB-o\fR allows field selection. Selectable fields include: .sp .sp .ne 2 .mk .na \fB\fBpropname\fR\fR .ad .RS 15n .rt the property name .RE .sp .ne 2 .mk .na \fB\fBpgname\fR\fR .ad .RS 15n .rt the property group name .RE .sp .ne 2 .mk .na \fB\fBinstname\fR\fR .ad .RS 15n .rt the instance name .RE .sp .ne 2 .mk .na \fB\fBservicename\fR\fR .ad .RS 15n .rt the service name .RE .sp .ne 2 .mk .na \fB\fBlayer\fR\fR .ad .RS 15n .rt the layer .RE .sp .ne 2 .mk .na \fB\fBproptype\fR\fR .ad .RS 15n .rt the property type .RE .sp .ne 2 .mk .na \fB\fBvalue\fR\fR .ad .RS 15n .rt the property value .RE .sp .ne 2 .mk .na \fB\fBfile\fR\fR .ad .RS 15n .rt the source file .RE .sp .ne 2 .mk .na \fB\fBmasked\fR\fR .ad .RS 15n .rt whether the property group or property is currently masked .RE .sp .ne 2 .mk .na \fB\fBtime\fR\fR .ad .RS 15n .rt the time this property last changed .RE If \fB-G\fR is supplied, the specified argument is used as the property group name and may not specify a pattern. When not using the \fB-G\fR option the property group name must be encoded if a reserved character is used. When multiple \fB-G\fR options appear then the options indicate how to traverse the property group hierarchy. .sp If \fB-P\fR is supplied, the specified argument is used as the property name and may not specify a pattern. When not using the \fB-P\fR option, the property name must be encoded if a reserved character is used. For more information, see the \fBsmf\fR(7) man page. .LP Note - .sp .RS 2 .sp .LP \fBlistprop\fR output is not appropriate for parsing in shell scripts, instead use \fBsvcprop\fR in such cases. .RE .RE .sp .ne 2 .mk .na \fB\fBlistcust\fR [\fB-L\fR] [\fB-M\fR] [\fB-G\fR \fBpg\fR [\fB-G\fR \fBpg\fR...] [\fB-P\fR \fIname\fR]]\fR .ad .br .na \fB\fBlistcust\fR [\fB-L\fR] [\fB-M\fR][\fIpattern\fR]\fR .ad .br .sp .6 .RS 4n Print all admin layer customizations and masked entities for the current selection. If an argument is supplied, it is taken as a glob pattern and only property groups and properties with names that match the argument are listed. .sp If there is no current selection, list all customizations for all services. .sp If \fB-M\fR is supplied, print only masked entities. .sp If \fB-L\fR is supplied, show all local customizations, including those in the \fBenterprise-profile\fR, \fBsite-profile\fR, \fBnode-profile\fR, and\fBsysconfig-profile\fR layers in addition to those in the admin layer. .sp If \fB-G\fR is supplied, the specified argument is used as the property group name and may not specify a pattern. When not using the \fB-G\fR option the property group name must be encoded if a reserved character is used. When multiple \fB-G\fR options appear then the options indicate how to traverse the property group hierarchy. .sp If \fB-P\fR is supplied, the specified argument is used as the property name and may not specify a pattern. When not using the \fB-P\fR option, the property name must be encoded if a reserved character is used. For more information, see the \fBsmf\fR(7) man page. .RE .sp .ne 2 .mk .na \fB\fBsetenv\fR [\fB-i\fR | \fB-s\fR] [\fB-m\fR \fImethod_name\fR] \fIenvvar value\fR\fR .ad .br .sp .6 .RS 4n Sets a method environment variable for a service or instance by changing the "environment" property in the \fImethod_name\fR property group, if that property group has type "method". If \fImethod_name\fR is not specified and the \fB-i\fR option is used, the "method_context" property group is used, if an instance is currently selected. If the \fB-s\fR option is used and a service is currently selected, its "method_context" property group is used. If the \fB-s\fR option is used and an instance is currently selected, the "method_context" property group of its parent is used. If neither the \fB-i\fR option nor the \fB-s\fR option is used, the "start" property group is searched for in the currently selected entity and, if an instance is currently selected, its parent is also searched. If the "inetd_start" property group is not located, it is searched for in a similar manner. .sp Once the property is located, all values which begin with \fIenvvar\fR followed by a "=" are removed, and the value "\fIenvvar\fR=\fIvalue\fR" is added. See \fBsmf_security\fR(7) for the privileges required to modify properties. .RE .sp .ne 2 .mk .na \fB\fBsetprop\fR \fB-G\fR \fBpg\fR [\fB-G\fR \fBpg\fR ...] \fB-P\fR \fIname\fR [\fB-T\fR \fItype\fR] [\fIvalue\fR]...\fR .ad .br .na \fB\fBsetprop\fR \fIpg/name\fR = [[\fItype:\fR] \fIvalue\fR]\fR .ad .br .na \fB\fBsetprop\fR \fIpg/name\fR = [\fItype:\fR] ([\fIvalues ...\fR])\fR .ad .br .sp .6 .RS 4n Sets the \fIname\fR property of the \fIpg\fR property group of the current selection to the given values of type \fItype\fR. See the \fBsmf\fR(7) man page for a list of available property types. If the \fBpg\fR does not exist \fBsetprop\fR will create one if it can find the pg type and flags in the template definitions. If the selection is an instance, \fBsetprop\fR will look for the \fBpg\fR type and flags in the service before looking up the template definitions. If no \fBpg\fR type and flags are found, the subcommand will fail. If the named property does not exist, it is created, as long as the type is specified. If the property already exists and the type disagrees with the existing type on the property, the subcommand fails. If no type and no value are provided, \fBsetprop\fR will delete all the values for the \fBpg\fR or \fBname\fR. Values may be enclosed in double-quotes. When so enclosed, any character preceded by a backslash will be passed through with no additional interpretation or special meaning. String values containing whitespace, double-quotes, or backslashes must be enclosed by double-quotes, and the contained double-quotes and backslashes must be quoted by backslashes. When invoked non-interactively, care must be taken to ensure that your shell quoting conventions do not consume the required double quotes and backslashes. Multiple values will be stored in the order in which they are specified. For more information about the privileges required to create or modify properties, see the \fBsmf_security\fR(7) man page. .sp If \fB-G\fR is supplied, the specified argument is used as the property group name and may not specify a pattern. When not using the \fB-G\fR option the property group name must be encoded if a reserved character is used. When multiple \fB-G\fR options appear then the options indicate how to traverse the property group hierarchy. .sp If \fB-P\fR is supplied, the specified argument is used as the property name and may not specify a pattern. When not using the \fB-P\fR option, the property name must be encoded if a reserved character is used. .sp If \fB-T\fR is supplied the specified argument is used as the property's type and may not specify a pattern. .RE .sp .ne 2 .mk .na \fB\fBunsetenv\fR [\fB-i\fR | \fB-s\fR] [\fB-m\fR \fImethod_name\fR] \fIenvvar\fR\fR .ad .br .sp .6 .RS 4n Removes a method environment variable for a service or instance by changing the "environment" property in the \fImethod_name\fR property group, if that property group has type "method". If \fImethod_name\fR is not specified and the \fB-i\fR option is used, the "method_context" property group is used, if an instance is currently selected. If the \fB-s\fR option is used and a service is currently selected, its "method_context" property group is used. If the \fB-s\fR option is used and an instance is currently selected, the "method_context" property group of its parent is used. If neither the \fB-i\fR option nor the \fB-s\fR option is used, the "start" property group is searched for in the currently selected entity and, if an instance is currently selected, its parent is also searched. If the "inetd_start" property group is not located, it is searched for in a similar manner. .sp Once the property is located, all values which begin with \fIenvvar \fR followed by "=" are removed. See \fBsmf_security\fR(7) for the privileges required to modify properties. .RE .SS "Notification Parameters Subcommands" .sp .ne 2 .mk .na \fB\fBsetnotify\fR {[\fB-g\fR] \fItset\fR | \fIclass\fR} \fInotification_parameters\fR\fR .ad .br .sp .6 .RS 4n Sets notifications parameters for software events and Fault Management problem lifecycle events in the SMF repository. .sp .ne 2 .mk .na \fB\fB-g\fR\fR .ad .br .sp .6 .RS 4n Used to set system-wide notification parameters for SMF state transition. See \fBsmf\fR(7). These notification parameters are set in \fBsvc:/system/svc/global:default\fR regardless of any \fBsvccfg\fR current selection. This subcommand refreshes all instances it modifies. .RE .sp .ne 2 .mk .na \fB\fIclass\fR\fR .ad .br .sp .6 .RS 4n Comma-separated list of FMA Event classes or aliases. See \fBsmf\fR(7) Notification Parameters. .RE .sp .ne 2 .mk .na \fB\fItset\fR\fR .ad .br .sp .6 .RS 4n Comma-separated list of SMF state transitions. See \fBsmf\fR(7) Notification Parameters. .RE .sp .ne 2 .mk .na \fB\fInotification_parameters\fR\fR .ad .br .sp .6 .RS 4n URI format for each notification mechanism implemented: For SMTP use: .sp .sp .in +2 .nf mailto:\fIaddr\fR[?\fIheader1\fR=\fIvalue1\fR[&\fIheader2\fR=\fIvalue2\fR]] .fi .in -2 .sp \&...or: .sp .sp .in +2 .nf mailto:{[active]|inactive} .fi .in -2 .sp \&...and for SNMP traps use: .sp .sp .in +2 .nf snmp:{[active]|inactive} .fi .in -2 .sp \&...and to control logging of Automated Service Requests (ASRs): .sp .sp .in +2 .nf asr:{[active]|inactive} .fi .in -2 .sp The parameter \fBmsg_template\fR defined in \fBsmtp-notify\fR(8) can be set as a header value in the \fBmailto\fR URI. For example: .sp .sp .in +2 .nf mailto:root@localhost?msg_template=\fI<path to template file>\fR .fi .in -2 .sp SNMP traps are directed to the host as defined by the \fBtrapsink\fR directive in \fB/etc/net-snmp/snmp/snmpd.conf\fR or as specified by the SNMP trap notification daemon. See \fBsmtp-notify\fR(8). .sp The ASR option requires no further configuration provided ASRs are configured via either the ILOM, or via the \fBasr-notify\fR(8) daemon. .sp The notification parameters are specific to the class or tset specified and overwrite preexisting notification parameters. The active/inactive form does not overwrite previous notification parameters. It just switches on or off the notification mechanism for the specified class or tset. Setting notification parameters implicitly sets them as active. .RE .RE .sp .ne 2 .mk .na \fB\fBlistnotify\fR [\fB-g\fR] [\fItset\fR] | \fIclass\fR\fR .ad .br .sp .6 .RS 4n Displays the existing notification parameters for the specified class or tset. With the \fB-g\fR option, the notification parameters in \fBsvc:/system/svc/global:default\fR are displayed. If \fItset\fR is omitted, \fBall\fR is implied. .RE .sp .ne 2 .mk .na \fB\fBdelnotify\fR [\fB-g\fR] \fItset\fR | \fIclass\fR\fR .ad .br .sp .6 .RS 4n Delete the existing notification parameters for the specified class or tset. With the \fB-g\fR option, the notification parameters in \fBsvc:/system/svc/global:default\fR are deleted. .RE .SS "Snapshot Navigation and Selection Subcommands" .sp .ne 2 .mk .na \fB\fBlistsnap\fR\fR .ad .br .sp .6 .RS 4n Displays snapshots available for the currently selected instance. .RE .sp .ne 2 .mk .na \fB\fBrevert\fR [\fIsnapshot\fR]\fR .ad .br .sp .6 .RS 4n Reverts the administrative customizations of the currently selected instance and its service to those recorded in the named snapshot. If no argument is given, use the currently selected snapshot and deselect it on success. The changed property values can be made active via the \fBrefresh\fR subcommand of \fBsvcadm\fR(8). See \fBsmf_security\fR(7) for the privileges required to change properties. .RE .sp .ne 2 .mk .na \fB\fBselectsnap\fR [\fIname\fR]\fR .ad .br .sp .6 .RS 4n Changes the current snapshot to the one named by \fIname\fR. If no \fIname\fR is specified, deselect the currently selected snapshot. Snapshots are read-only. .RE .SS "Instance Subcommands" .sp .ne 2 .mk .na \fB\fBrefresh\fR\fR .ad .br .sp .6 .RS 4n Commit the values from the current configuration to the running snapshot, making them available for use by the currently selected instance. If the \fBrepository\fR subcommand has not been used to select a repository, direct the instance's restarter to reread the updated configuration. If the \fBrepository\fR has been used, snapshots will be refreshed automatically. .RE .SH EXAMPLES .LP \fBExample 1\fR Importing a Service Description .sp .LP The following example imports a service description for the \fBseismic\fR service in the XML manifest specified on the command line. .sp .in +2 .nf # \fBsvccfg import /lib/svc/manifest/site/seismic.xml\fR .fi .in -2 .sp .sp .LP Note that the manifest must follow the format specified in \fBservice_bundle\fR(5). .LP \fBExample 2\fR Exporting a Service Description .sp .LP To export a service description on the local system: .sp .in +2 .nf # \fBsvccfg export dumpadm >/tmp/dump.xml\fR .fi .in -2 .sp .LP \fBExample 3\fR Deleting a Service Instance .sp .LP To delete a service instance: .sp .in +2 .nf # \fBsvccfg delete network/inetd-upgrade:default\fR .fi .in -2 .sp .LP \fBExample 4\fR Checking Properties in an Alternate Repository .sp .LP To examine the state of a service's properties after loading an alternate repository, use the sequence of commands shown below. One might use such commands, for example, to determine whether a service was enabled in a particular repository backup. .sp .in +2 .nf # \fBsvccfg\fR svc:> \fBrepository /etc/svc/repository-boot\fR svc:> \fBselect telnet:default\fR svc:/network/telnet:default> \fBlistprop general/enabled\fR general/enabled boolean false svc:/network/telnet:default> \fBexit\fR .fi .in -2 .sp .LP \fBExample 5\fR Enabling Debugging .sp .LP To modify \fBLD_PRELOAD\fR for a start method and enable the use of \fBlibumem\fR(3LIB) with debugging features active: .sp .in +2 .nf $ \fBsvccfg -s system/service setenv LD_PRELOAD libumem.so\fR $ \fBsvccfg -s system/service setenv UMEM_DEBUG default\fR .fi .in -2 .sp .LP \fBExample 6\fR Using \fBdescribe\fR Subcommand .sp .LP The following command illustrates the use of the \fBdescribe\fR subcommand. .sp .in +2 .nf # \fBsvccfg -s console-login describe ttymon\fR ttymon application ttymon/device astring /dev/console \fBterminal device to be used for the console login prompt\fR ttymon/label astring console \fBappropriate entry from /etc/ttydefs\fR ... .fi .in -2 .sp .LP \fBExample 7\fR Configuring Notification Preferences .sp .LP The following command configures notification preferences for SMF service state transition events. .sp .in +2 .nf # \fBsvccfg setnotify -g from-online,to-maintenance \e\fR \fBmailto:admin@example.com\fR .fi .in -2 .sp .LP \fBExample 8\fR Enabling SNMP Notifications .sp .LP The following command enables Email and SNMP notifications for Fault Management events. .sp .in +2 .nf # \fBsvccfg setnotify problem-diagnosed,problem-updated \e\fR \fBmailto:admin@example.com snmp:\fR .fi .in -2 .sp .LP \fBExample 9\fR Listing Notification Settings .sp .LP The following command lists notification settings for Fault Management events. .sp .in +2 .nf # \fBsvccfg listnotify problem-diagnosed,problem-updated\fR Event: problem-diagnosed Notification Type: smtp active: true to: admin@example.com Notification Type: snmp active: true Event: problem-updated Notification Type: smtp active: true to: admin@example.com Notification Type: snmp active: true .fi .in -2 .sp .LP \fBExample 10\fR Unmasking a Service .sp .LP The following sequence of commands shows the existence of the service \fBmysvc\fR, that \fBmysvc\fR is masked, and finally unmasks the service. .sp .in +2 .nf $ \fBsvcs -l mysvc\fR fmri svc:/system/mysvc:default name Manifest to test snapshots enabled true state online next_state none state_time January 13, 2012 09:42:55 AM MST logfile /var/svc/log/system-mysvc:default.log restarter svc:/system/svc/restarter:default manifest /lib/svc/manifest/test/mysvc.xml dependency require_all/none svc:/system/filesystem/local (online) [ Note manifest file in standard location. ] # \fBsvccfg delete -f mysvc\fR $ \fBsvcs mysvc\fR svcs: Pattern 'mysvc' doesn't match any instances STATE STIME FMRI [ Not listed because service is masked. ] $ \fBsvccfg listcust -M | grep mysvc\fR svc:/system/mysvc manifest MASKED manifestfiles/lib_svc_manifest_test_mysvc_xml astring admin \e MASKED /lib/svc/manifest/test/mysvc.xml svc:/system/mysvc:default manifest MASKED [ First line, above, shows that service is masked. Masking is propagated down, so the instance is also masked as shown in the last line. ] # \fBsvccfg -s svc:/system/mysvc delcust\fR Deleting customizations for service: system/mysvc $ svcs mysvc STATE STIME FMRI online 9:48:25 svc:/system/mysvc:default [ Masking has been removed. ] .fi .in -2 .sp .LP \fBExample 11\fR Setting a Multi-Value Property .sp .LP The following command sets a multi-value property. .sp .in +2 .nf # \fBsvccfg -s svc:/stooges setprop foo/bar = astring: \e\fR \fB\e(moe Curly Larry \e)\fR .fi .in -2 .sp .LP \fBExample 12\fR Clearing All Values from a Property Using \fBsetprop\fR .sp .LP The following command uses \fBsetprop\fR to clear all values from a property. .sp .in +2 .nf # \fBsvccfg -s svc:/stooges setprop foo/bar =\fR .fi .in -2 .sp .LP \fBExample 13\fR Clearing All Values from a Property Using \fBdelpropvalue\fR .sp .LP The following command uses \fBdelpropvalue\fR to clear all values from a property. .sp .in +2 .nf # \fBsvccfg -s svc:/stooges delpropvalue foo/bar \e*\fR .fi .in -2 .sp .LP \fBExample 14\fR Setting Property with Embedded Whitespace .sp .LP The following command sets a property whose value is a string with embedded whitespace. .sp .in +2 .nf # \fBsvccfg -s svc:inst setprop pg/prop = \e astring: "In spite of the spaces, this is one string."\fR .fi .in -2 .sp .sp .LP If specifying the property group name and property name unambiguously is preferred, then the same command may be written: .sp .in +2 .nf # \fBsvccfg -s svc:inst setprop -G pg -P prop \e -T astring "In spite of the spaces, this is one string."\fR .fi .in -2 .sp .LP \fBExample 15\fR Setting a Property Group with Reserved Characters .sp .LP The following command sets a property group whose name is a string containing a reserved character. .sp .in +2 .nf # \fBsvccfg -s svc:inst setprop pg%20a/prop = astring: "foo"\fR .fi .in -2 .sp .sp .LP If specifying the property group name unambiguously, then the same command may be written without the encoding by using the \fB-G\fR option: .sp .in +2 .nf # \fBsvccfg -s svc:inst setprop -G "pg a" -P prop -T astring "foo"\fR .fi .in -2 .sp .LP \fBExample 16\fR Setting a Nested Property Group with Reserved Characters .sp .LP The following command sets a property group whose name is a string containing a reserved character that is nested within another property group. .sp .in +2 .nf # \fBsvccfg -s svc:inst setprop pg%20a/pg%20b/prop = astring: "foo"\fR .fi .in -2 .sp .sp .LP If specifying the property group name unambiguously then the same command may be written without the encoding by using the \fB-G\fR option: .sp .in +2 .nf # \fBsvccfg -s svc:inst setprop -G "pg a" -G "pg b" -P prop -T astring "foo"\fR .fi .in -2 .sp .LP \fBExample 17\fR Disabling Automated Service Requests .sp .LP The following command disables ASRs when the \fBntp\fR service transitions to maintenance mode. .sp .in +2 .nf # \fBsvccfg -s svc:/network/ntp:default setnotify from-online,to-maintenance \e\fR \fBasr:inactive\fR .fi .in -2 .sp .SH ENVIRONMENTAL VARIABLES .sp .ne 2 .mk .na \fBEDITOR\fR .ad .br .sp .6 .RS 4n The command to run when the \fBeditprop\fR subcommand is used. The default editor is \fBvi\fR(1). .RE .SH EXIT STATUS .sp .LP The following exit values are returned: .sp .ne 2 .mk .na \fB\fB0\fR\fR .ad .br .sp .6 .RS 4n Successful execution. .RE .sp .ne 2 .mk .na \fB\fB1\fR\fR .ad .br .sp .6 .RS 4n One or more subcommands resulted in failure. Error messages are written to the standard error stream. .RE .sp .ne 2 .mk .na \fB\fB2\fR\fR .ad .br .sp .6 .RS 4n Invalid command line options were specified. This exit status does not apply to subcommands. .RE .SH ATTRIBUTES .sp .LP See \fBattributes\fR(7) for descriptions of the following attributes: .sp .TS tab( ) box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . ATTRIBUTE TYPE ATTRIBUTE VALUE _ Availability system/core-os _ Interface Stability See below. .TE .sp .sp .LP The interactive output is Uncommitted. The invocation and non-interactive output are Committed. .SH SEE ALSO .sp .LP \fBsvcprop\fR(1), \fBsvcs\fR(1), \fBlibscf\fR(3LIB), \fBlibumem\fR(3LIB), \fBscf_service_add_pg\fR(3SCF), \fBscf_value_create\fR(3SCF), \fBcontract\fR(5), \fBservice_bundle\fR(5), \fBattributes\fR(7), \fBfnmatch\fR(7), \fBsmf\fR(7), \fBsmf_method\fR(7), \fBsmf_security\fR(7), \fBsmf_template\fR(7), \fBasr-notify\fR(8), \fBsmtp-notify\fR(8), \fBsnmp-notify\fR(8), \fBsvc.configd\fR(8), \fBsvcadm\fR(8)