nr_free_pages 283680 nr_zone_inactive_anon 59161 nr_zone_active_anon 300203 nr_zone_inactive_file 672868 nr_zone_active_file 362510 nr_zone_unevictable 1000 nr_zone_write_pending 57 nr_mlock 0 nr_bounce 0 nr_zspages 0 nr_free_cma 0 nr_unaccepted 0 numa_hit 257269339 numa_miss 0 numa_foreign 0 numa_interleave 938 numa_local 257269339 numa_other 0 nr_inactive_anon 59161 nr_active_anon 300203 nr_inactive_file 672868 nr_active_file 362510 nr_unevictable 1000 nr_slab_reclaimable 224243 nr_slab_unreclaimable 25052 nr_isolated_anon 0 nr_isolated_file 0 workingset_nodes 56913 workingset_refault_anon 21067 workingset_refault_file 910175 workingset_activate_anon 5234 workingset_activate_file 470803 workingset_restore_anon 5223 workingset_restore_file 156766 workingset_nodereclaim 66983 nr_anon_pages 320478 nr_mapped 59476 nr_file_pages 1063820 nr_dirty 57 nr_writeback 0 nr_writeback_temp 0 nr_shmem 24072 nr_shmem_hugepages 0 nr_shmem_pmdmapped 0 nr_file_hugepages 0 nr_file_pmdmapped 0 nr_anon_transparent_hugepages 293 nr_vmscan_write 99045 nr_vmscan_immediate_reclaim 0 nr_dirtied 8242677 nr_written 7703181 nr_throttled_written 0 nr_kernel_misc_reclaimable 0 nr_foll_pin_acquired 6940 nr_foll_pin_released 6940 nr_kernel_stack 8784 nr_page_table_pages 3119 nr_sec_page_table_pages 0 nr_iommu_pages 0 nr_swapcached 4366 pgpromote_success 0 pgpromote_candidate 0 $ ˆl–Ðz¾”ji?u4 \¸î*bÑ¿Ç „YxÆÁÄ?÷ # This file is part of cloud-init. See LICENSE file for license information. import copy import glob import logging import os import re from contextlib import suppress from typing import Optional from cloudinit import performance, subp, util from cloudinit.net import ParserError, renderer, subnet_is_ipv6 from cloudinit.net.network_state import NetworkState LOG = logging.getLogger(__name__) NET_CONFIG_COMMANDS = [ "pre-up", "up", "post-up", "down", "pre-down", "post-down", ] NET_CONFIG_BRIDGE_OPTIONS = [ "bridge_ageing", "bridge_bridgeprio", "bridge_fd", "bridge_gcinit", "bridge_hello", "bridge_maxage", "bridge_maxwait", "bridge_stp", ] NET_CONFIG_OPTIONS = [ "address", "netmask", "broadcast", "network", "metric", "gateway", "pointtopoint", "media", "mtu", "hostname", "leasehours", "leasetime", "vendor", "client", "bootfile", "server", "hwaddr", "provider", "frame", "netnum", "endpoint", "local", "ttl", ] # TODO: switch valid_map based on mode inet/inet6 def _iface_add_subnet(iface, subnet): content = [] valid_map = [ "address", "netmask", "broadcast", "metric", "gateway", "pointopoint", "mtu", "scope", "dns_search", "dns_nameservers", ] for key, value in subnet.items(): if key == "netmask": continue if key == "address": value = "%s/%s" % (subnet["address"], subnet["prefix"]) if value and key in valid_map: if isinstance(value, list): value = " ".join(value) if "_" in key: key = key.replace("_", "-") content.append(" {0} {1}".format(key, value)) return sorted(content) # TODO: switch to valid_map for attrs def _iface_add_attrs(iface, index, ipv4_subnet_mtu): # If the index is non-zero, this is an alias interface. Alias interfaces # represent additional interface addresses, and should not have additional # attributes. (extra attributes here are almost always either incorrect, # or are applied to the parent interface.) So if this is an alias, stop # right here. if index != 0: return [] content = [] ignore_map = [ "control", "device_id", "driver", "index", "inet", "mode", "name", "subnets", "type", ] # The following parameters require repetitive entries of the key for # each of the values multiline_keys = [ "bridge_pathcost",