How to get host system information Like memory ,cpu utilization etc in azure iot edge device

Viewed 32

How to get host system information Like memory ,cpu utilization metrics etc in azure iot edge device. Is there Azure Java SDK available for this. What azure tools can be used. Does Azure Agent has these details.

Regards Jayashree

1 Answers

You can use your own solution to access these metrics. Or, you can use the metrics-collector module which handles collecting the built-in metrics and sending them to Azure Monitor or Azure IoT Hub. For more information, see Collect and transport metrics and Access built-in metrics.

Also, You can declare how much of the host resources a module can use. This control is helpful to ensure that one module can't consume too much memory or CPU usage and prevent other processes from running on the device. You can manage these settings with Docker container create options in the HostConfig group, including:

  • Memory: Memory limit in bytes. For example, 268435456 bytes = 256 MB.
  • MemorySwap: Total memory limit (memory + swap). For example, 536870912 bytes = 512 MB.
  • NanoCpus: CPU quota in units of 10-9 (1 billionth) CPUs. For example, 250000000 nanocpus = 0.25 CPU.

Reference: Restrict module memory and CPU usage

Related