Version:
- strongswan-5.7.1-1.el7.x86_64
#!/usr/bin/env bash | |
EXIT_OK=0 | |
ARG=$1 | |
autor() | |
{ | |
echo -e "\n\e[1m\e[34m === IPv4 NETWORK TOPOLOGY IN LINUX NAMESPACES ===\e[22m\e[24m\e[39m\n" | |
echo -e " Original Author: \e[1mTOMATTIS Natasha\e[22m\e[24m." | |
echo -e " https://gist.github.com/natitomattis/be26889063203c0b33b33fa25c75a5b6" |
Version:
# docker 17.12.1-ce | |
=> docker run | |
==> /sys/fs/cgroup/memory/memory.kmem.limit_in_bytes <== | |
18446744073709551615 | |
==> /sys/fs/cgroup/memory/memory.kmem.tcp.limit_in_bytes <== | |
18446744073709551615 | |
==> /sys/fs/cgroup/memory/memory.limit_in_bytes <== | |
18446744073709551615 |
#Container Resource Allocation Options in docker-run
now see: https://docs.docker.com/engine/reference/run/#runtime-constraints-on-resources
You have various options for controlling resources (cpu, memory, disk) in docker. These are principally via the docker-run command options.
##Dynamic CPU Allocation
-c, --cpu-shares=0
CPU shares (relative weight, specify some numeric value which is used to allocate relative cpu share)
from itertools import chain | |
def parse_range(rng): | |
parts = rng.split('-') | |
if 1 > len(parts) > 2: | |
raise ValueError("Bad range: '%s'" % (rng,)) | |
parts = [int(i) for i in parts] | |
start = parts[0] | |
end = start if len(parts) == 1 else parts[1] | |
if start > end: |