ServerRestart
- Last UpdatedJul 18, 2023
- 1 minute read
Allows you to restart any specific alarm, report, trend or I/O server from any Cicode node in a system, without affecting other server processes running on the same machine. To call this function, a valid user needs to be logged in.
For this function to operate successfully, you need to make the following Citect.ini parameter settings:
-
[Shutdown]NetworkStart = "1" on the computer where the issuing client is running.
-
[Shutdown]NetworkIgnore = "0" (zero) on the computer where the server is running.
This function is a blocking function. It blocks the calling Cicode task until the operation is complete.
Syntax
INT error = ServerRestart (STRING sServerName, STRING sCluster = "")
sServerName:
The name of the server to restart
sCluster:
The cluster the server belongs to. This parameter is optional. If sCluster is not specified the current system cluster is used.
Return Value
0 (zero) if successful, otherwise one of the following error codes is returned:
-
256 - General software error
-
292 - Invalid function
-
403 - Cluster not found
-
418 - No server of type on cluster
-
512 - Time out error
-
513 - Access denied error
See Also
Related Functions
ServerGetProperty, ServerInfo, ServerInfoEx, ServerIsOnline, ServerReload
Example
ServerRestart("AlarmServer1", "Cluster1");