HostCpuCores Property

General info

Label

CPU Cores

Description

The number of CPU cores of the host.

Data type

UInt32

Type

Regular

Code

1227

Symbolic name

MODEL_PROP_HOSTCPUCORES

Lua access code

syslib.model.properties.HostCpuCores

Available since

1.0

Parent properties

HostInformation

Attributes

Name Tooltip
PROP_VISIBLE The property is visible in DataStudio and can be read by the inmation APIs.
PROP_VOLATILE The property exists during runtime of the service only and is not saved to the image.
PROP_DETECTABLE Property is detectable by system-driven server endpoint investigation.

Examples

Read from or write to the HostCpuCores property.

  • Lua

  • C#

-- Read from the HostCpuCores
syslib.getvalue("<OBJECT FULL PATH>.HostInformation.HostCpuCores")

-- Write to the HostCpuCores
syslib.setvalue("<OBJECT FULL PATH>.HostInformation.HostCpuCores", VALUE)
TcpConfig tcpcfg = new TcpConfig() { HostNameOrIp = "localhost", Port = 6512 };
SecurityCredentials sc = new SecurityCredentials() { ProfileName = "<username>", Password = "<password>" };
StatelessInterface sli = new StatelessInterface(tcpcfg);

// Read from the HostCpuCores
Result result = sli.ReadValue(sc, new ReadItem("<OBJECT FULL PATH>.HostInformation.HostCpuCores"));
// Write to the HostCpuCores
Result result = sli.WriteValue(sc, new WriteItem(VALUE, "<OBJECT FULL PATH>.HostInformation.HostCpuCores"));