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}/cpuUsageTotalUsagewithlongintegertype. Total CPU time consumed in nanoseconds/%{container_id}/cpuUsagePercpuUsagewithlongintegerarraytype. Total CPU time (in nanoseconds) consumed per core/%{container_id}/cpuUsageUsageInKernelmodewithlongintegertype. Time (in nanoseconds) spent by tasks of the cgroup in kernel mode/%{container_id}/cpuUsageUsageInUsermodewithlongintegertype. Time (in nanoseconds) spent by tasks of the cgroup in user mode/%{container_id}/systemCpuUsagewithlongintegertype. System Usage./%{container_id}/onlineCpuswithintegertype. Number of online CPUs./%{container_id}/throttlingDataPeriodswithlongintegertype. Number of periods with throttling active./%{container_id}/throttlingDataThrottledPeriodswithlongintegertype. Number of periods when the container hit its throttling limit./%{container_id}/throttlingDataThrottledTimewithlongintegertype. Aggregated time (in nanoseconds) the container was throttled for./%{container_id}/preCpuUsageTotalUsagewithlongintegertype. Total CPU time consumed in nanoseconds/%{container_id}/preCpuUsagePercpuUsagewithlongintegerarraytype. Total CPU time (in nanoseconds) consumed per core/%{container_id}/preCpuUsageUsageInKernelmodewithlongintegertype. Time (in nanoseconds) spent by tasks of the cgroup in kernel mode/%{container_id}/preCpuUsageUsageInUsermodewithlongintegertype. Time (in nanoseconds) spent by tasks of the cgroup in user mode/%{container_id}/preSystemCpuUsagewithlongintegertype. System Usage./%{container_id}/preOnlineCpuswithintegertype. Number of online CPUs./%{container_id}/preThrottlingDataPeriodswithlongintegertype. Number of periods with throttling active./%{container_id}/preThrottlingDataThrottledPeriodswithlongintegertype. Number of periods when the container hit its throttling limit./%{container_id}/preThrottlingDataThrottledTimewithlongintegertype. 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.