You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running within a Docker container it is possible to get information about the CPU and memory limits from /sys/fs/cgroup.
For example /proc/meminfo shows the memory information of the host machine, however /sys/fs/cgroup/memory/memory.limit_in_bytes identifies exactly how much memory this container is allowed to allocate before being killed by the container runtime.
Correspondingly /proc/cpuinfo shows information about all host CPUs, and not the number of cores that the container is limited to.
Interesting overlap here with my effective_limits crate: I would happily consume container info from sysinfo if it has it, or some container specific abstraction as well.
When running within a Docker container it is possible to get information about the CPU and memory limits from
/sys/fs/cgroup
.For example
/proc/meminfo
shows the memory information of the host machine, however/sys/fs/cgroup/memory/memory.limit_in_bytes
identifies exactly how much memory this container is allowed to allocate before being killed by the container runtime.Correspondingly
/proc/cpuinfo
shows information about all host CPUs, and not the number of cores that the container is limited to.Examples:
The text was updated successfully, but these errors were encountered: