Top
Systemwalker Software Configuration Manager Developer's Guide
FUJITSU Software

5.2.1 swcfmg_source_def (Information Collection Source Management Command)

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

-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"

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".

-update -id "Information collection source ID" [-softitem "Software collection item information file path"] [-patchitem "Patch collection item information file path"]

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".

-batchupdate -file "Information collection source file path"

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.

-delete -id "Information collection source ID"

Deletes the information collection source specified using the information collection source ID.

-list [-file "Output file path"]

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".

-get id "Information collection source ID" [-softitem "Collection item definition file path"] [-patchitem "Collection item definition file path"]

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.

-upload -id "Information collection source ID" -file "Script package file path"

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.

-download -id "Information collection source ID" -dir "Output directory path"

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.

-e "Character encoding"

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]

[Linux]

Notes

Common notes
Notes regarding registration
Notes regarding updating
Notes regarding batch updating
Notes regarding deletion
Notes regarding displaying details
Notes regarding uploading and downloading
Notes regarding registration and update errors

Examples