sampolicy
Name
sampolicy - Checks if the policy in an input file is valid, activates the policy from this file, updates the current policy from the input file, and deactivates the current policy. Also saves the current policy to a file in XML format and can retrieve the policy information from this file. For more information, see
Synopsis
sampolicy -h
sampolicy –w Templatefilename
sampolicy –w –m TemplatefilenameNew TemplatefilenameOld
sampolicy [-T] [-V] [-q] [-f] [-forcecreate] -a Filename
sampolicy [-T] [-V] [-q] [-forcecreate] -u Filename
sampolicy [-T] [-V] [-q] [-f] [-forcecreate] -r Filename
sampolicy [-T] [-V] [-q] [-f] -d
sampolicy [-T] [-V] -s [Filename]
sampolicy [-T] [-V] [-u] -c Filename
sampolicy [-T] [-V] -i Filename
sampolicy [-T] [-V] [-q] [-f] [-forcecreate] -a -t Templatefilename
sampolicy [-T] [-V] [-q] [-forcecreate] -u -t Templatefilename
sampolicy [-T] [-V] [-q] [-f] [-forcecreate] -r -t Templatefilename
sampolicy [-T] [-V] [-u] -c -t Templatefilename
sampolicy [-T] [-V] -i -t Templatefilename
Description
The sampolicy command is a Java™ utility program that reads the System Automation for Multiplatforms XML policy from an XML document file, parse, validate, and send the configuration requests to the RecoveryRM daemon and other referenced RSCT resource managers (for example GlobalResRM) within the RSCT peer domain. The sampolicy command can also be used to save a snapshot of the current System Automation for Multiplatforms configuration to an XML document file.
Options
- -h
- Help. Writes the command's usage statement to standard output.
- -w
- SAP Central Services high availability policy feature only: Starts the Policy Setup wizard. You must configure the policy pool before you can use the wizard.
- -m
- SAP Central Services high availability policy feature only: Starts the Policy Setup wizard with a migration
between an old and a new template file. All values of the old template file are copied
to the new template file and the wizard proceeds based on the new file with the copied
values. If other values are required in the new template, they are marked in the
wizard parameter overview with the flag
Missing
and a value question. - -T
- Trace. Writes the command's trace messages to standard error. For your software-service organization's use only.
- -V
- Writes the command's verbose messages to standard output.
- -q
- Quiet mode, no interaction.
- -f
- Uses force to remove resources. Use this option with all tasks that remove resources like activate, deactivate, update, or remove. This option removes resources that are not in state offline or failed offline.
- -forcecreate
- Uses force to create resources. Use this option with all tasks that create resources like
activate, update, or remove. This option creates user-defined
IBM.AgFileSystem
resources for already harvested file systems. - -a
- Activates the policy from a file. All existing resources are deleted.
- -d
- Deactivates the active policy. All existing resources are deleted.
- -u
- Updates the active policy from a file without stopping any resource. All existing resources are either modified or kept unchanged. New resources are added to the policy.
- -r
- Updates the active policy from a file and removes all resources not in the file. All resources
that are not deleted are not stopped either. This option is like the option
-u
followed by the deletion of all resources not part of the file. - -s
- Saves the current configuration in XML format to a file. The file name must contain ASCII characters only.
- -c
- Checks if the policy in the input file is valid.
- -i
- Retrieves the policy information from a file.
- -t
- Runs template processing before any other task is started. When you use this option, the input file must be a template in XML format. Template processing is described in Using policy templates.
Parameters
- Filename
- Name of the file or absolute path of the file name that contains the policy XML. Filename is required for the options -a, -c, -i, -u, and -r. If no file name is provided for the -s option, the default path is /var/ct/{domain-name}/cfg. The default file name is sampolicy<month><day><year><time>.xml. If you specify a file name without a path, sampolicy tries to load the file from the current working directory.
- Templatefilename
- Name of the file or absolute path of the file name that contains the policy XML template. Templatefilename is required for the option -t and -w. If you specify a file name without a path, sampolicy tries to load the file from the current working directory.
- TemplatefilenameNew
- Name of the file or absolute path of the new template file. This parameter is required for option -w -m. If you specify a file name without a path, sampolicy tries to load the file from the current working directory.
- TemplatefilenameOld
- Name of the file or absolute path of the old template file that contains values to be merged into a new template file. This parameter is required for option -w -m. If you specify a file name without a path, sampolicy tries to load the file from the current working directory.
Security
This command requires root authority, or a user ID with appropriate permissions.
Examples
- To activate a policy, enter:
sampolicy -a /usr/xml/myPolicy.xml
- To deactivate a policy, enter:
sampolicy -d
- To save the policy to a file, enter:
sampolicy -s /usr/xml/currentpolicy.xml
- To update a policy from a template, enter:
sampolicy -u -t /usr/xml/myTemplate.xml
Files
- /usr/sbin/rsct/bin/sampolicy
- Location of the sampolicy command.
Exit Status
- 0
- The command completed successfully.
- 1
- Command parsing failed.
- 2
- Command processing failed.
- 3
- Java run time not found.