Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

(sunos section 1m)
man page for smpatch

smpatch(1M)															       smpatch(1M)

NAME
smpatch - download, apply, and remove updates SYNOPSIS
/usr/sbin/smpatch add -i update-id [auth-opts] [-i update-id] ... [-d update-dir] [-n system-name] ... [-x mlist=system-list-file] /usr/sbin/smpatch add -x idlist=update-list-file [auth-opts] [-d update-dir] [-n system-name] ... [-x mlist=system-list-file] /usr/sbin/smpatch analyze [auth-opts] [-i update-id] ... [-n system-name] ... [-x idlist=update-list-file] /usr/sbin/smpatch download [auth-opts] [-i update-id] ... [-d update-dir] [-n system-name] ... [-x idlist=update-list-file] /usr/sbin/smpatch get [auth-opts] [-n system-name] ... [parameter-name...] /usr/sbin/smpatch order -i update-id [auth-opts] [-i update-id] ... [-d update-dir] [-n system-name] ... /usr/sbin/smpatch order -x idlist=update-list-file [auth-opts] [-d update-dir] [-n system-name] ... /usr/sbin/smpatch remove -i update-id [auth-opts] [-n system-name] ... /usr/sbin/smpatch set [auth-opts] [-n system-name] ... parameter-name=parameter-value... /usr/sbin/smpatch unset [auth-opts] [-n system-name] ... parameter-name... /usr/sbin/smpatch update [auth-opts] [-i update-id] ... [-d update-dir] [-n system-name] ... [-x idlist=update-list-file] The smpatch command manages the update process on a single system or on multiple systems. Use this command to download, apply, and remove updates. Also, use the smpatch command to configure the update management environment for your system. If you want to run the smpatch command in remote mode, your system must run at least the Developer Solaris Software Group of the Solaris 10 system. The smpatch analyze command determines the updates that are appropriate for the systems you want to update. The smpatch command can down- load and apply updates that you specify on the command line. Or, smpatch can download and apply updates based on an analysis of one or more systems. Use the -i option or the -x idlist= option to specify the particular updates. All of the systems on which you want to apply updates must be running the same version of the Solaris Operating System, have the same hard- ware architecture, and have the same updates applied. The list of updates that is generated by the analysis is based on all of the available updates from the Sun update server. No explicit information about your host system or its network configuration is transmitted to Sun. Only a request for the Sun update set is transmit- ted. The update set is scanned for updates that are appropriate for this host system, the results are displayed, and those updates are optionally downloaded. The smpatch command supports the following subcommands: add Applies one or more updates to one or more systems. You must specify at least one update to apply. By default, updates are applied to the local system. This subcommand attempts to apply only the updates you specify. If you specify an update that depends on another that has not been applied, the add command fails to apply the update you specified. This subcommand does not apply updates based on the specified update policy. To apply updates based on the update policy, use the update subcommand. Use the -i or -x idlist= option to specify the updates to apply. Note that all of the updates you specify, and those on which they depend, must exist in the download directory. Use the -n or the -x mlist= option to specify the systems on which to apply updates. Optionally use the -d option to specify an alternate download directory. If the updates on which the specified updates depend are unavailable, run the smpatch download subcommand to obtain the updates you need. analyze Analyzes a system to generate a list of the appropriate updates. After analyzing the system, use the update subcommand or the download and add subcommands to download and apply the updates to your systems. The list of updates is written to standard output, so you can redirect standard output to a file to create an update list. If you supply a list of one or more updates, the list is augmented with the updates on which those updates depend. The list is also put in an order suitable for applying updates. The smpatch analyze command depends on network services that are not available while the system is in single-user mode. download Downloads updates from the Sun update server to a system. You can optionally specify which updates to download. You can also specify the name of a system and download the appropriate updates to that system. Use the -i or -x idlist= option to specify the updates to download. Use the -n option to analyze a remote system and to determine which updates to download. The updates, and those on which they depend, are downloaded from the Sun update server to the download directory of the system you specified. The smpatch download command depends on network services that are not available while the system is in single-user mode. get Lists one or more of the smpatch configuration parameter values. See ``Configuring Your Update Management Environment.'' To see values for all parameters, run the smpatch get command with no arguments. The output shows an entry for all configuration param- eters. Each entry appears on a line by itself. Each entry includes three fields: the parameter name, the value you have assigned it, and its default value. The fields are separated by one or more tab characters. The following values have special meaning: - means that no value is set, "" means that the value is the null string, \- means that the value is -, and \"" means that the value is "" (two double quotes). In addition to these special values, these special characters might appear in the output: \t for a tab, \n for a newline, and \\ for a backslash. To see values for particular parameters, run the smpatch get command with one or more parameter names. The output lists one parameter value per line in the order in which the parameter names are specified on the command line. order Sorts a list of updates into an order that can be used to apply updates. The list of updates is written to standard output, so you can redirect standard output to a file to create an update list. Use the -i or -x idlist= option to specify the updates to order. Note that all of the updates you specify must exist in the download directory. remove Removes a single update from a single system. Use the -i option to specify which update to remove. Do not use the -x idlist= option. Optionally, use the -n option to specify the name of a system. Do not use the -x mlist= option. By default, the update is removed from the local system. If the update that you want to remove is required by one or more of the updates that have already been applied to the system, the update is not removed. set Sets the values of one or more configuration parameters. Nothing is written to standard output or standard error when you set parame- ters, even if a parameter value you set is invalid. This command does not validate the values you set. unset Resets one or more configuration parameters to the default values. You must specify at least one configuration parameter. update Updates a single local or remote system by applying appropriate updates. This subcommand analyzes the system, then downloads the appro- priate updates from the Sun update server to your system. After the availability of the updates has been confirmed, the updates are applied based on the update policy. By default, standard updates and those that have rebootafter or reconfigafter properties are applied. If an update does not meet the policy for applying updates, the update is not applied. Instead, the ID of the update is written to a file in the download directory. After the update ID is written to the file, smpatch continues to apply the other updates. Later, you can use patchadd to manually apply any updates listed in this file. The updates listed in the file are still in the download directory. Installation instructions for updates that require special handling are included in the README file for each update. The smpatch update command depends on network services that are not available while the system is in single-user mode. Using Local Mode or Remote Mode Starting with Solaris 9, the smpatch command is available in two modes: local mode and remote mode. Local mode can be run only on the local system and can be run by users who have the appropriate authorizations. This mode can be run while the system is in single-user mode. Remote mode can be used to perform tasks on remote systems and can be run by users or roles that have the appropriate authorizations. By default, local mode is run. In local mode, the Solaris WBEM services are not used, and none of the authentication options or those options that refer to remote systems are available. The command in local mode runs faster than in remote mode. If the Solaris WBEM services are running and you specify any of the remote or authentication options, the command in remote mode is used. On Solaris 8 systems, the smpatch command only supports local mode operations. Specifying the Source of Updates Your system must specify the source of updates to use. By default, you obtain updates from the Sun update server. However, you can also obtain updates from an update server on your intranet or from a local collection of updates on your system. You must specify the URL that points to the collection of updates. By default, the Sun update server is the source of updates. The URL is: https://getupdates.sun.com/solaris/ The URL must point to an update server or to a collection of updates that is available to the local system. The value of this URL cannot be null. Configuring Your Update Management Environment You can use the smpatch set command to configure the update management environment for your system. Use these parameters: patchpro.patchset Name of the update set to use. The default name is current. patchpro.download.directory Path of the directory where downloaded updates are stored and from which updates are applied. The default location is /var/sadm/spool. patchpro.backout.directory Path of the directory where update backout data is saved. When an update is removed, the data is retrieved from this directory as well. By default, backout data is saved in the package directories. patchpro.patch.source URL that points to the collection of updates. The default URL is that of the Sun update server, https://getupdates.sun.com/solaris/. patchpro.proxy.host Host name of your web proxy. By default, no web proxy is specified, and a direct connection to the Internet is assumed. patchpro.proxy.port Port number used by your web proxy. By default, no web proxy is specified, and a direct connection to the Internet is assumed. The default port is 8080. patchpro.proxy.user Your user name used by your web proxy for authentication. patchpro.proxy.passwd Password used by your web proxy for authentication. patchpro.install.types Your policy for applying updates. The value is a list of zero or more colon-separated update properties that are permitted to be applied by an update operation (smpatch update). This policy only affects which updates are installed on your system. The policy does not affect which updates are downloaded. By default, updates that have the standard, rebootafter, and reconfigafter properties can be applied. See ``Setting an Update Policy.'' Setting an Update Policy Updates are classified as being standard or nonstandard. A standard update can be applied by smpatch update. Such an update is associated with the standard update property. smpatch applies standard updates immediately. These updates require no system restart. A nonstandard update has one of the following characteristics: o An update that is associated with the rebootafter, rebootimmediate, reconfigafter, reconfigimmediate, or singleuser properties. Such a nonstandard update can be applied automatically during a system shutdown if permitted by the policy. o An update that is associated with the interactive property. Such an update cannot be applied by using automated installation mecha- nisms like smpatch update. When you attempt to apply one of these updates using smpatch update, the update will be downloaded but not installed. You must examine the update's README file and perform whatever manual steps it describes. Typically, you are instructed to apply the update manually using patchadd or smpatch add. Use smpatch set to specify the types of updates that smpatch can additionally apply during an update operation. Such updates might include those that require a reboot and those that must be applied while the system is in single-user mode. This policy only affects which updates are installed on your system. The policy does not affect which updates are downloaded. Specify the types of updates that can be applied by using the following command: # smpatch set patchpro.install.types=update-property-list update-property-list is a colon-separated list of one or more of the following update properties: interactive An update that cannot be applied by running the usual update management tools (pprosvc, smpatch, or patchadd). Before this update is applied, the user must perform special actions. Such actions might include checking the serial number of a disk drive, stopping a crit- ical daemon, or reading the update's README file. rebootafter The effects of this update are not visible until after the system is rebooted. rebootimmediate When this update is applied, the system becomes unstable until the system is rebooted. An unstable system is one in which the behavior is unpredictable and data might be lost. reconfigafter The effects of this update are not visible until after a reconfiguration reboot (boot -r). See the boot(1M) man page. reconfigimmediate When this update is applied, the system becomes unstable until the system gets a reconfiguration reboot (boot -r). An unstable system is one in which the behavior is unpredictable and data might be lost. singleuser Do not apply this update while the system is in multiuser mode. You must apply this update on a quiet system with no network traffic and with extremely restricted I/O activity. standard This update can be applied while the system is in multiuser mode. The effects of the update are visible as soon as it is applied unless the application being updated is running while the update is applied. In this case, the effects of the update are visible after the affected application is restarted. The smpatch command supports two kinds of options: authentication options and subcommand options. Authentication Options The smpatch authentication options, auth-opts, apply to all of the subcommands. If no authentication options are specified, certain defaults are assumed and the user might be prompted for additional information, such as a password for authentication purposes. These authentication options are only available if the Solaris Management Console and the Solaris WBEM services are available on the local system. If the WBEM services are not running on the local system, smpatch performs update operations on the local system only. You can also ``force'' the use of the local-mode smpatch command by using the -L option. The single letter options can also be specified by their equivalent option words preceded by two hyphens. For example, you can specify either -l or --rolepassword. The following authentication options are supported: -H | --hostname host-name:port Specifies the host and port to which you want to connect. If you do not specify a port, the system connects to the default port, 898. If you do not specify a host (host-name:port), the Solaris Management Console connects to the local host on port 898. You might still have to choose a toolbox to load into the console. To override this behavior, use the smc -B command, or set your console preferences to load a home toolbox by default. -L Forces the smpatch command to use local mode, which does not rely on Solaris WBEM services. On Solaris 8 systems, this option does not do anything. This option is mutually exclusive with the other authentication options. -l | --rolepassword role-password Specifies the password for role-name. If you specify role-name but do not specify role-password, you are prompted to supply role-pass- word. Because passwords specified on the command line can be seen by any user on the system, this option is considered to be insecure. -p | --password password Specifies the password for user-name. If you do not specify a password, you are prompted to supply one. Because passwords specified on the command line can be seen by any user on the system, this option is considered to be insecure. -r | --rolename role-name Specifies a role name for authentication. If this option is not specified, no role is assumed. -u | --username user-name Specifies the user name for authentication. If you do not specify this option, the user identity running the console process is assumed. Subcommand Options The following options pertain to the smpatch subcommands: -d update-dir Specifies an alternate download directory in which updates are downloaded and from which they are applied. The default download directory is /var/sadm/spool. The directory must be writable by root and be publicly readable. update-dir uses one of the following forms: o For remote mode, specify host-name:/update-dir, where /update-dir is a fully qualified, shared directory. o For local mode, specify /update-dir, which is a fully qualified, shared directory. This option is supported by the add, download, order, and update subcommands. -h Displays information about the command-line options for the specified subcommand. This option is mutually exclusive with all other options. -i update-id Specifies the ID of an update. You can specify more than one update ID by using the -i option for each update. You can also use the -x idlist= option to point to a list of update IDs. When using the remove subcommand, you can specify exactly one update ID. This option is supported by the add, analyze, download, order, remove, and update subcommands. -n system-name Specifies the name of the system on which to manage updates. When using the add subcommand, you can specify more than one system by using the -n option for each system. When using the analyze, download, remove, and update subcommands, you can only specify a single system. To specify more than one system for the smpatch add command, use the -x mlist= option. This option enables you to specify a list of systems instead of using the -n option to specify each system. The -n option and the -x mlist= option are mutually exclusive. If you do not specify this option, the system is assumed to be the one specified by the -H option. This option is supported only if the Solaris Management Console and the Solaris WBEM services are running on the local system and any system that is specified by this option. This option is supported by the add, analyze, download, get, order, remove, set, unset, and update subcommands. -x idlist=update-list-file Specifies the name of a file, update-list-file, that contains a list of updates to download or apply. Each update ID in the file must be terminated by a newline character. The file name you specify must be a full path name. You can use the -i option to specify a list of update IDs. This option is supported by the add, analyze, download, order, and update subcommands. -x mlist=system-list-file Specifies the name of a file, system-list-file, that contains a list of systems on which to manage updates. Each system name must be terminated by a newline character. The file name you specify must be a full path name. You can use the -n option to specify a list of systems instead of using the -x mlist= option. The -n option and the -x mlist= option are mutually exclusive. This option is supported only if the Solaris Management Console and the Solaris WBEM services are running on the local system and any system that is specified in system-list-file. This option is supported by the add subcommand. Example 1: Analyzing Your System to Obtain the List of Appropriate Updates for the Local System # smpatch analyze Shows how to analyze your system to obtain the list of appropriate updates. After the analysis, you can download and apply the updates to your system. Example 2: Analyzing Your System to Obtain the List of Appropriate Updates for Another System # smpatch analyze -n lab1 Shows how to analyze a different system, lab1, to obtain the list of appropriate updates. After the analysis, you can download and apply the updates to that system. Example 3: Applying Updates to Multiple Systems # smpatch add -i 102893-01 -i 106895-09 -i 106527-05 \ -d fileserver:/files/updates/s9 -n lab1 -n lab2 Applies updates 102893-01, 106895-09, and 106527-05 to the systems lab1 and lab2. The updates are located in the /files/updates/s9 direc- tory on the system named fileserver. Example 4: Applying Updates by Using an Update List File # smpatch add -x idlist=/tmp/update/update_file \ -d /net/fileserver/export/updatespool/Solaris9 -n lab1 -n lab2 Applies the updates specified in the file /tmp/update/update_file to the systems lab1 and lab2. The updates are located in the NFS-mounted directory named /net/fileserver/export/updatespool/Solaris9. Example 5: Applying Updates by Using an Update List File and a System List File # smpatch add -x idlist=/tmp/update/update_file \ -x mlist=/tmp/update/sys_file Applies the updates listed in the file /tmp/update/update_file to the systems listed in the file /tmp/update/sys_file. The updates are located in the default /var/sadm/spool directory on the local system. Example 6: Analyzing a System and Downloading Updates From the Sun Update Server # smpatch download -n lab1 Analyzes the lab1 system and downloads the appropriate updates from the Sun update server to the download directory. Example 7: Downloading Updates From the Sun Update Server # smpatch download -i 102893-01 -i 106895-09 -d /files/updates/s9 Downloads the 102893-01 and 106895-09 updates from the Sun update server to the /files/updates/s9 directory. Example 8: Listing All Configuration Parameter Values # smpatch get -p password Loading Tool: com.sun.admin.patchmgr.cli.PatchMgrCli from mars Login to mars as user root was successful. Download of com.sun.admin.patchmgr.cli.PatchMgrCli from mars was successful. On machine mars: patchpro.backout.directory - "" patchpro.download.directory - /var/sadm/spool patchpro.install.types - rebootafter:reconfigafter:standard patchpro.patch.source - https://getupdates.sun.com/solaris/ patchpro.patchset - current patchpro.proxy.host - "" patchpro.proxy.passwd **** **** patchpro.proxy.port - 8080 patchpro.proxy.user - "" patchpro.sun.passwd **** **** patchpro.sun.user - "" Lists the configuration settings for the system. Example 9: Listing One or More Configuration Parameter Values # smpatch get -L patchpro.patch.source patchpro.download.directory https://getupdates.sun.com/solaris/ /var/sadm/spool Uses smpatch in local mode to list the values of the patchpro.patch.source and the patchpro.download.directory parameters. Example 10: Reordering a List of Updates # smpatch order -x idlist=/tmp/plist Reorders the update list called /tmp/plist in an order that is suitable for applying the updates. Example 11: Removing an Update # smpatch remove -i 102893-01 Removes update 102893-01. Example 12: Specifying the Update Policy # smpatch set \ patchpro.install.types=standard:singleuser:reconfigafter:rebootafter Specifies the update policy for your system. The following types of updates are allowed to be applied to your system: o Standard updates o Updates that must be applied in single-user mode o Updates that require that the system undergo a reconfiguration reboot after they have been applied o Updates that require that the system undergo a reboot after they have been applied Example 13: Changing the Download Directory Location # smpatch set patchpro.download.directory=/export/home/updates Example 14: Specifying a Local Web Proxy # smpatch set patchpro.proxy.host=webaccess.corp.net.com \ patchpro.proxy.port=8080 Specifies the host name, webaccess.corp.net.com, and port, 8080, of the local web proxy. Example 15: Resetting a Configuration Parameter Value # smpatch unset patchpro.patch.source Resets the value of the patchpro.patch.source parameter to its default value, which is the URL that points to the Sun update server. Example 16: Updating Your System # smpatch update -L Analyzes your local system, determines the appropriate updates, downloads those updates to the download directory, and applies those updates. See environ(5) for a description of the JAVA_HOME environment variable, which affects the execution of the smpatch command. The default value of this variable is /usr/java. See the smc(1M) man page. The following exit values are returned: 0 Successful completion. 1 Invalid command syntax. A usage message displays. 2 An error occurred while executing the command. An error message displays. See the attributes(5) man page for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWman | +-----------------------------+-----------------------------+ |Interface Stability |Evolving | +-----------------------------+-----------------------------+ boot(1M), patchadd(1M), patchrm(1M), smc(1M), attributes(5), environ(5) Sun Update Manager 1.0 Administration Guide 6 Sep 2005 smpatch(1M)

Featured Tech Videos