Description
Performs patch deployment and application for the managed server.
Synopsis
[Windows]
swcfmg_patch_apply.exe -userid <User ID> {-serverid <Server ID> | -ip <IP address>} -t <Patch type>{ -patch <Patch>,... | -file <Input file path> [-e <Character encoding>] } [-monitor <Monitoring time>] [-prescript <Script to run before execution>] [-postscript <Script to run after execution> [-postsgluser]] [-reboot] [-force] [-wait] |
[Linux]
swcfmg_patch_apply -userid <User ID> {-serverid <Server ID> | -ip <IP address>} -t <Patch type>{ -patch <Patch>,... | -file <Input file path> [-e <Character encoding>] } [-monitor <Monitoring time>] [-prescript <Script to run before execution>] [-postscript <Script to run after execution> [-postsgluser]] [-reboot] [-force] [-wait] |
Options
Performs patch deployment and application. Specify the user to be an administrator of jobs of patch deployment or applications for user IDs. The user must be a tenant administrator, tenant user, or a dual-role administrator that holds the privileges to apply patches to the specified server.
Specify the server ID or IP address of the server that is the patch application target.
Specify the patch type for the patch to apply. Specify the following patch types:
windows: Windows patches
linux: Linux patches
middleware: Fujitsu middleware patches
Specify the patches to apply. Multiple patches can be specified by delimiting them with ',' (comma). Up to one hundred patches can be specified at one time. The values to specify for patches are different depending on the patch type.
Specify an unapplied patch as the patch to apply. The unapplied patches can be checked using the patch application status display of "1.4.9 swcfmg_patch_info (Patch Information Output Command)".
Specify the Update ID of the patch to apply.
Specify the package name, the version, the release, and the architecture of the patch to apply, separating them with "/" (slash). An example is as follows:
Example:
glibc/2.12/1.47.el6_2.56/x86_64 |
Specify the patch ID (patch name) of the patch to apply.
Specify the CSV file in which patches for deployment and application are described. Describe each patch for deployment and application in a single line in the CSV file. Up to one hundred patches can be specified at one time. The formats of the CSV files are different depending on the patch types.
Specify an unapplied patch as the patch to apply. The unapplied patches can be checked using the patch application status display of "1.4.9 swcfmg_patch_info (Patch Information Output Command)".
There is one column in the CSV format. Specify the Update ID of the patch to apply.
Example:
4e5da29f-25a1-486a-976f-18425564c30a 7ef24779-cfa8-42ee-b1c7-edf6e58b1ef6 f4dc532e-71a7-4bf8-b91b-ee056495a961 |
There are four columns in the CSV format. Specify the package name in the first column, the version in the second column, the release in the third column, and the architecture in the fourth column. No values can be omitted.
Example:
glibc,2.12,1.47.el6_2.56,x86_64 glibc-common,2.12,1.47.el6_2.5,x86_64 nscd,2.12,1.47.el6_2.5,x86_64 |
There is one column in the CSV format. Specify the patch ID (patch name) of the patch to deploy.
Example:
T009226XP-01 T009007XP-01 T008955XP-01 |
Specify the character encoding for the file.
The following character encoding can be specified. (single-byte uppercase characters must be used):
UTF-8
If this option is omitted, the character encoding of the execution environment of this command will be used.
You can specify the execution method by specifying the options below:
Specify the script to be run before patches are deployed or applied. If this option is omitted, no script is executed before parameters are set.
Specify the script to be run after patches are applied. If this option is omitted, no script is executed after parameters are set.
It is necessary to specify the script after execution to apply Fujitsu middleware patches. Create the script referring to "Creating a Fujitsu Middleware Patch Application Script" in the "Operation Guide", and specify it in this option.
Executes the post-execution script in single-user mode. When this option is specified, the script is executed in single-user mode. After the script is executed, the mode is switched back to the previous mode. When this option is omitted, the script is executed without the switchover of modes.
This option restarts the server after patch deployment and application. The operations are different depending on the patch types specified for the -t option. When Windows patches and Linux patches are specified, servers are only restarted when patches requiring restarting are applied. When patches do not require restarting, servers are not restarted. When specifying Fujitsu middleware patches, ensure restarting of servers is specified.
If this option is omitted, servers are not restarted.
Whether the patches for distribution or application have been applied to the server is not checked. When this option is omitted, whether the patches for distribution or application have been applied to the server is checked. When performing patch distribution and application by specifying this option, perform the operation according to the following notes:
Common
Check in advance if the patches for distribution or application are unapplied or applicable.
Windows patches
When applying a patch that is not output in the patch information display of the swcfmg_patch_info (Patch Information Output command), the patch name, class, and patch type are not output in Details of the Job Information Management command.
Fujitsu middleware patches
Specify the patch to distribute selecting from patches output in the patch information display of swcfmg_patch_info (Patch Information Output command).
When the job turns to the following status, the command returns. When this option is omitted, after the job starts, the command returns immediately.
selecting_abnormal: Selecting (abnormal)
completed: Completed
completed_abnormal: Completed (abnormal)
canceled: Canceled
After this command completes, patch application or patch deployment is executed as a job. The job ID of the job to be executed is output to the standard output.
Output format for standard output:
[Job ID] |
Return value
Return value | Meaning |
---|---|
0 | The command has terminated normally. [When specifying the "-wait" option] The status of the job turned to Complete. |
10 | A parameter error has occurred. |
20 | The specified I/O path is incorrect. |
50 | The file description is incorrect. |
70 | The specified user, server, or patch is incorrect. |
81 | You do not have the privileges required to apply patches. |
90 | [When specifying the "-wait" option] The status of the job turned to Selecting (abnormal). |
91 | [When specifying the "-wait" option] The status of the job turned to Completed (abnormal). |
92 | [When specifying the "-wait" option] The status of the job turned to Canceled. |
100 | Systemwalker Software Configuration Manager is not running. |
103 | Connection to the directory service failed. |
104 | The operation is not permitted for the admin server. |
200 | Setup has not been performed. |
255 | A system error has occurred. |
Command location
Admin server
[Windows]
<Systemwalker Software Configuration Manager installation directory>\SWCFMGM\bin |
[Linux]
/opt/FJSVcfmgm/bin |
Privilege required
[Windows]
Administrator privileges are required. Execute as an administrator.
This command can be executed on the admin server.
This command can be executed at the same time as other commands.
[Linux]
This command can only be executed by the system administrator (superuser).
This command can be executed on the admin server.
This command can be executed at the same time as other commands.
Notes
Execute this command while Systemwalker Software Configuration Manager is running.
Patches cannot be applied to the admin server.
When there are errors in the input file, a message similar to the following will be output to the standard output:
CFMGC20005 The file description is incorrect. [Line number:<n>][Cause:<Cause>] |
One of the following messages will be output in <Cause>:
Message | Meaning |
---|---|
Number of elements. | Review the number of elements in the line indicated. |
Mandatory elements are not specified. | Enter the mandatory elements in the given line. |
The same patch is specified in another line. | The same patch is already defined in one of the preceding lines. |
The specified patch is not an unapplied patch. | The specified patch is not unapplied patch. |
Example
Windows patches
[Windows]
swcfmg_patch_apply.exe -userid user001 -ip 192.168.1.1 -t windows -patch aee355db-da85-4938-b396-161dfa1a6b43 |
[Linux]
swcfmg_patch_apply -userid user001 -ip 192.168.1.1 -t windows -patch aee355db-da85-4938-b396-161dfa1a6b43 |
Linux patches
[Windows]
swcfmg_patch_apply.exe -userid user001 -ip 192.168.1.1 -t linux -patch glibc/2.12/1.47.el6_2.56/x86_64 |
[Linux]
swcfmg_patch_apply -userid user001 -ip 192.168.1.1 -t linux -patch glibc/2.12/1.47.el6_2.56/x86_64 |
Fujitsu middleware patches
[Windows]
swcfmg_patch_apply.exe -userid user001 -ip 192.168.1.1 -t middleware -patch T004726WP-01 |
[Linux]
swcfmg_patch_apply -userid user001 -ip 192.168.1.1 -t middleware -patch T004726WP-01 |