Description
Registers, updates, deletes, lists, displays details of, and reports about views managed by Systemwalker Software Configuration Manager.
Synopsis
[Windows]
swcfmg_report_view.exe { -add [ -id "View ID" ] -name "View name" -file "View definition file path" | -update -id "View ID" [-name "View name" ] [-file "View definition file path"] | -delete -id "View ID" | -list [ -file "Output file path" ] [-e "Character encoding"] | -get -id "View ID" [ -file "Output file path" ] | -report id "View ID" [ -policyid "Policy ID" ] -file "Output file path" [-e "Character encoding"] }
[Linux]
swcfmg_report_view { -add [ -id "View ID" ] -name "View name" -file "View definition file path" | -update -id "View ID" [-name "View name" ] [-file "View definition file path"] | -delete -id "View ID" | -list [ -file "Output file path" ] [-e "Character encoding"] | -get -id "View ID" [ -file "Output file path" ] | -report id "View ID" [ -policyid "Policy ID" ] -file "Output file path" [-e "Character encoding"] }
Options
Registers a view. Specify the view ID and view name of the view to register. When the view ID is omitted, the ID is automatically numbered. For the "-file" option, specify the path of the view definition file. For details of the view definition file, refer to "2.2.9 View Definition File".
Updates the view specified using the view ID. Specify the view ID of the view to update. When updating a view definition, specify the path of the view definition file for the -file option. For information on the view definition file, refer to "2.2.9 View Definition File".
Deletes the view specified using the view ID. Use the "-list" option of this command to check the view ID.
Outputs view information in CSV format.
If -file "Output file path" is omitted, information will be output to the standard output for the command. If the specified file does not exist, a new file will be created. If the file exists, the existing file will be overwritten. If the file cannot be output because of an error, either a new file will not be created or, if an existing file was to be overwritten, the existing file will be kept as it is, without being overwritten.
For details on the format of output files, refer to "Notes".
Outputs the definition of the view specified using the view ID.
If -file "Output file path" is omitted, information will be output to the standard output for the command. If the specified file does not exist, a new file will be created. If the file exists, the existing file will be overwritten. If the file cannot be output because of an error, either a new file will not be created or, if an existing file was to be overwritten, the existing file will be kept as it is, without being overwritten.
For information on the output file, refer to "2.2.9 View Definition File".
Outputs the configuration information displayed in the view specified using the view ID. When a policy is specified using a policy ID, only the configuration information in violation of that policy is output. When the policy ID is omitted, all entries of configuration information are output.
If the specified file does not exist, a new file will be created. If the file exists, the existing file will be overwritten. If the file cannot be output because of an error, either a new file will not be created or, if an existing file was to be overwritten, the existing file will be kept as it is, without being overwritten.
For details on output files, refer to "Notes".
Specify the character encoding for the file.
The following character encoding can be specified. Use uppercase letters.
UTF-8
If this option is omitted, the character encoding of the execution environment of this command will be used.
Return codes
Return Code | Meaning |
---|---|
0 | The command has terminated normally. |
10 | A parameter error has occurred. |
20 | The specified I/O path is incorrect. |
30 | The specified character encoding is incorrect. |
50 | The file description is incorrect. |
70 | The specified view or policy is incorrect. |
100 | Systemwalker Software Configuration Manager is not running. |
101 | A command that cannot be executed at the same time as this command is already running. |
102 | You do not have the privileges required to execute this command. |
110 | A write error has occurred. |
200 | Setup has not been performed. |
255 | A system error has occurred. |
Command location
[Windows]
Systemwalker Software Configuration Manager installation directory\SWCFMGM\bin
[Linux]
/opt/FJSVcfmgm/bin
Privilege required
[Windows]
This command can be executed on the admin server.
[Linux]
This command can be executed on the admin server.
Notes
This command cannot be executed at the same time as other commands. An exclusive control error will occur if a command is executed while another command is still executing.
Execute this command while Systemwalker Software Configuration Manager is running.
For view ID, specify up to 32 characters. Alphanumeric characters, hyphens ("-"), and underscores ("_") may be used. The string must start with an alphanumeric character.
For view name, specify a character string containing up to 85 characters.
The specified view ID must be unique within the product.
When updating registered view information, it is recommended to edit the file which is displayed details of, and then use the edited file as the input data for update.
Before updating view information, disable all policies for the corresponding view. An error will occur if update is performed when enabled policies exist. After updating, review the content of policies and update the policies if necessary.
Use this command to delete views that are no longer required for this product.
An error will occur if deletion is performed when there are policies enabled for the view to delete. Delete any existing policies and then delete the view.
In each line of a CSV file, one entry of registered view information is output. The following format is used for CSV files.
Item No. | Item Name |
---|---|
1 | View ID |
2 | View name |
When no view information is registered, only header information is output.
#view-id,view-name
Views are output in CSV format. Each column in a view is output as a single column in the CSV file.
The value specified for the column name of the view is output to the header of the CSV file. The header line begins with a number sign "#". When there is no information to output, only the header line is output.
When the attribute value is an empty string, "_EMPTY_" is output.
When a policy is specified, the following information is output according to the policy target type:
CI Count
The attribute value of the CI at the hierarchy level in violation of the policy as well as the attribute values of all CIs that have relations with that CI.
Attribute Value
Attribute values of the CI corresponding to the attributes violating the policy as well as attribute values of all CIs that have relations with that CI.
Examples
Registration
[Windows]
swcfmg_report_view.exe -add -name "View_1" -file C:\work\viewdef.xml
[Linux]
swcfmg_report_view -add -name "View_1" -file /tmp/viewdef.xml
Update
[Windows]
swcfmg_report_view.exe -update -id PGGEG45GR -file C:\work\viewdef.xml
[Linux]
swcfmg_report_view -update -id PGGEG45GR -file /tmp/viewdef.xml
Deletion
[Windows]
swcfmg_report_view.exe -delete -id PGGEG45GR
[Linux]
swcfmg_report_view -delete -id PGGEG45GR
List
[Windows]
swcfmg_report_view.exe -list -file C:\work\viewinfo.csv
[Linux]
swcfmg_report_view -list -file /tmp/viewinfo.csv
Details
[Windows]
swcfmg_report_view.exe -get -id PGGEG45GR -file C:\work\viewdef.xml
[Linux]
swcfmg_report_view -get -id PGGEG45GR -file /tmp/viewdef.xml
Reporting
[Windows]
swcfmg_report_view.exe -report -file C:\work\viewreport.csv
[Linux]
swcfmg_report_view -report -file /tmp/viewreport.csv