Description
Registers, updates, performs batch updates, deletes, lists, displays details, uploads, and downloads the information collection sources managed by Systemwalker Software Configuration Manager.
Synopsis
[Windows]
swcfmg_source_def.exe { -add -id "Information collection source ID" -softitem "Software collection item information file path" [-patchitem "Patch collection item information file path"] -file "Script package file path" [-e "Character encoding"] | -update -id "Information collection source ID" [-softitem "Software collection item information file path"] [-patchitem "Patch collection item information file path"] [-e "Character encoding"] | -delete -id "Information collection source ID" | -list [-file Output file path] [-e "Character encoding"] } -get -id "Information collection source ID" [-softitem "Collection item information file path"] [-patchitem "Collection item information file path"] [-e "Character encoding"] | -upload -id "Information collection source ID" -file "Script package file path" | -download -id "Information collection source ID" -dir "Output directory path" }
[Linux]
swcfmg_source_def { -add -id "Information collection source ID" -softitem "Software collection item information file path" [-patchitem "Patch collection item information file path"] -file "Script package file path" [-e "Character encoding"] | -update -id "Information collection source ID" [-softitem "Software collection item information file path"] [-patchitem "Patch collection item information file path"] [-e "Character encoding"] | -batchupdate -file "Information collection source file path" [-e "Character encoding"] | -delete -id "Information collection source ID" | -list [-file Output file path] [-e "Character encoding"] } -get -id "Information collection source ID" [-softitem "Collection item information file path"] [-patchitem "Collection item information file path"] [-e "Character encoding"] | -upload -id "Information collection source ID" -file "Script package file path" | -download -id "Information collection source ID" -dir "Output directory path" }
Options
Registers the information collection source specified using the information collection source ID. Specify the collection items of software and patches for the -softitem and -patchitem option. Specify the collection items using a CSV file. For details on the file, refer to "6.2.2 Collection Item Information File". Specify a script package for the -file option. For details on script packages, refer to "1.1.1.2 Software Patch Collection Script".
Updates the collection item of the information collection source specified using the information collection source ID. Specify the collection items of software and patches to be updated for the -softitem and -patchitem options. Specify the collection items using a CSV file. For details on the file, refer to "6.2.2 Collection Item Information File".
Based on the details described in the specified information collection source definition file, performs batch update of multiple information collection sources. The information collection source definition file is in CVS format. For details on the information collection source definition file, refer to "6.2.1 Information Collection Source File". Collection items cannot be updated using this option. Perform updates of collection item using the -update option of this command.
Deletes the information collection source specified using the information collection source ID.
Displays a list of the registered information collection sources. The information is output 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 output to the file fails due to an error, no new file will be created. The existing file cannot be overwritten. For details on the output file, refer to "6.2.1 Information Collection Source File".
Outputs the details of the information collection source specified using the information collection source ID. Outputs the collection items of software and patches to the file path specified for the -softitem and -patchitem options. The file is in CSV format. For details on the file, refer to "6.2.2 Collection Item Information File". If the specified file does not exist, a new file will be created. If the file exists, the existing file will be overwritten. If output to the file fails due to an error, no new file will be created. The existing file cannot be overwritten.
Uploads the script package of the information collection source specified using the information collection source ID. Upload a script package to update it. The script package is a zip file. When the following conditions are satisfied, the script package can be uploaded. When the following conditions are not satisfied, an error occurs.
File extension must be .zip.
Ensure that the file extension is .zip.
File size must be no greater than 2 MB.
The maximum uploadable file size is 2 MB.
Store the directories for OS types in the root.
Store the OS type directories (Windows, Linux, or Solaris) in the ZIP file root.
Downloads the script package of the information collection source specified using the information collection source ID. Outputs script package ZIP files to the output directory path.
Ensure that no files exist in the output directory, or an error will occur. When a file exists in the output directory, an error occurs.
Specify the character encoding for the file.
The character encodings below 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.
Return values
Return Value | Meaning |
---|---|
0 | Completed normally. |
10 | A parameter error has occurred. |
20 | There is an error in the specified I/O file path. |
30 | The specified character encoding is incorrect. |
50 | The file description is incorrect. |
70 | There is an error in the specified information collection source ID. |
100 | Systemwalker Software Configuration Manager is not running. |
101 | A command that cannot be executed at the same time as this command is executing. |
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
Admin server
[Windows]
<Systemwalker Software Configuration Manager installation directory>\SWCFMGM\bin
[Linux]
/opt/FJSVcfmgm/bin
Privilege required for execution
[Windows]
Administrator privileges are required. Execute this command as an administrator.
This command can be executed on the admin server.
[Linux]
This command can only be executed by the system administrator (superuser).
This command can be executed on the admin server.
Notes
Commands provided by Systemwalker Software Configuration Manager cannot be executed simultaneously. 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 the information collection source ID, specify a character string beginning with an alphanumeric character and containing up to 16 alphanumeric characters, hyphens (-), and underscores (_). The following IDs cannot be used.
Direct
UpdateAdvisor
ROR
OpenStack
When describing the collection item information file, note the following:
Describe the collection item for each software and patch separately.
Describe one collection item per line. In addition, the same collection item cannot be described multiple times.
For details on available collection items, refer to "1.1.2 List of Collection Items".
When defining the software collection item, note the following:
Be sure to include a software name and an OS type in the identification item.
The installation location cannot be used as an identification item.
When defining the patch collection item, note the following:
Be sure to include a patch name and an OS type in the identification item.
Be sure to define the target software as a definition item. It cannot be used as an identification item.
When registering an information collection source with the same ID as a deleted information collection source, perform discovery of the software information once before registration.
Be sure to define the software collection item. When the patch information cannot be collected from the information collection source, it is not necessary to define the patch collection item.
When there is an OS type which cannot be collected, it is not necessary to register the software patch collection script for the OS type.
Behavior is not guaranteed if the character encoding specified for this command does not match the character encoding specified in the collection item information file. Ensure that the character encoding matches.
Be sure to specify the collection item of either the software or patches.
The information collection source cannot update the collection item of UpdateAdvisor.
When describing the collection item information file, note the following:
Describe the collection item for each software and patch separately.
Describe one collection item per line. In addition, the same collection item cannot be described multiple times.
Describe all collection items to be defined including any items which are not to be updated.
For details on available collection items, refer to "1.1.2 List of Collection Items".
When defining the collection item of the installation location for the software collection item, the collection item of the installation location cannot be deleted later.
Identification items cannot be added or deleted.
The target software must be defined in the patch collection items as a definition item.
Depending on the updated collection item, perform the necessary revisions of the software patch collection script, and upload
the software patch collection script.
Behavior is not guaranteed if the character encoding specified for this command does not match the character encoding specified in the collection item information file. Ensure that the character encoding matches.
Using this option, registration and deletion of information collection sources cannot be performed. To perform these operations, use the -add and -delete options.
Manually registered information collection sources cannot be enabled.
The information collected from a deleted information collection source is deleted when discovery of software information is performed after the deletion of the information collection source using this option.
Manually registered information collection sources and the UpdateAdvisor information collection source cannot be deleted.
When the patch collection item is not defined in the specified information collection source, the patch collection item is not output.
The information collection source cannot upload and download UpdateAdvisor and manually registered script packages.
When downloading, the file name of the script package is output in the following format:
Information collection source ID + ".zip"
If there is an error in the collection item information file, registration and update of the collection item will be canceled. An error message similar to the following will be output to the trace log:
If there is an error in the collection item information file, registration and update of the collection item will be canceled. An error message similar to the following will be output to the trace log:
One of the following messages will be output in [Cause]:
Message | Meaning |
---|---|
Number of elements. | Review the number of elements in the line indicated. |
The specified elements are invalid. | An invalid value is entered in the element in "()" in the line indicated. Enter a valid value. For details on available values, refer to "6.2.2 Collection Item Information File". |
Mandatory elements are not specified. | Enter the mandatory items in the line indicated. |
The same collection item is specified in another line. | The same collection item is already specified in one of the preceding lines. |
Mandatory identification items are not defined. | Required identification items have not been defined. |
Mandatory collection items are not defined. | Required collection items have not been defined. |
Examples
Registration
[Windows]
swcfmg_source_def.exe -add -id SourceDefA -softitem C:\work\softwareitem.csv -patchitem C:\work\patchitem.csv
[Linux]
swcfmg_source_def -add -id SourceDefA -softitem /tmp/softwareitem.csv -patchitem /tmp/patchitem.csv
Update
[Windows]
swcfmg_source_def.exe -update -id SourceDefA -softitem C:\work\softwareitem.csv -patchitem C:\work\patchitem.csv
[Linux]
swcfmg_source_def -update -id SourceDefA -softitem /tmp/softwareitem.csv -patchitem /tmp/patchitem.csv
Batch update
[Windows]
swcfmg_source_def.exe -batchupdate -file C:\work\soucedef.csv
[Linux]
swcfmg_source_def -batchupdate -file /tmp/soucedef.csv
Deletion
[Windows]
swcfmg_source_def.exe -delete -id SourceDefA
[Linux]
swcfmg_source_def -delete -id SourceDefA
List display
[Windows]
swcfmg_source_def.exe -add -file C:\work\soucedef.csv
[Linux]
swcfmg_source_def -add -file /tmp/soucedef.csv
Detail display
[Windows]
swcfmg_source_def.exe -get -id SourceDefA -softitem C:\work\softwareitem.csv -patchitem C:\work\patchitem.csv
[Linux]
swcfmg_source_def -get -id SourceDefA -softitem C:\work\softwareitem.csv -patchitem C:\work\patchitem.csv
Upload
[Windows]
swcfmg_source_def.exe -upload -id SourceDefA -file C:\work\sourcedef.zip
[Linux]
swcfmg_source_def -upload -id SourceDefA -file /tmp/sourcedef.zip
Download
[Windows]
swcfmg_source_def.exe -download -id SourceDefA -dir C:\work
[Linux]
swcfmg_source_def.exe -download -id SourceDefA -dir /tmp