Description
Registers, updates, deletes, and lists hardware information managed by Systemwalker Software Configuration Manager.
Synopsis
[Windows]
swcfmg_hardware.exe { -add -file <hardware info file> [-e <Character encoding>] | -delete [-ip <IP address>] -serialno <serial number> [-os] | -list [-file <output file>] [-e <Character encoding>] } |
[Linux]
swcfmg_hardware { -add -file <hardware info file> [-e <Character encoding>] | -delete [-ip <IP address>] -serialno <serial number> [-os] | -list [-file <output file>] [-e<Character encoding>] |
Options
Registers hardware information using the data entered in the specified hardware information file.
The hardware information file is in CSV format. For details on the hardware information file, refer to "2.2.4 Hardware Information File".
Updates hardware information using the data entered in the specified hardware information file.
The hardware information file is in CSV format. For details on the hardware information file, refer to "2.2.4 Hardware Information File".
Delete the hardware information.
When deleting a chassis, specify the serial number of the management blade. The serial number of the management blade can be checked using the swcfmg_hardware -list command. It is different from the chassis serial number displayed on the management console. When -os is specified, the information of the OSs, hypervisors, and the guest OSs linked with the blade server or the rack mount server are also deleted.
When deleting blade servers and rack mount servers, specify the admin IP address and the serial number of the server.
The information of multiple pieces of hardware cannot be deleted at the same time.
Outputs the hardware information registered using this command in CSV format.
If -file <output file> is omitted, the information is output to the standard output for this 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.
Refer to "2.2.4 Hardware Information File" for information on the output file.
Specify the character encoding for the file.
The following character encoding 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 value
Return value | 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 IP address does not exist. |
71 | The specified serial number does not exist. |
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
Admin server
[Windows]
<Systemwalker Software Configuration Manager installation directory>\SWCFMGM\bin |
[Linux]
/opt/FJSVcfmgm/bin |
Privilege required
[Windows]
Administrator privileges are required. Execute as an administrator.
This command can be executed on the admin server.
[Linux]
System administrator (superuser) privileges are required.
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.
The column format of the hardware information file differs between V15.3 and V15.4.0 or later. When using the file used for V15.3, add column 4 (vendor-classification-name) and column 5 (model-group-name). When performing update, it is recommended to edit the file output for V15.4.0 or later and use it.
Hardware information is registered in accordance with the hardware information file.
Specify an <IP address> and a <serial number> to be unique within this product.
Behavior is not guaranteed if the character encoding specified for this command does not match the character encoding specified for the server information file. These character encodings must match.
When updating registered hardware information, it is recommended that you edit the listed file and use the edited file as the input file for update.
Use this command to delete hardware information that is no longer required for Systemwalker Software Configuration Manager. The information of multiple pieces of hardware cannot be deleted at the same time.
When deleting chassis information, specify the serial number of the management blade for -serialno.
When deleting a blade server or a rack mount server, specify the admin IP address for -ip (IP address of iRMC) or the server serial number for -serialno.
When deleting hardware information while linking to OpenStack, delete the hardware information using this command first, and then delete the configuration information in OpenStack. When deleting the configuration information in OpenStack, set the value of the "enable-openstack" key in the discovery definition file to "false", and then execute the OpenStack Information Update command.
For details on the discovery definition file, refer to "2.2.14 Discovery Definition File". For details on the OpenStack Information Update command, refer to "1.4.2 swcfmg_openstack_updateinfo (OpenStack Information Update Command)".
If no server information is registered, only header information is output.
#ipaddress,serial-number,hardware-type,vendor-classification-name,model-group-name,hardware-name,description,snmp-community-name,hardware-user-id,hardware-password,os-ipaddress,hypervisor-type,hypervisor-user-id,hypervisor-password |
If a server information file is invalid, the registration or update of the server information will be canceled. An error message similar to the following will be output to the trace log:
CFMGC20005 The file description is incorrect. [Line number:<n>][Cause:<Cause>] |
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. () | The values of elements within "()" in the given line are invalid. Enter the correct values For details on the available values, refer to "2.2.4 Hardware Information File". |
The specified elements cannot be changed. () | Elements within "()" in the given line cannot be changed. |
Mandatory elements are not specified. | Enter the mandatory elements in the given line. |
The same hardware is specified in another line. | The same IP address and the same serial number are already defined in one of the preceding lines. |
The hardware has already been registered. | The server information in the given line is already registered. |
The specified hardware does not exist. | There is no hardware information corresponding to <IP address> or <Serial number> in the given line. Specify the hardware IP address and the serial number of an existing server. |
The serial number of the hardware cannot be retrieved with the specified IP address. | The <serial number> cannot be acquired from the <ipaddress> in the line indicated. Specify the serial number or check if the hardware can respond. |
Example
Registration
[Windows]
swcfmg_hardware.exe -add -file C:\work\hardwareinfo.csv |
[Linux]
swcfmg_hardware -add -file /tmp/hardwareinfo.csv |
Update
[Windows]
swcfmg_hardware.exe -update -file C:\work\hardwareinfo.csv |
[Linux]
swcfmg_hardware -update -file /tmp/hardwareinfo.csv |
Deletion
[Windows]
swcfmg_hardware.exe -delete -ip 192.168.11.10 -serialno ST607A00001 |
[Linux]
swcfmg_hardware -delete -ip 192.168.11.1 0 -serialno ST607A00001 |
List
[Windows]
swcfmg_hardware.exe -list -file C:\work\hardwareinfo.csv |
[Linux]
swcfmg_hardware -list -file /tmp/hardwareinfo.csv |
Execution results/output format
List
Standard output
#ipaddress,serial-number,hardware-type,vendor-classification-name,model-group-name,hardware-name,asset-number,description,snmp-community-name,hardware-user-id,hardware-password,os-ipaddress,hypervisor-type,hypervisor-user-id,hypervisor-password 192.168.10.1,ST607A00001,chassis,BX900#1 for development,S1275007,development environment chassis,public,,,,,, 192.168.10.2,MA1700A00001,blade,development server#1,S1275009,Blade#1,,cfmguser,**** ,192.168.10.10,,, 192.168.10.3,MA1700A00005,blade,development server#2,S1275010,blade#2,,cfmguser,**** ,192.168.10.11,VMware,cfmguser,**** |
File output
CFMGC30551 The hardware information management command has completed normally. |
Note that the following header information is output as the first line of the CSV file that is output:
#ipaddress,serial-number,hardware-type,vendor-classfication-name,model-group-name,hardware-name,asset-number,description,snmp-community-name,hardware-user-id,hardware-password,os-ipaddress,hypervisor-type,hypervisor-user-id,hypervisor-password |