Skip to main content

io.edgehog.devicemanager.apps.stats.ContainerCpu v0.1

The precpu stats is the CPU statistic of the previous read, and is used to calculate the CPU usage percentage. It is not an exact copy of the cpu_stats field.

About​

This interface is of type datastream and is owned by the device, meaning that it is the device which initiates the data flow. Thanks to this type of interface, the device can send a mutable, ordered stream of data, with no concept of persistent state or synchronization.

Data gets sent with an object aggregation. Astarte expects the owner to send all of the interface's mappings at the same time, packed in a single message.

Mappings​

The interface has the following mappings:

  • /%{container_id}/cpuUsageTotalUsage with longinteger type. Total CPU time consumed in nanoseconds
  • /%{container_id}/cpuUsagePercpuUsage with longintegerarray type. Total CPU time (in nanoseconds) consumed per core
  • /%{container_id}/cpuUsageUsageInKernelmode with longinteger type. Time (in nanoseconds) spent by tasks of the cgroup in kernel mode
  • /%{container_id}/cpuUsageUsageInUsermode with longinteger type. Time (in nanoseconds) spent by tasks of the cgroup in user mode
  • /%{container_id}/systemCpuUsage with longinteger type. System Usage.
  • /%{container_id}/onlineCpus with integer type. Number of online CPUs.
  • /%{container_id}/throttlingDataPeriods with longinteger type. Number of periods with throttling active.
  • /%{container_id}/throttlingDataThrottledPeriods with longinteger type. Number of periods when the container hit its throttling limit.
  • /%{container_id}/throttlingDataThrottledTime with longinteger type. Aggregated time (in nanoseconds) the container was throttled for.
  • /%{container_id}/preCpuUsageTotalUsage with longinteger type. Total CPU time consumed in nanoseconds
  • /%{container_id}/preCpuUsagePercpuUsage with longintegerarray type. Total CPU time (in nanoseconds) consumed per core
  • /%{container_id}/preCpuUsageUsageInKernelmode with longinteger type. Time (in nanoseconds) spent by tasks of the cgroup in kernel mode
  • /%{container_id}/preCpuUsageUsageInUsermode with longinteger type. Time (in nanoseconds) spent by tasks of the cgroup in user mode
  • /%{container_id}/preSystemCpuUsage with longinteger type. System Usage.
  • /%{container_id}/preOnlineCpus with integer type. Number of online CPUs.
  • /%{container_id}/preThrottlingDataPeriods with longinteger type. Number of periods with throttling active.
  • /%{container_id}/preThrottlingDataThrottledPeriods with longinteger type. Number of periods when the container hit its throttling limit.
  • /%{container_id}/preThrottlingDataThrottledTime with longinteger type. Aggregated time (in nanoseconds) the container was throttled for.

/%{container_id}/cpuUsageTotalUsage​

Total CPU time consumed in nanoseconds

Total CPU time consumed by the container, in nanoseconds.

This endpoint accepts values of type longinteger: a signed 64 bit integer (please note that longinteger is represented as a string by default in JSON-based APIs.).

The endpoint is parametric and container_id can be replaced with any valid string to send data on specialized paths.

The endpoint has a specific configuration for how data is stored, transferred and indexed. Astarte expects a valid timestamp to be attached each time data is produced. Data is considered delivered when the transport successfully sends the data regardless of the outcome. Data is discarded if the transport is temporarily uncapable of delivering it.

/%{container_id}/cpuUsagePercpuUsage​

Total CPU time (in nanoseconds) consumed per core

This field is Linux-specific when using cgroups v1.

This endpoint accepts values of type longintegerarray: a list of values, represented as a JSON Array. Arrays can have up to 1024 items and each item must respect the limits of its scalar type.

The endpoint is parametric and container_id can be replaced with any valid string to send data on specialized paths.

The endpoint has a specific configuration for how data is stored, transferred and indexed. Astarte expects a valid timestamp to be attached each time data is produced. Data is considered delivered when the transport successfully sends the data regardless of the outcome. Data is discarded if the transport is temporarily uncapable of delivering it.

/%{container_id}/cpuUsageUsageInKernelmode​

Time (in nanoseconds) spent by tasks of the cgroup in kernel mode

CPU time spent in kernel mode by the container's tasks, in nanoseconds.

This endpoint accepts values of type longinteger: a signed 64 bit integer (please note that longinteger is represented as a string by default in JSON-based APIs.).

The endpoint is parametric and container_id can be replaced with any valid string to send data on specialized paths.

The endpoint has a specific configuration for how data is stored, transferred and indexed. Astarte expects a valid timestamp to be attached each time data is produced. Data is considered delivered when the transport successfully sends the data regardless of the outcome. Data is discarded if the transport is temporarily uncapable of delivering it.

/%{container_id}/cpuUsageUsageInUsermode​

Time (in nanoseconds) spent by tasks of the cgroup in user mode

This endpoint accepts values of type longinteger: a signed 64 bit integer (please note that longinteger is represented as a string by default in JSON-based APIs.).

The endpoint is parametric and container_id can be replaced with any valid string to send data on specialized paths.

The endpoint has a specific configuration for how data is stored, transferred and indexed. Astarte expects a valid timestamp to be attached each time data is produced. Data is considered delivered when the transport successfully sends the data regardless of the outcome. Data is discarded if the transport is temporarily uncapable of delivering it.

/%{container_id}/systemCpuUsage​

System Usage.

This endpoint accepts values of type longinteger: a signed 64 bit integer (please note that longinteger is represented as a string by default in JSON-based APIs.).

The endpoint is parametric and container_id can be replaced with any valid string to send data on specialized paths.

The endpoint has a specific configuration for how data is stored, transferred and indexed. Astarte expects a valid timestamp to be attached each time data is produced. Data is considered delivered when the transport successfully sends the data regardless of the outcome. Data is discarded if the transport is temporarily uncapable of delivering it.

/%{container_id}/onlineCpus​

Number of online CPUs.

This endpoint accepts values of type integer: a signed 32 bit integer.

The endpoint is parametric and container_id can be replaced with any valid string to send data on specialized paths.

The endpoint has a specific configuration for how data is stored, transferred and indexed. Astarte expects a valid timestamp to be attached each time data is produced. Data is considered delivered when the transport successfully sends the data regardless of the outcome. Data is discarded if the transport is temporarily uncapable of delivering it.

/%{container_id}/throttlingDataPeriods​

Number of periods with throttling active.

This endpoint accepts values of type longinteger: a signed 64 bit integer (please note that longinteger is represented as a string by default in JSON-based APIs.).

The endpoint is parametric and container_id can be replaced with any valid string to send data on specialized paths.

The endpoint has a specific configuration for how data is stored, transferred and indexed. Astarte expects a valid timestamp to be attached each time data is produced. Data is considered delivered when the transport successfully sends the data regardless of the outcome. Data is discarded if the transport is temporarily uncapable of delivering it.

/%{container_id}/throttlingDataThrottledPeriods​

Number of periods when the container hit its throttling limit.

This endpoint accepts values of type longinteger: a signed 64 bit integer (please note that longinteger is represented as a string by default in JSON-based APIs.).

The endpoint is parametric and container_id can be replaced with any valid string to send data on specialized paths.

The endpoint has a specific configuration for how data is stored, transferred and indexed. Astarte expects a valid timestamp to be attached each time data is produced. Data is considered delivered when the transport successfully sends the data regardless of the outcome. Data is discarded if the transport is temporarily uncapable of delivering it.

/%{container_id}/throttlingDataThrottledTime​

Aggregated time (in nanoseconds) the container was throttled for.

This endpoint accepts values of type longinteger: a signed 64 bit integer (please note that longinteger is represented as a string by default in JSON-based APIs.).

The endpoint is parametric and container_id can be replaced with any valid string to send data on specialized paths.

The endpoint has a specific configuration for how data is stored, transferred and indexed. Astarte expects a valid timestamp to be attached each time data is produced. Data is considered delivered when the transport successfully sends the data regardless of the outcome. Data is discarded if the transport is temporarily uncapable of delivering it.

/%{container_id}/preCpuUsageTotalUsage​

Total CPU time consumed in nanoseconds

Total CPU time consumed by the container, in nanoseconds.

This endpoint accepts values of type longinteger: a signed 64 bit integer (please note that longinteger is represented as a string by default in JSON-based APIs.).

The endpoint is parametric and container_id can be replaced with any valid string to send data on specialized paths.

The endpoint has a specific configuration for how data is stored, transferred and indexed. Astarte expects a valid timestamp to be attached each time data is produced. Data is considered delivered when the transport successfully sends the data regardless of the outcome. Data is discarded if the transport is temporarily uncapable of delivering it.

/%{container_id}/preCpuUsagePercpuUsage​

Total CPU time (in nanoseconds) consumed per core

This field is Linux-specific when using cgroups v1.

This endpoint accepts values of type longintegerarray: a list of values, represented as a JSON Array. Arrays can have up to 1024 items and each item must respect the limits of its scalar type.

The endpoint is parametric and container_id can be replaced with any valid string to send data on specialized paths.

The endpoint has a specific configuration for how data is stored, transferred and indexed. Astarte expects a valid timestamp to be attached each time data is produced. Data is considered delivered when the transport successfully sends the data regardless of the outcome. Data is discarded if the transport is temporarily uncapable of delivering it.

/%{container_id}/preCpuUsageUsageInKernelmode​

Time (in nanoseconds) spent by tasks of the cgroup in kernel mode

CPU time spent in kernel mode by the container's tasks, in nanoseconds.

This endpoint accepts values of type longinteger: a signed 64 bit integer (please note that longinteger is represented as a string by default in JSON-based APIs.).

The endpoint is parametric and container_id can be replaced with any valid string to send data on specialized paths.

The endpoint has a specific configuration for how data is stored, transferred and indexed. Astarte expects a valid timestamp to be attached each time data is produced. Data is considered delivered when the transport successfully sends the data regardless of the outcome. Data is discarded if the transport is temporarily uncapable of delivering it.

/%{container_id}/preCpuUsageUsageInUsermode​

Time (in nanoseconds) spent by tasks of the cgroup in user mode

This endpoint accepts values of type longinteger: a signed 64 bit integer (please note that longinteger is represented as a string by default in JSON-based APIs.).

The endpoint is parametric and container_id can be replaced with any valid string to send data on specialized paths.

The endpoint has a specific configuration for how data is stored, transferred and indexed. Astarte expects a valid timestamp to be attached each time data is produced. Data is considered delivered when the transport successfully sends the data regardless of the outcome. Data is discarded if the transport is temporarily uncapable of delivering it.

/%{container_id}/preSystemCpuUsage​

System Usage.

This endpoint accepts values of type longinteger: a signed 64 bit integer (please note that longinteger is represented as a string by default in JSON-based APIs.).

The endpoint is parametric and container_id can be replaced with any valid string to send data on specialized paths.

The endpoint has a specific configuration for how data is stored, transferred and indexed. Astarte expects a valid timestamp to be attached each time data is produced. Data is considered delivered when the transport successfully sends the data regardless of the outcome. Data is discarded if the transport is temporarily uncapable of delivering it.

/%{container_id}/preOnlineCpus​

Number of online CPUs.

This endpoint accepts values of type integer: a signed 32 bit integer.

The endpoint is parametric and container_id can be replaced with any valid string to send data on specialized paths.

The endpoint has a specific configuration for how data is stored, transferred and indexed. Astarte expects a valid timestamp to be attached each time data is produced. Data is considered delivered when the transport successfully sends the data regardless of the outcome. Data is discarded if the transport is temporarily uncapable of delivering it.

/%{container_id}/preThrottlingDataPeriods​

Number of periods with throttling active.

This endpoint accepts values of type longinteger: a signed 64 bit integer (please note that longinteger is represented as a string by default in JSON-based APIs.).

The endpoint is parametric and container_id can be replaced with any valid string to send data on specialized paths.

The endpoint has a specific configuration for how data is stored, transferred and indexed. Astarte expects a valid timestamp to be attached each time data is produced. Data is considered delivered when the transport successfully sends the data regardless of the outcome. Data is discarded if the transport is temporarily uncapable of delivering it.

/%{container_id}/preThrottlingDataThrottledPeriods​

Number of periods when the container hit its throttling limit.

This endpoint accepts values of type longinteger: a signed 64 bit integer (please note that longinteger is represented as a string by default in JSON-based APIs.).

The endpoint is parametric and container_id can be replaced with any valid string to send data on specialized paths.

The endpoint has a specific configuration for how data is stored, transferred and indexed. Astarte expects a valid timestamp to be attached each time data is produced. Data is considered delivered when the transport successfully sends the data regardless of the outcome. Data is discarded if the transport is temporarily uncapable of delivering it.

/%{container_id}/preThrottlingDataThrottledTime​

Aggregated time (in nanoseconds) the container was throttled for.

This endpoint accepts values of type longinteger: a signed 64 bit integer (please note that longinteger is represented as a string by default in JSON-based APIs.).

The endpoint is parametric and container_id can be replaced with any valid string to send data on specialized paths.

The endpoint has a specific configuration for how data is stored, transferred and indexed. Astarte expects a valid timestamp to be attached each time data is produced. Data is considered delivered when the transport successfully sends the data regardless of the outcome. Data is discarded if the transport is temporarily uncapable of delivering it.