Cicode Programming Reference > Cicode Function Categories > Server Functions > ServerGetProperty

ServerGetProperty

This function returns information about a specified server and can be called from any client.

Note: This function can only be called for Alarm, Report and Trend Servers

This function is a blocking function. It blocks the calling Cicode task until the operation is complete.

Syntax

STRING ServerGetProperty(STRING Server, STRING Property [, STRINGCluster]).

sServer:

The name of the server to be queried in quotations marks "". Can be prefixed by the name of the host cluster, that is "ClusterName.ServerName".

sProperty:

The name of the requested property. Can be one of the following:

"LastReloadError" - Error Code from the latest reload

"LibRDBMemTime" - Date and time of currently loaded cicode library (_library.RDB)

"LibRDBDiskTime" - Date and time of cicode library on disk (_library.RDB)

"RDBDiskTime" - Returns the date and time of RDB on disk (compiled)

"RDBMemTime" - Returns the date and time of currently loaded RDB (in-memory)

"ReloadStatus" - Returns 1 if the server is reloading, 0 if not

"ReloadProgress" - Reload Progress (in percent) Range: 0 – 100

"ServerStartState" - Returns the start up state of the server. Returns 0 if the server is starting, 1 if it is running.

"SyncStatus" - Returns the startup synchronization status:

"SyncProgress" - The percentage of the server synchronization progress: Range: 0-100

Note: The "ServerStartState" property is only supported for alarm servers. The "SyncStatus" and "SyncProgress" properties are only supported for trend and alarm servers.

sCluster:

The cluster of the server to be queried in quotation marks "". This parameter is optional. However, if the Server Name is not local or not specified in ClusterName.ServerName format an error code is returned.

Return Value

The value of the server property requested.

Related Functions

ServerInfo, ServerInfoEx, ServerIsOnline, ServerReload, ServerRestart

Example

ServerGetProperty("AlarmServer1", "ReloadStatus", "Cluster12");

See Also

Published June 2018