Description
This command registers, updates, deletes, and lists server information managed by Systemwalker Software Configuration Manager.
This command cannot be used to register, update, or delete servers managed by ServerView Resource Orchestrator or OpenStack.
Synopsis
[Windows]
swcfmg_server.exe |
[Linux]
swcfmg_server |
Options
Registers server information using the data entered in the specified server information file.
The server information file is in CSV format (refer to "2.2.5 Server Information File" for details).
Updates server information using the data entered in the specified server information file.
The server information file is in CSV format (refer to "2.2.5 Server Information File" for details).
Specify a server ID or an IP address to delete a registered server. Multiple server IDs or IP addresses can be specified by delimiting them with ',' (comma).
Outputs, in CSV format, the server information registered using this command and swcfmg_define_serverinfo (Managed Server Information Definition command).
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.
By specifying the options below, you can filter the server information to be output. Otherwise all the server information registered using this command and swcfmg_define_serverinfo (Managed Server Information Definition command) is output.
Specify the server name of the server to be output.
Specify the server group ID of the server to be output.
Specify the site ID of the server to output. The following site ID can be specified. When -all is specified, server information of all sites is output.
OpenStack: OpenStack server
ROR: Server of ServerView Resource Orchestrator
Direct: Manually registered server
You can specify the output format by specifying the options below:
When this option is omitted or the "-site" option is specified, the server information is output in CSV format. For details on the output file when this option is omitted, refer to "2.2.5 Server Information File". For details on the output file when the "-site" option is specified, refer to "2.4.2 Site Server Information File". When the "-getserverid" option is specified, only the server ID of the server is output.
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.
Performs the connection test. If this option is specified, the connection test will be performed after server information is registered or updated. If this option is omitted, the connection test will not be performed (refer to "1.2.11 swcfmg_connectiontest (Connection Test Command)" for details).
If this option is specified, server information is displayed in ascending "Server group ID" order. "lplatform-id" is the former option. For new operations, use "servergroup-id".
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. |
80 | The connection test failed. |
81 | This operation cannot be performed for server groups or servers managed using ServerView Resource Orchestrator. |
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. |
103 | Connection to the directory service failed. |
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/execution environment
[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
Registration, moving, and deletion of this command cannot be executed at the same time. If a command is executed while another command is being executed, an exception error will occur.
Execute this command while Systemwalker Software Configuration Manager is running.
This command cannot be used to update or delete servers managed using ServerView Resource Orchestrator or OpenStack.
Server information is registered in accordance with the server information file.
Specify an "IP address" that is unique within the product. In addition, when linking to ServerView Resource Orchestrator or OpenStack, specify the IP address so that it is unique within the servers managed by ServerView Resource Orchestrator and OpenStack.
Adding servers to server groups managed by ServerView Resource Orchestrator is not possible.
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 server information, it is recommended that you edit the listed file and use the edited file as the input file for update.
Updating cannot be performed for the servers managed by ServerView Resource Orchestrator or OpenStack.
Use this command to delete server information that is no longer required for Systemwalker Software Configuration Manager.
Servers managed by ServerView Resource Orchestrator or OpenStack cannot be deleted.
If no server information is registered, only header information is output.
#ipaddress,server-name,servergroup-id,host-name,os-type,os-architecture,os-name |
To include servers managed by ServerView Resource Orchestrator or OpenStack in the list display, specify the "-all" option.
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 (refer to the "2.2.5 Server Information File" for details). |
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 Server is specified in another line. | The same IP address is already defined in one of the preceding lines. |
The specified Server group does not exist. | There is no server group corresponding to <servergroup-id> in the given line. Specify the ID of an existing server group. |
The Server has already been registered. | The server information in the given line is already registered. |
The specified server does not exist. | There is no server information corresponding to <IP address> in the given line. Specify the IP address of an existing server. |
The Server cannot be operated. | The server information in the given line is for a server managed using ServerView Resource Orchestrator or OpenStack. This command cannot update this type of server information. |
The Server cannot be added to the specified Server group. | The server group corresponding to "servergroup-id" in the given line is managed using ServerView Resource Orchestrator or OpenStack. This command cannot add a server to this server group. |
Example
Registration
[Windows]
swcfmg_server.exe -add -file C:\work\serverinfo.csv |
[Linux]
swcfmg_server -add -file /tmp/serverinfo.csv |
Update
[Windows]
swcfmg_server.exe -update -file C:\work\serverinfo.csv |
[Linux]
swcfmg_server -update -file /tmp/serverinfo.csv |
Deletion
[Windows]
swcfmg_server.exe -delete -ip 192.168.1.1,192.168.1.2 |
[Linux]
swcfmg_server -delete -ip 192.168.1.1,192.168.1.2 |
List
[Windows]
swcfmg_server.exe -list -file C:\work\serverinfo.csv |
[Linux]
swcfmg_server -list -file /tmp/serverinfo.csv |
Execution results/output format
List
Standard output
#ipaddress,server-name,servergroup-id,host-name,os-type,os-architecture,os-name 192.168.1.1,development_server1,UB5IFK3AT@Direct,kaihatsu1,Windows,x64,Windows Server 2008 R2 192.168.1.2,development_server2,YFEFI9P7Q@Direct,kaihatsu2,Windows,x64,Windows Server 2008 R2
File output
CFMGC30151 The server 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,server-name,servergroup-id,host-name,os-type,os-architecture,os-name