suma Command

Purpose

Creates a task to automate the download of technology levels and service packs from a fix server.

Syntax

To create, edit, or schedule a Service Update Management Assistant (SUMA) task:
suma { { [ -x ] [ -w ] } | -s CronSched } [ -a Field=Value ]... [ TaskID ]
To list SUMA tasks:
suma -l [ TaskID ]...
To list or edit the default SUMA task:
suma -D [ -a Field=Value ]...
To list or edit the SUMA global configuration settings:
suma -c [ -a Field=Value ]...
To unschedule a SUMA task:
suma -u TaskID
To delete a SUMA task:
suma -d TaskID 

Description

The suma command can be used to perform the following operations on a SUMA task or policy:
  • Create
  • Edit
  • List
  • Schedule
  • Unschedule
  • Delete
A unique Task ID represents the task on which the specified operation is performed. To create or edit cases on a SUMA task, if the TaskID is not specified, the create operation is assumed by default, and a unique TaskID is generated. For the -l flag, if the TaskID is not specified, a list of all SUMA tasks are displayed. For the -c flag, if the -a flag is not specified, the SUMA global configuration settings are listed.

Flags

Item Description
-c Lists or edits the SUMA global configuration settings. The -a flag allows one or more configuration settings to be updated to the specified value. When used without the -a flag, all SUMA configuration settings are listed.
Following are the configuration settings that can be edited with the -a flag:
FIXSERVER_PROTOCOL
Specifies that the transfer uses https (secure) protocal when communicating with the fix server. The https protocol is the only supported protocol and cannot be changed. The default value is https. The valid value is https.
DOWNLOAD_PROTOCOL
Specifies whether the transfer uses http, or https (secure) protocol when downloading file sets. The http protocol takes advantage of multi-threaded performance and uses the download director protocol (ddp). The https protocol is single-threaded. The default value is http. The valid values are http, and https.
DL_TIMEOUT_SEC
Specifies the time in seconds to wait for a response from the fix server during a download operation. The default value is 180. The valid values are whole numbers greater than zero.
HTTP_PROXY and HTTPS_PROXY
Proxy server and port to use for the HTTP or HTTPS transfers. The SUMA command shares the proxy connectivity settings with the Electronic Service Agent. The HTTP or HTTPS proxy service configuration can be set up through the SMIT Create/Change Service Configuration menus (use fastpath smitty srv_conn) that allow the server specifications such as IP address, port number, and an optional user ID and password. SUMA no longer supports the settings of the HTTP_PROXY and HTTPS_PROXY parameters. The default value is blank (disabled). The valid value is blank.
-c (Continued)
SCREEN_VERBOSE
Specifies a verbosity level for logging information to stdout and stderr. Used when the suma command is run from the command line or from the SMIT interface. It is not applicable for scheduled tasks that are run from cron. The default value is LVL_INFO. Following are the valid values:
  • LVL_OFF: No information is displayed or logged.
  • LVL_ERROR: Displays error messages and other highly important messages.
  • LVL_WARNING: Displays warning messages in addition to LVL_ERROR messages.
  • LVL_INFO: Displays informational messages in addition to LVL_WARNING messages.
  • LVL_VERBOSE: Displays verbose informational messages in addition to LVL_INFO messages.
  • LVL_DEBUG: Displays debug output. This setting is for debugging purposes and must not be used for normal operations.
NOTIFY_VERBOSE
Specifies a verbosity level for the information that is sent in an email notification. Applies only to scheduled tasks run from cron. The default values LVL_INFO. The valid values are LVL_OFF, LVL_ERROR, LVL_WARNING, LVL_INFO, LVL_VERBOSE, and LVL_DEBUG (refer to the SCREEN_VERBOSE setting for value descriptions)
LOGFILE_VERBOSE
Specifies a verbosity level for the information that is logged to the log file (/var/adm/ras/suma.log).
Note: An LVL_OFF setting logs information to the download log file (/var/adm/ras/suma_dl.log). The default value is LVL_VERBOSE. The valid values are LVL_OFF, LVL_ERROR, LVL_WARNING, LVL_INFO, LVL_VERBOSE, and LVL_DEBUG (refer to the SCREEN_VERBOSE setting for value descriptions)
MAXLOGSIZE_MB
The maximum size (in MB) that a log file is allowed to reach. The default value is 1. The valid values are whole numbers greater than zero.
REMOVE_CONFLICTING_UPDATES
Specifies whether lppmgr command must remove conflicting updates that have the same level as base images (lppmgr -u flag) when run during a clean action. The default value is yes. The valid values are yes, and no.
REMOVE_DUP_BASE_LEVELS
Specifies whether lppmgr command must remove duplicate base levels (lppmgr -b flag) when run during a clean action. The default value is yes. The valid values are yes, and no.
-c (Continued)
REMOVE_SUPERSEDE
Specifies whether lppmgr must remove superseded file set updates (lppmgr -x flag) when run during a clean action. The default value is yes. The valid values are yes, and no.
TMPDIR
Specifies the directory to store temporary files. The default value is /var/suma/tmp. The valid value is any directory that currently exists.
-d Deletes the SUMA task that is associated with the specified TaskID and any schedules for this task that were created with the -s flag.
-D Lists or edits the default SUMA task. The -a flag allows one or more Fields of the default task to be updated to the specified Value. When used without the -a flag, the default SUMA task is listed.
-l Lists SUMA tasks. When used without a TaskID, all SUMA tasks are listed. The TaskID can be used to specify one or more task IDs to list.
-s CronSched Schedules a SUMA task. If specified when a new task is being created, a save is implied (-w flag functions). The CronSched is a list of five space-separated entries (minute, hour, day, month, weekday) contained in quotation marks. The valid values for these entries are as follows (see the crontab man page for more details):
  • Minute: 0 - 59
  • Hour: 0 - 23
  • Day: 1 - 31
  • Month: 1 - 12
  • Weekday: 0 - 6 (for Sunday - Saturday)
-u Unschedules a SUMA task. This flag removes any scheduling information for the specified TaskID.
-w Writes or saves a SUMA task. If used instead of the -s flag, the task is saved, allowing scheduling information to be added later. If used with the -x flag, the task is run immediately and also saved.
-x Specifies that a SUMA task must be run immediately and not scheduled. If used without the -w flag, the task is not saved for future use.
-a Field=Value ... Assigns the specified Value to the specified Field. Following are the supported Fields and Values for the create or edit operation on s SUMA task:
RqType
When suma command is run with an RqType of Latest, the RqType is the only required field. See example 1 for the default values that are used in this case. Other RqType values (TL, SP, ML, PTF) require specification of Field=Value information.
ML
Specifies a request to download a specific maintenance or technology level. An example is 5300-11.
TL
Specifies a request to download a specific technology level. An example is 6100-03.
PTF
Specifies a request to download a PTF. An example is U813941. Only certain PTFs might be downloaded as an individual file set. For example, PTFs containing bos.rte.install, bos.alt_disk_install.rte, or PTFs that come out in between Service Packs. Otherwise, the TL or SP must be downloaded.
SP
Specifies a request to download a specific service pack. An example is 6100-02-04.
Latest
Specifies a request to download the latest fixes. This RqType value returns the latest service pack of the TL specified in FilterML.
-a (Continued)
RqName
The specific name of the item requested (for example, 6100-03 or 6100-04-03). The RqName field must be blank when RqType equals Latest.
Repeats
Specifies whether the task is executed once and does not remain on the system, repeats until the item is found, or repeats forever. The Repeats field applies only to scheduled tasks run from cron that have an Action of Download, Clean, or Metadata. If run from the command line or if Action is Preview, this field is ignored, and no task is removed.
y
Sets up a repeating task, and requires that the task is assigned a CronSched with the -s flag. When the RqType equals TL, SP, PTF, or ML, the task is removed when the item is found. When RqType equals Latest, the task is set up to repeat forever.
n
Specifies that the task is executed once and does not remain on the system.
-a (Continued)
DisplayName
Indicates the display name for this SUMA task (for example, "Download TL 6100-04 when available"). This option is used to view existing SUMA tasks in SMIT.
Action
Preview
Specifies that a download preview is performed. No file sets are downloaded.
Download
Specifies that file sets are downloaded into the DLTarget based on the policy.
Clean
Specifies that file sets are downloaded into the DLTarget based on the policy, followed by a clean operation. The lppmgr command is used to clean file sets that are not needed from the DLTarget. The three configurable lppmgr flag options that are listed in the SUMA global configuration settings are:
Metadata
Specifies that metadata files are downloaded instead of file set updates. The following RqType values are supported:
TL
Downloads metadata for a specific technology level.
SP
Downloads metadata for a specific service pack.
Latest
Downloads metadata for all service packs for the technology level that is specified for the FilterML flag.
DLTarget
Contains the directory location where the downloaded files are stored. If this field is not specified, it is given the value /usr/sys/inst.images and the files are stored in a directory based on the image type; for example /usr/sys/inst.images/installp/ppc, or /usr/sys/inst.images/RPMS/ppc.
NotifyEmail
Contains one or more email addresses (multiple addresses must be comma-separated) that are sent a notification email after a file set download or preview. A notification is sent only if the task is scheduled for execution at a future time (CronSched is specified).
-a (Continued)
FilterDir

Specifies the name of a fix repository directory to filter against so that duplicate fixes are not downloaded. This option allows a directory other than the DLTarget to be filtered against. For example, you might filter against a NIM lpp_source without having to download into this directory. If left blank, the DLTarget is used.

If the value of the FilterDir field ends with /installp/ppc fix repository directory, the suma command filters the fixes within the specified directory.

If the value of the FilterDir field does not end with /installp/ppc fix repository directory, the suma command attempts to search and filter the fixes within the /installp/ppc directory. If the fix repository directory that is specified by the FilterDir field has the /installp/ppc directory, the filter process is successful. If the fix repository directory that is specified by the FilterDir field does not have the /installp/ppc directory, the filter process fails.

FilterML
Specifies a technology level to filter against; for example, 6100-03. If not specified, the value that is returned by oslevel -r on the local system is used.
MaxDLSize
The maximum allowable amount of data to be downloaded by any single policy execution, in MB. If it is determined that the download operation exceeds this size, no download occurs. A value of "unlimited" or -1 can be specified to indicate no higher limit on the amount of data to be downloaded.
Extend
Specifying y automatically extends the filesystem where the DLTarget resides. If n is specified and more space is required for the download, no download occurs.
-a (Continued)
MaxFSSize

Specifies the maximum allowable size to which the DLTarget filesystem can be extended, in MB. If it is determined that the download operation exceeds this limit, no download occurs. A value of unlimited or -1 can be specified to indicate no higher limit on the size of the filesystem. The filesystem can be expanded until physical disk space is exhausted if no higher limit is set on the size of the filesystem.

The actual size of the DLTarget filesystem after expansion might be slightly larger than the requested size. The expansion process of the DLTarget filesystem uses the physical partition (PP) size of the volume group (VG). The required filesystem size is rounded up to the next multiple of a PP when expanding the filesystem. The suma command multiplies the total download size of the technology levels and service packs by a fudge factor of 1.15 to calculate the required filesystem memory for the download of the technology levels and service packs.

You can calculate the value for the MaxFSize option by using the following formula:

Y = X * 1.15 / (1024 * 1024)

where Y is the required filesystem size in MB and X is the total bytes of updates downloaded.

If the available free memory (in MB) in the filesystem is denoted by Z, and the value of Y is greater than Z, more memory is required in the filesystem to download the technology levels and service packs. The extra memory that is required in the filesystem can be calculated as the difference of the values of Y and Z in MB. If the total size of the filesystem is denoted by T (in MB), then the filesystem is expanded to the value of F, where F is calculated by using the following formula:

F = T + ( Y - Z )

Setting the MaxFSize option to a value greater than the value of F ensures that the filesystem is expanded to a size that enables download of fixes to be completed successfully.

Parameters

Item Description
TaskID Specifies a unique numeric identifier that is associated with a task. This ID is assigned when a task is created.

Exit Status

Item Description
0 The command completed successfully.
>0 An error occurred.

Examples

  1. To list the SUMA global configuration settings, run the following command:
    suma -c
    Output similar to the following output is displayed:
    FIXSERVER_PROTOCOL=https
    DOWNLOAD_PROTOCOL=http
    DL_TIMEOUT_SEC=180
    DL_RETRY=1
    HTTP_PROXY=
    HTTPS_PROXY=
    SCREEN_VERBOSE=LVL_INFO
    NOTIFY_VERBOSE=LVL_INFO
    LOGFILE_VERBOSE=LVL_VERBOSE
    MAXLOGSIZE_MB=1
    REMOVE_CONFLICTING_UPDATES=yes
    REMOVE_DUP_BASE_LEVELS=yes
    REMOVE_SUPERSEDE=yes
    TMPDIR=/var/suma/tmp 
  2. To edit the SUMA global configuration setting to change the maximum log file size to 2 MB, run the following command:
    suma -c -a MAXLOGSIZE_MB=2
  3. To list the SUMA task defaults, run the following command:
    suma -D 
    Output similar to the following output is displayed:
    DisplayName=
    Action=Download
    RqType=Latest
    RqName=
    Repeats=y
    DLTarget=/usr/sys/inst.images
    NotifyEmail=root
    FilterDir=/usr/sys/inst.images
    FilterML=7300-02
    MaxDLSize=-1
    Extend=y
    MaxFSSize=-1
  4. To create and schedule a task that downloads the latest fixes monthly (for example, on the 15th of every month at 2:30 AM.), run the following command:
    suma -s "30 2 15 * *" -a RqType=Latest \
    -a DisplayName="Latest fixes - 15th Monthly"
    Note: A task ID is returned for this newly created task. This example assumes that some of the SUMA task defaults are used, as displayed in the suma -D example. For example, when the task default of DLTarget=/usr/sys/inst.images, the installp images are downloaded into the /usr/sys/inst.images/installp/ppc directory.
  5. To view SUMA scheduling information that is set up by running a suma -s CronSched command, run the following command:
    crontab -l root
  6. To create and schedule a task that checks for a specific TL once a week (for example, every Thursday at 3 AM.), downloads it when it becomes available, and sends email notifications to users on a remote system, run the following command:
    suma -s "0 3 * * 4" -a RqType=TL -a RqName=6100-04 \
    -a NotifyEmail="bob.smith@host2,ann@host2"
    Note: To make a weekly check for a TL, the Repeats field needs to be set to y. In this case, after the TL is found, the task is deleted. If Repeats=n, only a single check occurs before deleting the task.
  7. To create and schedule a task that checks for critical fixes monthly (for example, on the 20th of every month at 4:30 AM.), run the following command:
    suma -s "30 4 20 * *" -a RqType=Latest -a RqName= \
    -a RqLevel=latest -a Repeats=y 
    Note: By setting Repeats=y, this task 'repeats forever' and is not deleted after a successful download.
  8. To create and schedule a task that downloads the entire AIX Version 7.1 with the 5300-11 Recommended Maintenance package into the /lppsrc/5311 directory on Monday at 11:00 PM, and runs an lppmgr command clean operation after the download operation to remove any superseded updates, duplicate base levels, and conflicting updates, run the following command:
    suma -s "0 23 * * 1" -a Action=Clean -a RqType=ML -a RqName=5300-11 \
    -a DLTarget=/lppsrc/5311
    Note: Before running a task that specifies Action=Clean, you can run suma -c to verify the SUMA global configuration settings that are used when you run lppmgr command. In this case, having REMOVE_SUPERSEDE, REMOVE_DUP_BASE_LEVELS, and REMOVE_CONFLICTING_UPDATES all set to yes results in the action described earlier.
  9. To create and schedule a task that downloads the entire AIX Version 7.1 with the 5300-11 Recommended Maintenance package into the /tmp/lppsrc/5311 directory on Monday at 11:00 PM, filtering against any updates already contained in /lppsrc, run the following command:
    suma -s "0 23 * * 1" -a RqType=ML -a RqName=5300-11 \
    -a DLTarget=/tmp/lppsrc/5311 -a FilterDir=/lppsrc -a FilterSysFile=/dev/null 
    Note: After the task is successfully completed, the task is removed because RqType=TL is a repeat until found task. However, if Repeats=n, only a single check for the 5300-03 TL is made, and if the TL is not found on the fix server, the task is deleted because it is set up not to repeat.
  10. To immediately execute a task that performs a preview to check whether an SP exists on the fix server, and to create and save this task for later scheduling if the SP does not yet exist, run the following command:
    suma -x -w -a Action=Preview -a RqType=SP -a RqName=6100-04-02
    Note: A task ID is returned for this newly created task.
  11. To immediately execute the newly created task from the earlier example (assume task ID 23 was returned) and attempt to download the SP and save the Action=Download setting for task ID 23, run the following command:
    suma -x -w -a Action=Download 23
    Note: Because this task is being run from the command line, and not scheduled through cron, the Repeats field are ignored and this task is not deleted regardless of whether the SP is found.
  12. To schedule task ID 23 to repeatedly check for a specific SP once a week (for example, every Thursday at 3 AM.), and download it when it becomes available, run the following command:
    suma -s "0 3 * * 4" -a Repeats=y 23
    Note: This task is deleted when the SP is found.
  13. To unschedule a task that removes its scheduling information from the crontab file in the /var/spool/cron/crontabs directory, run the following command:
    suma -u 23
  14. To delete a task that also removes its scheduling information if it exists, run the following command:
    suma -d 23
  15. To list multiple SUMA tasks, where 4 and 23 represent task IDs, run the following command:
    suma -l 4 23
  16. To list all SUMA tasks, run the following command:
    suma -l
  17. To create and schedule a task that checks monthly (for example, on the 15th of every month at 2:30 AM.) for the latest service pack on the specified FilterML, and download any that are not already in the /tmp/latest repository, run the following command:
    suma -s "30 2 15 * *" -a RqType=Latest -a FilterML=6100-02 \
    -a DLTarget=/tmp/latest -a FilterDir=/tmp/latest
    Note: A task ID is returned for this newly created task.

Location

/usr/suma/bin/suma

Files

Item Description
/usr/suma/bin/suma Contains the suma command.
/usr/sbin/suma Link to /usr/suma/bin/suma.
/var/adm/ras/suma.log Contains detailed results from running the suma command.
/var/adm/ras/suma_dl.log Contains a list of files that are downloaded.
/var/spool/cron/crontabs Directory that contains the crontab file for scheduling.