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 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:
To list or edit the SUMA global configuration settings:
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
Flags
Item | Description |
---|---|
-c | Lists or edits the SUMA global configuration
settings. The -a flag allows one or more configuration setting
to be updated to the specified value. When used without the -a flag,
all SUMA configuration settings are listed. The configuration
settings that can be edited with the -a flag are as follows:
|
-c (Continued) |
|
-c (Continued) |
|
-d | Deletes the SUMA task associated with the given 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 will be listed. |
-l | Lists SUMA tasks. When used without a TaskID, all SUMA tasks will be 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 functionality).
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 additional details):
|
-u | Unschedules a SUMA task. This 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 should 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.
For the create or edit operation on a SUMA task, the following are
the supported Fields and Values.
|
-a (Continued) |
|
-a (Continued) |
|
-a (Continued) |
|
Parameters
Item | Description |
---|---|
TaskID | Specifies a unique numeric identifier that is associated with a task. This is assigned when a task is created. |
Exit Status
Item | Description |
---|---|
0 | The command completed successfully. |
>0 | An error occurred. |
Examples
- To list the SUMA global configuration settings, type the following:
Output similar to the following is displayed:suma -c
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
- To edit the SUMA global configuration setting to change the maximum
log file size to 2 MB, type the following:
suma -c -a MAXLOGSIZE_MB=2
- To list the SUMA task defaults, type the following:
Output similar to the following is displayed:suma -D
DisplayName= Action=Download RqType=Latest RqName= Repeats=y DLTarget=/usr/sys/inst.images NotifyEmail=root FilterDir=/usr/sys/inst.images FilterML=7200-02 MaxDLSize=-1 Extend=y MaxFSSize=-1
- To create and schedule a task that downloads the latest fixes
monthly (for example, on the 15th of every month at 2:30 a.m.), type
the following:
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 some of the SUMA task defaults, as displayed in the suma -D example, are utilized. 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. - To view SUMA scheduling information that has been set up by running
a suma -s CronSched command, type the following:
crontab -l root
- To create and schedule a task that checks for a specific TL once
a week (for example, every Thursday at 3 a.m.), downloads it when
it becomes available, and sends e-mail notifications to users on a
remote system, type the following:
suma -s "0 3 * * 4" -a RqType=TL -a RqName=6100-04 \ -a NotifyEmail="bob.smith@host2,ann@host2"
Note: For this task 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. - To create and schedule a task that checks for critical fixes monthly
(for example, on the 20th of every month at 4:30 a.m.), type the following:
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. - 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 p.m., and runs an lppmgr clean operation after the
download operation to remove any superseded updates, duplicate base
levels, and conflicting updates, type the following:
suma -s "0 23 * * 1" -a Action=Clean -a RqType=ML -a RqName=5300-11 \ -a DLTarget=/lppsrc/5311
Note: Prior to 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 previously described. - 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 p.m., filtering against any updates already contained
in /lppsrc, type the following:
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 has been set up not to repeat. - To immediately execute a task that performs a preview to check
if an SP exists on the fix server, and to create and save this task
for later scheduling if the SP does not yet exist, type the following:
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. - To immediately execute the newly created task from the above example
(assume task ID 23 was returned) and attempt to download the SP and
save the Action=Download setting for task ID 23, type the following:
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. - To schedule task ID 23 to repeatedly check for a specific SP once
a week (for example, every Thursday at 3 a.m.), and download it when
it becomes available, type the following:
suma -s "0 3 * * 4" -a Repeats=y 23
Note: This task is deleted when the SP is found. - To unschedule a task that removes its scheduling information from
the crontab file in the /var/spool/cron/crontabs directory,
type the following:
suma -u 23
- To delete a task that also removes its scheduling information
if it exists, type the following:
suma -d 23
- To list multiple SUMA tasks, where
4
and23
represent task IDs, type the following:suma -l 4 23
- To list all SUMA tasks, type the following:
suma -l
- To create and schedule a task that checks monthly (for example,
on the 15th of every month at 2:30 a.m.) for the latest service pack
on the specified FilterML, and download any that are not already
in the /tmp/latest repository, type the following:
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 have been downloaded. |
/var/spool/cron/crontabs | Directory that contains the crontab file for scheduling. |