Top
Systemwalker Software Configuration Manager Reference Guide
FUJITSU Software

1.4.10 swcfmg_patch_apply (Patch Application Command)

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

-userid <User ID>

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.

-serverid <Server ID> | -ip <IP address>

Specify the server ID or IP address of the server that is the patch application target.

-t <Patch type>

Specify the patch type for the patch to apply. Specify the following patch types:

  • windows: Windows patches

  • linux: Linux patches

  • middleware: Fujitsu middleware patches

-patch <Patch>,...

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)".

Windows patches

Specify the Update ID of the patch to apply.

Linux patches

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

Fujitsu middleware patches

Specify the patch ID (patch name) of the patch to apply.

-file <Input file path>

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)".

Windows patches

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

Linux patches

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

Fujitsu middleware patches

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

-e <Character encoding>

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:

    -monitor <Monitoring time>
    Specify the monitoring time of the server operation check for patch application and patch distribution jobs. Specify the monitoring time using a number between 0 and 1440 in minutes. When 0 is specified, an operation check will be performed once. When a numeric value larger than 0 is specified, the operation check is performed at three-minute intervals within the range of the specified monitoring time. When it is confirmed that the server is operating, the job completes normally. When the operation check cannot be performed during the monitoring time, the process ends abnormally. If this option is omitted, the monitoring time is zero minutes.-prescript <script to run before execution>

    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.

    -postscript <script to run after execution>

    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.

    -postsgluser

    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.

    -reboot

    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.

    -force

    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).

    -wait

    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.

    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]

    [Linux]

    Notes

    Example