Ejemplo n.º 1
0
    def get_groups():
        """Enumerates groups depending on number of directories in /proc/sys/vm.

        Returns:
            groups (dict): parsed variables groups
        """
        _, parents, all_variables = traverse_directory(SysVm.VM)

        # no need to take into account variables
        for var in all_variables:
            del parents[var]

        groups = {
            'sysvm': {
                'label': 'Virtual memory system variables',
                'parents': ['root']
            }
        }

        for i in parents.keys():
            groups[SysVm.key_format(i)] = {
                'label': i,
                'desc': '',
                'parents': parents[i]
            }

        return groups
Ejemplo n.º 2
0
    def get_data(verbose=False):
        """Parse /proc/sys/vm directory and its subdirs.

        Each non-directory file name is treated as variable name. Accordingly,
        file's content is treated as variable value. All groups in result
        dictionary preserve parent-child relations.

        Returns:
            tree (dict): nested dictionaries with system variables
        """
        tree, _, _ = traverse_directory(SysVm.VM, verbose=verbose)
        return tree
Ejemplo n.º 3
0
    def get_data(verbose=False):
        """Parse /proc/sys/vm directory and its subdirs.

        Each non-directory file name is treated as variable name. Accordingly,
        file's content is treated as variable value. All groups in result
        dictionary preserve parent-child relations.

        Returns:
            tree (dict): nested dictionaries with system variables
        """
        tree, _, _ = traverse_directory(SysVm.VM, verbose=verbose)
        return tree
Ejemplo n.º 4
0
    def get_groups():
        """
        """
        _, parents, all_variables = traverse_directory(SysDev.DEV)

        # no need to take into account variables
        for var in all_variables:
            del parents[var]

        groups = {'sysvm': {'label': 'Debug system variables', 'parents': ['root']}}

        for i in parents.keys():
            groups[SysDev.key_format(i)] = {
                'label': i,
                'desc': '',
                'parents': parents[i]
            }

        return groups
Ejemplo n.º 5
0
    def get_groups():
        """Enumerates groups depending on number of directories in /proc/sys/net.

        Returns:
            groups (dict): parsed variables groups
        """
        _, parents, all_variables = traverse_directory(SysNet.NET)

        # no need to take into account variables
        for var in all_variables:
            del parents[var]

        groups = {'sysnet': {'label': 'SysNetwork system variables', 'parents': ['root']}}

        for i in parents.keys():
            groups[SysNet.key_format(i)] = {
                'label': i,
                'desc': '',
                'parents': parents[i]
            }

        return groups
Ejemplo n.º 6
0
    def get_groups():
        """
        """
        _, parents, all_variables = traverse_directory(SysDev.DEV)

        # no need to take into account variables
        for var in all_variables:
            del parents[var]

        groups = {
            'sysvm': {
                'label': 'Debug system variables',
                'parents': ['root']
            }
        }

        for i in parents.keys():
            groups[SysDev.key_format(i)] = {
                'label': i,
                'desc': '',
                'parents': parents[i]
            }

        return groups
Ejemplo n.º 7
0
    def get_vars():
        """Enumerates system variables in /proc/sys/vm and its subdirectories.

        Returns:

        """
        thevars = dict()
        _, parents, all_variables = traverse_directory(SysVm.VM)

        for var in all_variables:
            thevars[SysVm.key_format(var)] = {
                'label': var,
                'unit': '',
                'parents': parents[var]
            }

        # TODO: fill with variables and appropriate descriptions
        descs = {
            'raw': {
                'desc': "The full sys/vm log",
                'label': "Sys VM Full",
                'parents': ['vm']
            },
            'block_dump': {
                'desc':
                "Enables block I/O debugging when set to a nonzero value. If you want to find out which process caused the disk to spin up (see /proc/sys/vm/laptop_mode), you can gather information by setting the flag",
                'label': "Block Dump I/O Debugging",
                'parents': ['vm']
            },
            'dirty_background_bytes': {
                'desc':
                "Contains the amount of dirty memory at which the pdflush background writeback daemon will start writeback",
                'label': "Dirty Background Bytes",
                'parents': ['vm']
            },
            'dirty_background_ratio': {
                'desc':
                "Contains, as a percentage of total system memory, the number of pages at which the pdflush background writeback daemon will start writing out dirty data",
                'label': "Dirty Background Ratio",
                'parents': ['vm']
            },
            'dirty_bytes': {
                'desc':
                "Contains the amount of dirty memory at which a process generating disk writes will itself start writeback",
                'label': "Dirty Bytes",
                'parents': ['vm']
            },
            'dirty_expire_centisecs': {
                'desc':
                "Used to define when dirty data is old enough to be eligible for writeout by the pdflush daemons. It is expressed in 100'ths of a second. Data which has been dirty in memory for longer than this interval will be written out next time a pdflush daemon wakes up",
                'label': "Dirty Expire Centisecs",
                'parents': ['vm']
            },
            'dirty_ratio': {
                'desc':
                "Contains, as a percentage of total system memory, the number of pages at which a process which is generating disk writes will itself start writing out dirty data",
                'label': "Dirty Ratio",
                'parents': ['vm']
            },
            'dirty_writeback_centisecs': {
                'desc':
                "The pdflush writeback daemons will periodically wake up and write 'old' data out to disk. This tunable expresses the interval between those wakeups, in 100'ths of a second",
                'label': "Dirty Writeback Centisecs",
                'parents': ['vm']
            },
            'drop_caches': {
                'desc':
                "Causes the kernel to drop clean caches, dentries and inodes from memory, causing that memory to become free",
                'label': "Drop Caches",
                'parents': ['vm']
            },
            'highmem_is_dirtyable': {
                'desc':
                "This defaults to 0 (false), meaning that the dirty_ratio and dirty_background_ratio ratios are calculated as a percentage of low memory only. This protects against excessive scanning in page reclaim, swapping and general VM distress",
                'label': "HighMem is Dirtyable",
                'parents': ['vm']
            },
            'hugepages_treat_as_movable': {
                'desc':
                "Huge pages are not movable so are not allocated from ZONE_MOVABLE by default. However, as ZONE_MOVABLE will always have pages that can be migrated or reclaimed, it can be used to satisfy hugepage allocations even when the system has been running a long time. This allows an administrator to resize the hugepage pool at runtime depending on the size of ZONE_MOVABLE",
                'label': "Huge Pages Treated as Movable ",
                'parents': ['vm']
            },
            'hugetlb_shm_group': {
                'desc':
                "Contains group id that is allowed to create SysV shared memory segment using hugetlb page",
                'label': "HugeTLB Shared Memory Group",
                'parents': ['vm']
            },
            'laptop_mode': {
                'desc':
                "A knob that controls 'laptop mode'. When the knob is set, any physical disk I/O (that might have caused the hard disk to spin up, see /proc/sys/vm/block_dump) causes Linux to flush all dirty blocks",
                'label': "Laptop Mode",
                'parents': ['vm']
            },
            'legacy_va_layout': {
                'desc':
                "If non-zero, this sysctl disables the new 32-bit mmap map layout - the kernel will use the legacy (2.4) layout for all processes",
                'label': "Disable 32-bit MMAP Layout",
                'parents': ['vm']
            },
            'lowmem_reserve_ratio': {
                'desc':
                "Ratio of total pages to free pages for each memory zone",
                'label': "Low Memory Reserve Ratio",
                'parents': ['vm']
            },
            'max_map_count': {
                'desc':
                "Maximum number of memory map areas a process may have. Memory map areas are used as a side-effect of calling malloc, directly by mmap and mprotect, and also when loading shared libraries",
                'label': "Maximum Number of Memory Map Areas",
                'parents': ['vm']
            },
            'min_free_kbytes': {
                'desc':
                "Used to force the Linux VM to keep a minimum number of kilobytes free. The VM uses this number to compute a pages_min value for each lowmem zone in the system. Each lowmem zone gets a number of reserved free pages based proportionally on its size",
                'label': "Mininum Free KBytes",
                'parents': ['vm']
            },
            'min_slab_ratio': {
                'desc':
                "A percentage of the total pages in each zone. On Zone reclaim (fallback from the local zone occurs) slabs will be reclaimed if more than this percentage of pages in a zone are reclaimable slab pages. This insures that the slab growth stays under control even in NUMA systems that rarely perform global reclaim",
                'label': "Minimum Slab Ratio",
                'parents': ['vm']
            },
            'min_unmapped_ratio': {
                'desc':
                "A percentage of the total pages in each zone. Zone reclaim will only occur if more than this percentage of pages are in a state that zone_reclaim_mode allows to be reclaimed",
                'label': "Minimum Unmapped Ratio",
                'parents': ['vm']
            },
            'mmap_min_addr': {
                'desc':
                "Indicates the amount of address space which a user process will be restricted from mmaping. Since kernel null dereference bugs could accidentally operate based on the information in the first couple of pages of memory userspace processes should not be allowed to write to them",
                'label': "MMAP Minimal Address",
                'parents': ['vm']
            },
            'nr_hugepages': {
                'desc':
                "Indicates the current number of configured hugetlb pages in the kernel. Super user can dynamically request more (or free some pre-configured) hugepages. The allocation (or deallocation) of hugetlb pages is possible only if there are enough physically contiguous free pages in system (freeing of hugepages is possible only if there are enough hugetlb pages free that can be transferred back to regular memory pool)",
                'label': "Number of HugePages",
                'parents': ['vm']
            },
            'nr_overcommit_hugepages': {
                'desc':
                "Changes the maximum size of the hugepage pool. The maximum is nr_hugepages + nr_overcommit_hugepages",
                'label': "OverCommit Number of HugePages",
                'parents': ['vm']
            },
            'nr_pdflush_threads': {
                'desc':
                "The count of currently-running pdflush threads. This is a read-only value",
                'label': "Number of PDFlush Threads",
                'parents': ['vm']
            },
            'nr_trim_pages': {
                'desc':
                "This value adjusts the excess page trimming behaviour of power-of-2 aligned NOMMU mmap allocations",
                'label': "Number of Trim Pages",
                'parents': ['vm']
            },
            'numa_zonelist_order': {
                'desc':
                "This sysctl is only for NUMA. It specifies where the memory is allocated from and is controlled by zonelists",
                'label': "Numa ZoneList Order",
                'parents': ['vm']
            },
            'oom_dump_tasks': {
                'desc':
                "Enables a system-wide task dump (excluding kernel threads) to be produced when the kernel performs an OOM-killing and includes such information as pid, uid, tgid, vm size, rss, cpu, oom_adj score, and name. This is helpful to determine why the OOM killer was invoked and to identify the rogue task that caused it",
                'label': "Out-Of-Memory Dump Tasks",
                'parents': ['vm']
            },
            'oom_kill_allocating_task': {
                'desc':
                "Enables or disables killing the OOM-triggering task in out-of-memory situations",
                'label': "Kill Out-Of-Memory Dump Task",
                'parents': ['vm']
            },
            'overcommit_memory': {
                'desc':
                "Controls overcommit of system memory, possibly allowing processes to allocate (but not use) more memory than is actually available",
                'label': "OverCommit Memory",
                'parents': ['vm']
            },
            'overcommit_ratio': {
                'desc':
                "Percentage of physical memory size to include in overcommit calculations",
                'label': "OverCommit Ratio",
                'parents': ['vm']
            },
            'page-cluster': {
                'desc':
                "Controls the number of pages which are written to swap in a single attempt. The swap I/O size",
                'label': "Page Cluster",
                'parents': ['vm']
            },
            'panic_on_oom': {
                'desc':
                "Enables or disables panic on out-of-memory feature. If this is set to 1, the kernel panics when out-of-memory happens. If this is set to 0, the kernel will kill some rogue process, by calling oom_kill()",
                'label': "Panic on Out-Of-Memory",
                'parents': ['vm']
            },
            'percpu_pagelist_fraction': {
                'desc':
                "This is the fraction of pages at most (high mark pcp->high) in each zone that are allocated for each per cpu page list. The min value for this is 8. It means that we don't allow more than 1/8th of pages in each zone to be allocated in any single per_cpu_pagelist",
                'label': "PageList Fraction Per CPU",
                'parents': ['vm']
            },
            'scan_unevictable_pages': {
                'desc':
                "Initiates a scan of individual or all zones' unevictable lists and move any pages that have become evictable onto the respective zone's inactive list, where shrink_inactive_list() will deal with them. If evictable pages are found in unevictable lru, kernel will print filenames and file offsets of those pages",
                'label': "Scan Unevictable Pages",
                'parents': ['vm']
            },
            'stat_interval': {
                'desc':
                "Configures VM statistics update interval. The default value is 1. This tunable first appeared in 2.6.22 kernel",
                'label': "VM Statistics Update Interval",
                'parents': ['vm']
            },
            'swap_token_timeout': {
                'desc':
                "Contains valid hold time of swap out protection token. The Linux VM has token based thrashing control mechanism and uses the token to prevent unnecessary page faults in thrashing situation. The unit of the value is second. The value would be useful to tune thrashing behavior",
                'label': "Swap Token TimeOut",
                'parents': ['vm']
            },
            'swappiness': {
                'desc':
                "Sets the kernel's balance between reclaiming pages from the page cache and swapping process memory. The default value is 60. If you want kernel to swap out more process memory and thus cache more file contents increase the value. Otherwise, if you would like kernel to swap less decrease it",
                'label': "Swappiness",
                'parents': ['vm']
            },
            'vdso_enabled': {
                'desc':
                "When this flag is set, the kernel maps a vDSO page into newly created processes and passes its address down to glibc upon exec(). This feature is enabled by default",
                'label': "vDSO Enabled",
                'parents': ['vm']
            },
            'vfs_cache_pressure': {
                'desc':
                "Controls the tendency of the kernel to reclaim the memory which is used for caching of directory and inode objects",
                'label': "VFS Cache Pressure",
                'parents': ['vm']
            },
            'zone_reclaim_mode': {
                'desc':
                "Allows someone to set more or less aggressive approaches to reclaim memory when a zone runs out of memory. If it is set to zero then no zone reclaim occurs. Allocations will be satisfied from other zones / nodes in the system",
                'label': "Zone Reclaim Mode",
                'parents': ['vm']
            },
        }

        return thevars
Ejemplo n.º 8
0
    def get_vars():
        """Enumerates system variables in /proc/sys/net and its subdirectories.

        Returns:
            thevars (dict): parsed system variables with their descriptions
        """

        thevars = dict()
        _, parents, all_variables = traverse_directory(SysNet.NET)

        for var in all_variables:
            thevars[SysNet.key_format(var)] = {
                'label': var,
                'unit': '',
                'parents': parents[var]
            }

        # TODO: fill with variables and appropriate descriptions
        descs = {
            'dev_weight': {
                'desc': "Work quantum for packet processing scheduler. The default value is 64",
                'label': "Work Quantum for Packet Processing Scheduler",
                'parents': ['SysNet']
            },

            'divert_version': {
                'desc': 'Frame diverter version string. Exists only if frame diverter (CONFIG_NET_DIVERT) is compiled in',
                'label': "Frame Diverter Version",
                'parents': ['SysNet']
            },

            'message_burst': {
                'desc': 'Used to limit the warning messages written to the kernel log from the networking code (together with message_cost parameter). It enforces a rate limit to make a denial-of-service (DoS) attack impossible. Message_burst controls when messages will be dropped. The default value is 10',
                'label': "Warning Messages Limit",
                'parents': ['SysNet']
            },

            'message_cost': {
                'desc': 'Rate limit the number of network warning messages to one every message_cost seconds. The default value is 5',
                'label': "Warning Message Rate Limit",
                'parents': ['SysNet']
            },

            'netdev_budget': {
                'desc': 'SysNet device budget. The default value is 300',
                'label': "SysNet Device Budget",
                'parents': ['SysNet']
            },

            'netdev_max_backlog': {
                'desc': 'Maximum number of packets, queued on the input side, when the interface receives packets faster than kernel can process them. Applies to non-NAPI devices only. The default value is 1000',
                'label': "SysNet Device Maximum BackLog",
                'parents': ['SysNet']
            },

            'optmem_max': {
                'desc': 'Maximum ancillary buffer size allowed per socket. Ancillary data is a sequence of struct cmsghdr structures with appended data. The default size is 10240 bytes.',
                'label': "Maximum Acillary Buffer Size",
                'parents': ['SysNet']
            },

            'rmem_default': {
                'desc': 'The default setting of the socket receive buffer in bytes',
                'label': "Socket Receive Buffer Default",
                'parents': ['SysNet']
            },

            'rmem_max': {
                'desc': 'The maximum receive socket buffer size in bytes. The default value is 131072 bytes',
                'label': "Maximum Receive Socket Buffer",
                'parents': ['SysNet']
            },

            'somaxconn': {
                'desc': 'Limit of socket listen() backlog, known in userspace as SOMAXCONN. Defaults to 128',
                'label': "Listen() Socket Limit",
                'parents': ['SysNet']
            },

            'wmem_default': {
                'desc': 'The default setting of the socket send buffer in bytes.',
                'label': "Socket Send Buffer Default",
                'parents': ['SysNet']
            },

            'wmem_max': {
                'desc': 'The maximum send socket buffer size in bytes. The default value is 131072 bytes',
                'label': "Maximum Send Socket Buffer",
                'parents': ['SysNet']
            },

            'xfrm_aevent_etime': {
                'desc': 'Used to provide default values for the XFRMA_ETIMER_THRESH in incremental units of time of 100ms. The default value is 10 (1 second)',
                'label': "XFRMA ETIMER THRESH default",
                'parents': ['SysNet']
            },

            'xfrm_aevent_rseqth': {
                'desc': 'Used to provide default values for XFRMA_REPLAY_THRESH parameter in incremental packet count. The default value is 2 packets',
                'label': "XFRMA REPLAY THRESH default",
                'parents': ['SysNet']
            },

            'accept_redirects': {
                'desc': 'Accept ICMP redirect messages.',
                'label': "Accept Redirects",
                'parents': ['SysNet']
            },

            'accept_source_route': {
                'desc': 'Accept packets with SRR option. conf/all/accept_source_route must also be set to 1 to accept packets with SRR option on the interface',
                'label': "Accept Source Route",
                'parents': ['SysNet']
            },

            'arp_accept': {
                'desc': 'Defines behavior when gratuitous ARP replies are received',
                'label': "Accept ARP",
                'parents': ['SysNet']
            },

            'arp_announce': {
                'desc': 'Defines different restriction levels for announcing the local source IP address from IP packets in ARP requests sent on interface',
                'label': "Announce ARP",
                'parents': ['SysNet']
            },

            'arp_filter': {
                'desc': 'Enables and disables arp_filter for the interface. Will be enabled if at least one of conf/{all,interface}/arp_filter is set to 1, it will be disabled otherwise.',
                'label': "Filter ARP",
                'parents': ['SysNet']
            },

            'arp_ignore': {
                'desc': 'Defines different modes for sending replies in response to received ARP requests that resolve local target IP addresses',
                'label': "Ignore ARP",
                'parents': ['SysNet']
            },

            'bootp_relay': {
                'desc': 'Accept packets with source address 0.b.c.d destined not to this host as local ones. It is supposed, that BOOTP relay daemon will catch and forward such packets',
                'label': "BootP Relay",
                'parents': ['SysNet']
            },

            'disable_policy': {
                'desc': 'Disable IPSEC policy (SPD) for this interface',
                'label': "Disable IPSEC Policy",
                'parents': ['SysNet']
            },

            'disable_xfrm': {
                'desc': 'Disable IPSEC encryption on this interface, whatever the policy',
                'label': "Disable IPSec Encryption",
                'parents': ['SysNet']
            },

            'force_igmp_version': {
                'desc': 'Force IGMP protocol version.',
                'label': "Force IGMP Version",
                'parents': ['SysNet']
            },

            'forwarding': {
                'desc': 'Enable IP forwarding on this interface.',
                'label': "IP Forwarding",
                'parents': ['SysNet']
            },

            'log_martians': {
                'desc': 'Log packets with impossible addresses to kernel log',
                'label': "Log Impossible Adresses Packets",
                'parents': ['SysNet']
            },

            'mc_forwarding': {
                'desc': 'Do multicast routing. The kernel needs to be compiled with CONFIG_IP_MROUTE and a multicast routing daemon is required',
                'label': "Multicast Routing",
                'parents': ['SysNet']
            },

            'medium_id': {
                'desc': 'Used to change the proxy_arp behavior: the proxy_arp feature is enabled for packets forwarded between two devices attached to different media',
                'label': "Proxy_ARP Behaviour",
                'parents': ['SysNet']
            },

            'promote_secondaries': {
                'desc': 'If this is enabled, and primary address of an interface gets deleted, an alias of the interface (secondary) will be upgraded to become primary. The default is to purge all the secondaries when you delete the primary',
                'label': "Reserve Primariy Address with Secondary ",
                'parents': ['SysNet']
            },

            'proxy_arp': {
                'desc': 'Do proxy ARP',
                'label': "Proxy ARP",
                'parents': ['SysNet']
            },

            'rp_filter': {
                'desc': 'Prevents spoofing attacks against your internal networks (external addresses can still be spoofed), without the need for additional firewall rules',
                'label': "RP Filter",
                'parents': ['SysNet']
            },

            'secure_redirects': {
                'desc': 'Accept ICMP redirect messages only for gateways, listed in default gateway list',
                'label': "Secure Redirects",
                'parents': ['SysNet']
            },

            'send_redirects': {
                'desc': 'Send redirects, if router. Send_redirects for the interface will be enabled if at least one of conf/{all,interface}/send_redirects is set to 1, it will be disabled otherwise',
                'label': "Send Redirects",
                'parents': ['SysNet']
            },

            'shared_media': {
                'desc': 'Send(router) or accept(host) RFC1620 shared media redirects. If it is not set the kernel does not assume that different subnets on this device can communicate directly. Overrides secure_redirects',
                'label': "Send and Accept Shared Media",
                'parents': ['SysNet']
            },

            'tag': {
                'desc': 'Allows to write a number, which can be used as required. The default value is 0',
                'label': "Tag",
                'parents': ['SysNet']
            },

            'icmp_echo_ignore_all': {
                'desc': 'Turns on (1) or off (0), if the kernel should ignore all ICMP ECHO requests. Off by default',
                'label': "Ignore ICMP ECHO",
                'parents': ['SysNet']
            },

            'icmp_echo_ignore_broadcasts': {
                'desc': 'Turn on (1) or off (0), if the kernel should ignore all ICMP ECHO and TIMESTAMP requests to broadcast and multicast addresses. Off by default',
                'label': "Ignore ICMP ECHO and TIMESTAMP",
                'parents': ['SysNet']
            },

            'icmp_errors_use_inbound_ifaddr': {
                'desc': 'If zero (the default), ICMP error messages are sent with the primary address of the exiting interface. If non-zero, the message will be sent with the primary address of the interface that received the packet that caused the ICMP error',
                'label': "ICMP ERRORS ROUTING",
                'parents': ['SysNet']
            },

            'icmp_ignore_bogus_error_responses': {
                'desc': 'Specifies kernel not to give bogus responses to broadcast frames warnings, which will avoid log file clutter.',
                'label': "Ignore Bogus Error Responses",
                'parents': ['SysNet']
            },

            'icmp_ratelimit': {
                'desc': 'Limit the maximal rates for sending ICMP packets whose type matches icmp_ratemask to specific targets. 0 to disable any limiting, otherwise the maximal rate in jiffies',
                'label': "ICMP Framelimit",
                'parents': ['SysNet']
            },

            'icmp_ratemask': {
                'desc': 'Mask made of ICMP types for which rates are being limited. Significant bits: IHGFEDCBA9876543210. Default mask: 0000001100000011000 (6168)',
                'label': "ICMP Rate Mask",
                'parents': ['SysNet']
            },

            'igmp_max_memberships': {
                'desc': 'Changes the maximum number of multicast groups we can subscribe to. The default value is 20.',
                'label': "Maximum number of Multicast Groups",
                'parents': ['SysNet']
            },

            'igmp_max_msf': {
                'desc': 'Limit on the number of multicast source filter. The default value is 10',
                'label': "Multicast Source Filter Limit",
                'parents': ['SysNet']
            },

            'inet_peer_gc_maxtime': {
                'desc': 'Maximum interval between garbage collection passes. This interval is in effect under low (or absent) memory pressure on the pool. Measured in jiffies',
                'label': "Maximum Interval Between Garbage Collection",
                'parents': ['SysNet']
            },

            'inet_peer_gc_mintime': {
                'desc': 'Minimum interval between garbage collection passes. This interval is in effect under high memory pressure on the pool. Measured in jiffies',
                'label': "",
                'parents': ['SysNet']
            },

            'inet_peer_maxttl': {
                'desc': 'Maximum time-to-live of entries. Unused entries will expire after this period of time if there is no memory pressure on the pool (i.e. when the number of entries in the pool is very small). Measured in jiffies.',
                'label': "Maximum Time-To-Live of Entries",
                'parents': ['SysNet']
            },

            'inet_peer_minttl': {
                'desc': 'Minimum time-to-live of entries. Should be enough to cover fragment time-to-live on the reassembling side',
                'label': "Minimum Time-To-Live of Entries",
                'parents': ['SysNet']
            },

            'inet_peer_threshold': {
                'desc': 'The approximate size of the storage. Starting from this threshold entries will be thrown aggressively. This threshold also determines entries. Time-to-live and time intervals between garbage collection passes. More entries, less time-to-live, less GC interval',
                'label': "Approximate Size of The Storage",
                'parents': ['SysNet']
            },

            'ip_autoconfig': {
                'desc': 'Contains the number one if the host received its IP configuration by RARP, BOOTP, DHCP or a similar mechanism. Otherwise it is zero',
                'label': "IP AutoConfig",
                'parents': ['SysNet']
            },

            'ip_conntrack_max': {
                'desc': 'The number of separate connections that can be tracked with netfilter conntrack (NAT layer). Defaults to a percentage of your total memory size. This percentage is geared towards a "general use" workstation with lots more memory (and fewer connections to track) than a typical special-purpose firewall box',
                'label': "Separate Connections Tracked With SysNetFilter",
                'parents': ['SysNet']
            },

            'ip_default_ttl': {
                'desc': 'TTL (time-to-live) for IPv4 interfaces. This is simply the maximum number of hops a packet may travel. The default value is 64',
                'label': "Default TTL for IPv4",
                'parents': ['SysNet']
            },            

            'ip_dynaddr': {
                'desc': 'If set non-zero, enables support for dynamic addresses. If set to a non-zero value larger than 1, a kernel log message will be printed when dynamic address rewriting occurs. The default value is 0',
                'label': "Support Of Dynamic Addressess",
                'parents': ['SysNet']
            },            

            'ip_forward': {
                'desc': 'Forward packets between interfaces if enabled (1). Disabled (0) by default',
                'label': "Forward Packets",
                'parents': ['SysNet']
            },            

            'ip_local_port_range': {
                'desc': 'Defines the local port range that is used by TCP and UDP to choose the local port. The first number is the first, the second the last local port number. The default value depends on the amount of memory available on the system: > 128MB 32768 - 61000, < 128MB 1024 - 4999 or even less',
                'label': "IP Local Port Range",
                'parents': ['SysNet']
            },            

            'ip_no_pmtu_disc': {
                'desc': 'Disable Path MTU Discovery (if set non-zero). By default, PMTU discovery is enabled (0)',
                'label': "Disable Path MTU Discovery",
                'parents': ['SysNet']
            },            

            'ip_nonlocal_bind': {
                'desc': 'Allows processes to bind() to non-local IP addresses, which can be quite useful, but may break some applications. The default value is 0',
                'label': "IP Nonlocal Bind",
                'parents': ['SysNet']
            },            

            'ipfrag_high_thresh': {
                'desc': 'Maximum memory used to reassemble IP fragments. When ipfrag_high_thresh bytes of memory is allocated for this purpose, the fragment handler will toss packets until ipfrag_low_thresh is reached. The default value is 262144 bytes (256 KB)',
                'label': "Maximum Memory To Reassemble IP Fragments",
                'parents': ['SysNet']
            },            

            'ipfrag_low_thresh': {
                'desc': 'Minimum memory used to reassemble IP fragments',
                'label': "Minimum Memory To Reassemble IP Fragments",
                'parents': ['SysNet']
            },            

            'ipfrag_max_dist': {
                'desc': 'A non-negative integer value which defines the maximum "disorder" which is allowed among fragments which share a common IP source address. Note that reordering of packets is not unusual, but if a large number of fragments arrive from a source IP address while a particular fragment queue remains incomplete, it probably indicates that one or more fragments belonging to that queue have been lost',
                'label': "IP Fragment Maximum Disorder",
                'parents': ['SysNet']
            },            

            'ipfrag_secret_interval': {
                'desc': 'Regeneration interval (in seconds) of the hash secret (or lifetime for the hash secret) for IP fragments. The default value is 600 seconds',
                'label': "Hash Secret Regeneration Interval",
                'parents': ['SysNet']
            },            

            'ipfrag_time': {
                'desc': 'Time in seconds to keep an IP fragment in memory. The default value is 30 seconds',
                'label': "IP Fragment LifeTime",
                'parents': ['SysNet']
            },            

            'error_burst': {
                'desc': 'Used to limit how many ICMP destination unreachable to send from the host in question. ICMP destination unreachable messages are sent when we can not reach the next hop, while trying to transmit a packet. It will also print some error messages to kernel logs if someone is ignoring our ICMP redirects',
                'label': "Error Burst",
                'parents': ['SysNet']
            },            

            'error_cost': {
                'desc': 'Used to limit how many ICMP destination unreachable to send from the host in question. ICMP destination unreachable messages are sent when we can not reach the next hop, while trying to transmit a packet. It will also print some error messages to kernel logs if someone is ignoring our ICMP redirects.',
                'label': "Error Cost",
                'parents': ['SysNet']
            },            

            'flush': {
                'desc': 'Flush of the routing cache',
                'label': "Routing Cache Flush",
                'parents': ['SysNet']
            },            

            'gc_elasticity': {
                'desc': 'Used to control the frequency and behavior of the garbage collection algorithm for the routing cache. Aggressive cache reduction triggers when the average entry list exceeds this length',
                'label': "Garbage Collection Elasticity",
                'parents': ['SysNet']
            },            

            'gc_interval': {
                'desc': 'Used to control the frequency and behavior of the garbage collection algorithm for the routing cache. This parameter defines route table garbage collection interval',
                'label': "Garbage Collection Interval",
                'parents': ['SysNet']
            },            

            'gc_min_interval': {
                'desc': 'gc_min_interval is deprecated and replaced by gc_min_interval_ms',
                'label': "Garbage Collection Minimum Interval",
                'parents': ['SysNet']
            },            

            'gc_min_interval_ms': {
                'desc': 'Used to control the frequency and behavior of the garbage collection algorithm for the routing cache. This parameter defines minimum interval between garbage collector runs',
                'label': "Garbage Collection Minimum Interval",
                'parents': ['SysNet']
            },            

            'gc_thresh': {
                'desc': 'Used to control the frequency and behavior of the garbage collection algorithm for the routing cache. Garbage collector starts when route table grows to this size',
                'label': "Garbage Collection Thresh",
                'parents': ['SysNet']
            },            

            'gc_timeout': {
                'desc': 'Used to control the frequency and behavior of the garbage collection algorithm for the routing cache. An entry expires after this time',
                'label': "Garbage Collection Timeout",
                'parents': ['SysNet']
            },            

            'max_delay': {
                'desc': 'Maximal delay for flushing the routing cache. The default value is 10 seconds.',
                'label': "Routing Cache Flushing Delay Maximum",
                'parents': ['SysNet']
            },            

            'max_size': {
                'desc': 'Maximum size of the routing cache. Old entries will be purged once the cache has reached this size',
                'label': "Routing Cache Max Size",
                'parents': ['SysNet']
            },            

            'min_adv_mss': {
                'desc': 'The advertised MSS depends on the first hop route MTU, but will never be lower than this setting',
                'label': "Minimum Advertised MSS",
                'parents': ['SysNet']
            },            

            'min_delay': {
                'desc': 'Minimal delay for flushing the routing cache. The default value is 2 seconds',
                'label': "Flushing Routing Cache Minimal Delay",
                'parents': ['SysNet']
            },            

            'min_pmtu': {
                'desc': 'Minimum discovered Path MTU. The default value is 552 bytes',
                'label': "Minimum Discovered Path MTU",
                'parents': ['SysNet']
            },            

            'mtu_expires': {
                'desc': 'Time, in seconds, that cached PMTU information is kept. The default value is 600 seconds.',
                'label': "MTU Expire Time",
                'parents': ['SysNet']
            },            

            'redirect_load': {
                'desc': 'One of the factors which determine if more ICMP redirects should be sent to a specific host. No redirects will be sent once the load limit has been reached',
                'label': "Redirect Load",
                'parents': ['SysNet']
            },            

            'redirect_number': {
                'desc': 'One of the factors which determine if more ICMP redirects should be sent to a specific host. No redirects will be sent once the maximum number of redirects has been reached',
                'label': "Redirect Number",
                'parents': ['SysNet']
            },            

            'redirect_silence': {
                'desc': 'Timeout for redirects. After this period redirects will be sent again, even if this has been stopped, because the load or number limit has been reached',
                'label': "Redirect Timeout",
                'parents': ['SysNet']
            },            

            'secret_interval': {
                'desc': 'The interval between cache flushes. The default value is 600 seconds',
                'label': "Cache Flushes Interval",
                'parents': ['SysNet']
            },            

            'tcp_abc': {
                'desc': 'Controls Appropriate Byte Count defined in RFC3465. If set to 0 then does congestion avoid once per ACK. 1 is conservative value, and 2 is more aggressive. The default value is 1',
                'label': "Appropriate Byte Count Control",
                'parents': ['SysNet']
            },            

            'tcp_abort_on_overflow': {
                'desc': 'If listening service is too slow to accept new connections, reset them. Not enabled by default. It means that if overflow occurred due to a burst, connection will recover',
                'label': "TCP Abort On OverFlow",
                'parents': ['SysNet']
            },            

            'tcp_adv_win_scale': {
                'desc': 'Scaling factor for calculating application portion of window. Count buffering overhead as bytes / 2 ^ tcp_adv_win_scale (if tcp_adv_win_scale > 0) or bytes - bytes / 2 ^ (-tcp_adv_win_scale), if it is <= 0. The default value is 2',
                'label': "TCP Application Portion of Window",
                'parents': ['SysNet']
            },            

            'tcp_app_win': {
                'desc': 'Scale factor for portion of window reserved for buffering overhead. Reserve max(window / 2 ^ tcp_app_win, mss) of window for application buffer. Value 0 is special, it means that nothing is reserved. The default value is 31',
                'label': "TCP Window Reserved Buffering",
                'parents': ['SysNet']
            },            

            'tcp_base_mss': {
                'desc': 'Lower bound for TCP path MTU discovery probing. The default value is 512 bytes',
                'label': "TCP MTU Discovery Lower Bound",
                'parents': ['SysNet']
            },            

            'tcp_congestion_control': {
                'desc': 'Set the congestion control algorithm to be used for new connections. The algorithm "reno" is always available, but additional choices may be available based on kernel configuration',
                'label': "TCP Congestion Control",
                'parents': ['SysNet']
            },            

            'tcp_dsack': {
                'desc': 'Allows TCP to send "duplicate" SACKs. Enabled (1) by default',
                'label': "TCP Duplicate SACKs",
                'parents': ['SysNet']
            },            

            'tcp_ecn': {
                'desc': 'Enable Explicit Congestion Notification in TCP. Enabled (1) by default',
                'label': "TCP Explicit Congestion Notification",
                'parents': ['SysNet']
            },            

            'tcp_fack': {
                'desc': 'Enable FACK congestion avoidance and fast retransmission. Forward ACKnowledgement is a special algorithm that works on top of the SACK options, and is geared at congestion controlling. The value is not used if tcp_sack is not enabled. Enabled (1) by default',
                'label': "FACK Congestion Avoidance",
                'parents': ['SysNet']
            },            

            'tcp_fin_timeout': {
                'desc': 'Time to hold socket in state FIN-WAIT-2, if it was closed by our side. Peer can be broken and never close its side, or even die unexpectedly. The default value is 60 seconds',
                'label': "TCP Fin Timeout",
                'parents': ['SysNet']
            },            

            'tcp_frto': {
                'desc': 'Enables F-RTO, an enhanced recovery algorithm for TCP retransmission timeouts. It is particularly beneficial in wireless environments where packet loss is typically due to random radio interference rather than intermediate router congestion. Disabled (0) by default',
                'label': "Enable F-RTO",
                'parents': ['SysNet']
            },            

            'tcp_keepalive_intvl': {
                'desc': 'Specifies how frequently the keepalive probes are sent out. Multiplied by tcp_keepalive_probes it is time to kill not responding connection, after probes started. The default value is 75 seconds i.e. connection will be aborted after ~ 11 minutes of retries',
                'label': "TCP Keep-Alive Probes Frequency",
                'parents': ['SysNet']
            },            

            'tcp_keepalive_probes': {
                'desc': 'Specifies how many keepalive probes TCP sends out, until it decides that the connection is broken. The default value is 9',
                'label': "TCP Keep-Alive Probes Count",
                'parents': ['SysNet']
            },            

            'tcp_keepalive_time': {
                'desc': 'Specifies how often TCP sends out keepalive messages when keepalive is enabled. The default value is 7200 seconds (2 hours)',
                'label': "TCP Keep-Alive Messages Frequency",
                'parents': ['SysNet']
            },            

            'tcp_low_latency': {
                'desc': 'If set, the TCP stack makes decisions that prefer lower latency as opposed to higher throughput. By default, this option is not set meaning that higher throughput is preferred. An example of an application where this default should be changed would be a Beowulf compute cluster',
                'label': "TCP Low Latency",
                'parents': ['SysNet']
            },            

            'tcp_max_orphans': {
                'desc': 'Maximal number of TCP sockets not attached to any user file handle, held by system. If this number is exceeded orphaned connections are reset immediately and warning is printed',
                'label': "TCP Max Orphans",
                'parents': ['SysNet']
            },            

            'tcp_max_syn_backlog': {
                'desc': 'Maximal number of remembered connection requests, which still did not receive an acknowledgement from connecting client. The default value is 1024 for systems with more than 128 MB of memory, and 128 for low memory machines. If server suffers of overload, try to increase this number',
                'label': "Remembered Connection Request Maximal Number",
                'parents': ['SysNet']
            },            

            'tcp_max_tw_buckets': {
                'desc': 'Maximal number of timewait sockets held by system simultaneously. If this number is exceeded TIME_WAIT socket is immediately destroyed and warning is printed. This limit exists only to prevent simple DoS attacks, you must not lower the limit artificially, but rather increase it (probably, after increasing installed memory), if network conditions require more than default value (180000)',
                'label': "Maximal Number of TimeWait Sockets",
                'parents': ['SysNet']
            },            

            'tcp_mem': {
                'desc': 'Vector of 3 integers: min, pressure, max that describe the amount of pages allocated by TCP',
                'label': "TCP Memory",
                'parents': ['SysNet']
            },            

            'tcp_moderate_rcvbuf': {
                'desc': 'If set (1) TCP automatically adjusts the size of the socket receive window based on the amount of space used in the receive queue. Enabled by default',
                'label': "TCP Moderate RCV Buffer",
                'parents': ['SysNet']
            },            

            'tcp_mtu_probing': {
                'desc': 'Enable TCP Packetization Layer Path MTU Discovery. Disabled (0) by default',
                'label': "TCP MTU Probing",
                'parents': ['SysNet']
            },            

            'tcp_no_metrics_save': {
                'desc': 'Normally, TCP will remember some characteristics about the last connection in the flow cache. If tcp_no_metrics_save is set, then it does not. Useful for benchmarks or other tests',
                'label': "TCP No Metrics",
                'parents': ['SysNet']
            },            

            'tcp_orphan_retries': {
                'desc': 'Specifies how many times to retry before killing TCP connection, closed by our side. The default value of 7 corresponds to ~ 50 seconds - 16 minutes, depending on RTO. If your machine is loaded web server, you should think about lowering this value, such sockets may consume significant resources',
                'label': "TCP Orphan Retries",
                'parents': ['SysNet']
            },            

            'tcp_reordering': {
                'desc': 'Maximal reordering of packets in a TCP stream. The default value is 3',
                'label': "TCP Packets Maximal Reordering",
                'parents': ['SysNet']
            },            

            'tcp_retrans_collapse': {
                'desc': 'Bug-to-bug compatibility with some broken printers. On retransmit try to send bigger packets to work around bugs in certain TCP stacks. Enabled (1) by default.',
                'label': "TCP Retransmission Collapse",
                'parents': ['SysNet']
            },            

            'tcp_retries1': {
                'desc': 'Specifies how many times to retry before deciding that something is wrong and it is necessary to report this suspicion to network layer. Minimal RFC value is 3, it is also the default value, which corresponds to ~ 3 seconds - 8 minutes, depending on RTO',
                'label': "Number of TCP Retries Before Warning",
                'parents': ['SysNet']
            },            

            'tcp_retries2': {
                'desc': 'Specifies how many times to retry before killing alive TCP connection. RFC1122 says that the limit should be longer than 100 sec. It is too small number. The default value of 15 corresponds to ~ 13 - 30 minutes, depending on RTO',
                'label': "Number of TCP Retries Before Disconnection",
                'parents': ['SysNet']
            },            

            'tcp_rfc1337': {
                'desc': 'If set, the TCP stack behaves conforming to RFC1337. If unset (the default), we are not conforming to RFC, but prevent TCP TIME-WAIT assassination',
                'label': "TCP FRC 1337",
                'parents': ['SysNet']
            },            

            'tcp_rmem': {
                'desc': 'Specifies buffer used by TCP sockets',
                'label': "TCP Socket Memory",
                'parents': ['SysNet']
            },            

            'tcp_sack': {
                'desc': 'Enable Selective ACKnowledgement (SACK) Option for TCP. Enabled (1) by default',
                'label': "TCP Selective Acknowledgement",
                'parents': ['SysNet']
            },            

            'tcp_stdurg': {
                'desc': 'Use the host requirements interpretation of the TCP urg pointer field. Most hosts use the older BSD interpretation, so if you turn this on Linux might not communicate correctly with them. Disabled (0) by default',
                'label': "Host Requirements Interpretation",
                'parents': ['SysNet']
            },            

            'tcp_syn_retries': {
                'desc': 'Number of times initial SYNs for an active TCP connection attempt will be retransmitted. Should not be higher than 255. The default value is 5, which corresponds to ~ 180 seconds.',
                'label': "TCP SYN Retries",
                'parents': ['SysNet']
            },            

            'tcp_synack_retries': {
                'desc': 'Number of times SYNACKs for a passive TCP connection attempt will be retransmitted. Should not be higher than 255. The default value is 5, which corresponds to ~ 180 seconds.',
                'label': "TCP SYNACK Retries",
                'parents': ['SysNet']
            },            

            'tcp_syncookies': {
                'desc': 'Send out syncookies when the syn backlog queue of a socket overflows. This is to prevent against the common "syn flood attack". Disabled (0) by default',
                'label': "TCP SYN Cookies",
                'parents': ['SysNet']
            },            

            'tcp_timestamps': {
                'desc': 'Enable timestamps as defined in RFC1323. Enabled (1) by default',
                'label': "TCP TimeStamps",
                'parents': ['SysNet']
            },            

            'tcp_tso_win_divisor': {
                'desc': 'Allows control over what percentage of the congestion window can be consumed by a single TSO frame. The setting of this parameter is a choice between burstiness and building larger TSO frames. The default value is 3',
                'label': "TCP TSO Window Divisor",
                'parents': ['SysNet']
            },            

            'tcp_tw_recycle': {
                'desc': 'Enable fast recycling of sockets in TIME-WAIT status. The default value is 0 (disabled). It should not be changed without advice/request of technical experts',
                'label': "TCP Fast Socket Recycling",
                'parents': ['SysNet']
            },            

            'tcp_tw_reuse': {
                'desc': 'Allows to reuse TIME-WAIT sockets for new connections when it is safe from protocol viewpoint. The default value is 0. It should not be changed without advice/request of technical experts',
                'label': "TCP Time-Wait Socket Reuse",
                'parents': ['SysNet']
            },            

            'tcp_window_scaling': {
                'desc': 'Enable window scaling as defined in RFC1323. Enabled (1) by default',
                'label': "TCP Window Scaling",
                'parents': ['SysNet']
            },            

            'tcp_wmem': {
                'desc': 'Specifies memory allowed for send buffers for TCP socket ',
                'label': "TCP Socket Memory ",
                'parents': ['SysNet']
            },            

            'tcp_workaround_signed_windows': {
                'desc': 'If set (1), assume no receipt of a window scaling option means the remote TCP is broken and treats the window as a signed quantity. If unset (0), this is default, assume the remote TCP is not broken even if we do not receive a window scaling option from them',
                'label': "TCP Work-Around Signed Windows",
                'parents': ['SysNet']
            },            

            'max_dgram_qlen': {
                'desc': 'Limits how many datagrams can be queued on a unix domain sockets (SOCK_DGRAM) receive buffer. If a sender tries to send more datagrams, it blocks (in a blocking sendto) or returns error (in a non-blocking sendto). The default value is 10',
                'label': "Maximum Length of Datagram Queue",
                'parents': ['SysNet']
            },            
          
        }

        return thevars
Ejemplo n.º 9
0
    def get_vars():
        """Enumerates system variables in /proc/sys/vm and its subdirectories.

        Returns:

        """
        thevars = dict()
        _, parents, all_variables = traverse_directory(SysVm.VM)

        for var in all_variables:
            thevars[SysVm.key_format(var)] = {
                'label': var,
                'unit': '',
                'parents': parents[var]
            }

        # TODO: fill with variables and appropriate descriptions
        descs = {
            'raw': {
                'desc': "The full sys/vm log",
                'label': "Sys VM Full",
                'parents': ['vm']
            },
            
            'block_dump': {
                'desc': "Enables block I/O debugging when set to a nonzero value. If you want to find out which process caused the disk to spin up (see /proc/sys/vm/laptop_mode), you can gather information by setting the flag",
                'label': "Block Dump I/O Debugging",
                'parents': ['vm']
            },
            
            'dirty_background_bytes': {
                'desc': "Contains the amount of dirty memory at which the pdflush background writeback daemon will start writeback",
                'label': "Dirty Background Bytes",
                'parents': ['vm']
            },
            
            'dirty_background_ratio': {
                'desc': "Contains, as a percentage of total system memory, the number of pages at which the pdflush background writeback daemon will start writing out dirty data",
                'label': "Dirty Background Ratio",
                'parents': ['vm']
            },
            
            'dirty_bytes': {
                'desc': "Contains the amount of dirty memory at which a process generating disk writes will itself start writeback",
                'label': "Dirty Bytes",
                'parents': ['vm']
            },
            
            'dirty_expire_centisecs': {
                'desc': "Used to define when dirty data is old enough to be eligible for writeout by the pdflush daemons. It is expressed in 100'ths of a second. Data which has been dirty in memory for longer than this interval will be written out next time a pdflush daemon wakes up",
                'label': "Dirty Expire Centisecs",
                'parents': ['vm']
            },
            
            'dirty_ratio': {
                'desc': "Contains, as a percentage of total system memory, the number of pages at which a process which is generating disk writes will itself start writing out dirty data",
                'label': "Dirty Ratio",
                'parents': ['vm']
            },
            
            'dirty_writeback_centisecs': {
                'desc': "The pdflush writeback daemons will periodically wake up and write 'old' data out to disk. This tunable expresses the interval between those wakeups, in 100'ths of a second",
                'label': "Dirty Writeback Centisecs",
                'parents': ['vm']
            },
            
            'drop_caches': {
                'desc': "Causes the kernel to drop clean caches, dentries and inodes from memory, causing that memory to become free",
                'label': "Drop Caches",
                'parents': ['vm']
            },
            
            'highmem_is_dirtyable': {
                'desc': "This defaults to 0 (false), meaning that the dirty_ratio and dirty_background_ratio ratios are calculated as a percentage of low memory only. This protects against excessive scanning in page reclaim, swapping and general VM distress",
                'label': "HighMem is Dirtyable",
                'parents': ['vm']
            },
            
            'hugepages_treat_as_movable': {
                'desc': "Huge pages are not movable so are not allocated from ZONE_MOVABLE by default. However, as ZONE_MOVABLE will always have pages that can be migrated or reclaimed, it can be used to satisfy hugepage allocations even when the system has been running a long time. This allows an administrator to resize the hugepage pool at runtime depending on the size of ZONE_MOVABLE",
                'label': "Huge Pages Treated as Movable ",
                'parents': ['vm']
            },
            
            'hugetlb_shm_group': {
                'desc': "Contains group id that is allowed to create SysV shared memory segment using hugetlb page",
                'label': "HugeTLB Shared Memory Group",
                'parents': ['vm']
            },
            
            'laptop_mode': {
                'desc': "A knob that controls 'laptop mode'. When the knob is set, any physical disk I/O (that might have caused the hard disk to spin up, see /proc/sys/vm/block_dump) causes Linux to flush all dirty blocks",
                'label': "Laptop Mode",
                'parents': ['vm']
            },
            
            'legacy_va_layout': {
                'desc': "If non-zero, this sysctl disables the new 32-bit mmap map layout - the kernel will use the legacy (2.4) layout for all processes",
                'label': "Disable 32-bit MMAP Layout",
                'parents': ['vm']
            },
            
            'lowmem_reserve_ratio': {
                'desc': "Ratio of total pages to free pages for each memory zone",
                'label': "Low Memory Reserve Ratio",
                'parents': ['vm']
            },
            
            'max_map_count': {
                'desc': "Maximum number of memory map areas a process may have. Memory map areas are used as a side-effect of calling malloc, directly by mmap and mprotect, and also when loading shared libraries",
                'label': "Maximum Number of Memory Map Areas",
                'parents': ['vm']
            },
            
            'min_free_kbytes': {
                'desc': "Used to force the Linux VM to keep a minimum number of kilobytes free. The VM uses this number to compute a pages_min value for each lowmem zone in the system. Each lowmem zone gets a number of reserved free pages based proportionally on its size",
                'label': "Mininum Free KBytes",
                'parents': ['vm']
            },
            
            'min_slab_ratio': {
                'desc': "A percentage of the total pages in each zone. On Zone reclaim (fallback from the local zone occurs) slabs will be reclaimed if more than this percentage of pages in a zone are reclaimable slab pages. This insures that the slab growth stays under control even in NUMA systems that rarely perform global reclaim",
                'label': "Minimum Slab Ratio",
                'parents': ['vm']
            },
            
            'min_unmapped_ratio': {
                'desc': "A percentage of the total pages in each zone. Zone reclaim will only occur if more than this percentage of pages are in a state that zone_reclaim_mode allows to be reclaimed",
                'label': "Minimum Unmapped Ratio",
                'parents': ['vm']
            },
            
            'mmap_min_addr': {
                'desc': "Indicates the amount of address space which a user process will be restricted from mmaping. Since kernel null dereference bugs could accidentally operate based on the information in the first couple of pages of memory userspace processes should not be allowed to write to them",
                'label': "MMAP Minimal Address",
                'parents': ['vm']
            },
            
            'nr_hugepages': {
                'desc': "Indicates the current number of configured hugetlb pages in the kernel. Super user can dynamically request more (or free some pre-configured) hugepages. The allocation (or deallocation) of hugetlb pages is possible only if there are enough physically contiguous free pages in system (freeing of hugepages is possible only if there are enough hugetlb pages free that can be transferred back to regular memory pool)",
                'label': "Number of HugePages",
                'parents': ['vm']
            },
            
            'nr_overcommit_hugepages': {
                'desc': "Changes the maximum size of the hugepage pool. The maximum is nr_hugepages + nr_overcommit_hugepages",
                'label': "OverCommit Number of HugePages",
                'parents': ['vm']
            },
            
            'nr_pdflush_threads': {
                'desc': "The count of currently-running pdflush threads. This is a read-only value",
                'label': "Number of PDFlush Threads",
                'parents': ['vm']
            },
            
            'nr_trim_pages': {
                'desc': "This value adjusts the excess page trimming behaviour of power-of-2 aligned NOMMU mmap allocations",
                'label': "Number of Trim Pages",
                'parents': ['vm']
            },
            
            'numa_zonelist_order': {
                'desc': "This sysctl is only for NUMA. It specifies where the memory is allocated from and is controlled by zonelists",
                'label': "Numa ZoneList Order",
                'parents': ['vm']
            },
            
            'oom_dump_tasks': {
                'desc': "Enables a system-wide task dump (excluding kernel threads) to be produced when the kernel performs an OOM-killing and includes such information as pid, uid, tgid, vm size, rss, cpu, oom_adj score, and name. This is helpful to determine why the OOM killer was invoked and to identify the rogue task that caused it",
                'label': "Out-Of-Memory Dump Tasks",
                'parents': ['vm']
            },
            
            'oom_kill_allocating_task': {
                'desc': "Enables or disables killing the OOM-triggering task in out-of-memory situations",
                'label': "Kill Out-Of-Memory Dump Task",
                'parents': ['vm']
            },
            
            'overcommit_memory': {
                'desc': "Controls overcommit of system memory, possibly allowing processes to allocate (but not use) more memory than is actually available",
                'label': "OverCommit Memory",
                'parents': ['vm']
            },
            
            'overcommit_ratio': {
                'desc': "Percentage of physical memory size to include in overcommit calculations",
                'label': "OverCommit Ratio",
                'parents': ['vm']
            },
            
            'page-cluster': {
                'desc': "Controls the number of pages which are written to swap in a single attempt. The swap I/O size",
                'label': "Page Cluster",
                'parents': ['vm']
            },
            
            'panic_on_oom': {
                'desc': "Enables or disables panic on out-of-memory feature. If this is set to 1, the kernel panics when out-of-memory happens. If this is set to 0, the kernel will kill some rogue process, by calling oom_kill()",
                'label': "Panic on Out-Of-Memory",
                'parents': ['vm']
            },
            
            'percpu_pagelist_fraction': {
                'desc': "This is the fraction of pages at most (high mark pcp->high) in each zone that are allocated for each per cpu page list. The min value for this is 8. It means that we don't allow more than 1/8th of pages in each zone to be allocated in any single per_cpu_pagelist",
                'label': "PageList Fraction Per CPU",
                'parents': ['vm']
            },
            
            'scan_unevictable_pages': {
                'desc': "Initiates a scan of individual or all zones' unevictable lists and move any pages that have become evictable onto the respective zone's inactive list, where shrink_inactive_list() will deal with them. If evictable pages are found in unevictable lru, kernel will print filenames and file offsets of those pages",
                'label': "Scan Unevictable Pages",
                'parents': ['vm']
            },
            
            'stat_interval': {
                'desc': "Configures VM statistics update interval. The default value is 1. This tunable first appeared in 2.6.22 kernel",
                'label': "VM Statistics Update Interval",
                'parents': ['vm']
            },
            
            'swap_token_timeout': {
                'desc': "Contains valid hold time of swap out protection token. The Linux VM has token based thrashing control mechanism and uses the token to prevent unnecessary page faults in thrashing situation. The unit of the value is second. The value would be useful to tune thrashing behavior",
                'label': "Swap Token TimeOut",
                'parents': ['vm']
            },
            
            'swappiness': {
                'desc': "Sets the kernel's balance between reclaiming pages from the page cache and swapping process memory. The default value is 60. If you want kernel to swap out more process memory and thus cache more file contents increase the value. Otherwise, if you would like kernel to swap less decrease it",
                'label': "Swappiness",
                'parents': ['vm']
            },
            
            'vdso_enabled': {
                'desc': "When this flag is set, the kernel maps a vDSO page into newly created processes and passes its address down to glibc upon exec(). This feature is enabled by default",
                'label': "vDSO Enabled",
                'parents': ['vm']
            },
            
            'vfs_cache_pressure': {
                'desc': "Controls the tendency of the kernel to reclaim the memory which is used for caching of directory and inode objects",
                'label': "VFS Cache Pressure",
                'parents': ['vm']
            },
            
            'zone_reclaim_mode': {
                'desc': "Allows someone to set more or less aggressive approaches to reclaim memory when a zone runs out of memory. If it is set to zero then no zone reclaim occurs. Allocations will be satisfied from other zones / nodes in the system",
                'label': "Zone Reclaim Mode",
                'parents': ['vm']
            },
            
        }
 
        return thevars
Ejemplo n.º 10
0
    def get_vars():
        """
        """
        thevars = dict()
        _, parents, all_variables = traverse_directory(SysDev.DEV)

        for var in all_variables:
            thevars[SysDev.key_format(var)] = {
                'label': var,
                'unit': '',
                'parents': parents[var]
            }

        # TODO: fill with variables and appropriate descriptions
        descs = {
            'raw': {
                'desc': "The full sys/dev log",
                'label': "Sys DEV Full",
                'parents': ['dev']
            },
            'autoclose': {
                'desc':
                "If enabled (1), the drive(s) will close tray upon mount request. It is the default",
                'label': "Auto Close",
                'parents': ['dev']
            },
            'autoeject': {
                'desc':
                "If enabled (1), the drive(s) will eject media after unmount request. The default is 0 (don't eject on unmount)",
                'label': "Auto Eject",
                'parents': ['dev']
            },
            'check_media': {
                'desc':
                "Check media type capability status. Disabled (0) by default",
                'label': "Check Media Type Capability",
                'parents': ['dev']
            },
            'debug': {
                'desc':
                "Turn on (1) or off (0) debugging messages of the CD-ROM device driver. Off by default",
                'label': "Debugging Messages",
                'parents': ['dev']
            },
            'info': {
                'desc':
                "Contains general information about the CD-ROM drives attached to the system",
                'label': "CD-ROM Info",
                'parents': ['dev']
            },
            'lock': {
                'desc':
                "If enabled (1), lock the door on device open. It is the default",
                'label': "Lock the Door on SysDevice Open",
                'parents': ['dev']
            },
            'hpet': {
                'desc':
                "The High Precision Event Timer (HPET) hardware is the future replacement for the 8254 and Real Time Clock (RTC) periodic timer functionality",
                'label': "High Precision Event Timer",
                'parents': ['dev']
            },
            'max-user-freq': {
                'desc':
                "Allows user to define the upper limit of number of interrupts generated by the HPET driver. The default value is 64",
                'label': "Limit of Number of Interrupts by HPET",
                'parents': ['dev']
            },
            'parport': {
                'desc':
                "Contains information about the parallel ports of your system. It has one subdirectory for each port, named after the port number (0, 1, 2...).",
                'label': "Parallel Ports",
                'parents': ['dev']
            },
            'spintime': {
                'desc':
                "The default for spintime. When a new port is registered, it picks up the default spintime",
                'label': "SpinTime",
                'parents': ['dev']
            },
            'timeslice': {
                'desc':
                "The default for timeslice. When a new device is registered, it picks up the default timeslice",
                'label': "TimeSlice",
                'parents': ['dev']
            },
            'autoprobe': {
                'desc':
                "Any IEEE-1284 device ID information that has been acquired from the (non-IEEE 1284.3) device",
                'label': "AutoProbe",
                'parents': ['dev']
            },
            'autoprobe0': {
                'desc':
                "IEEE 1284 device ID information retrieved from daisy-chain devices that conform to IEEE 1284.3",
                'label': "AutoProbe 0",
                'parents': ['dev']
            },
            'autoprobe1': {
                'desc':
                "EEE 1284 device ID information retrieved from daisy-chain devices that conform to IEEE 1284.3",
                'label': "AutoProbe 1",
                'parents': ['dev']
            },
            'autoprobe2': {
                'desc':
                "IEEE 1284 device ID information retrieved from daisy-chain devices that conform to IEEE 1284.3",
                'label': "AutoProbe 2",
                'parents': ['dev']
            },
            'autoprobe3': {
                'desc':
                "IEEE 1284 device ID information retrieved from daisy-chain devices that conform to IEEE 1284.3",
                'label': "AutoProbe 3",
                'parents': ['dev']
            },
            'base-addr': {
                'desc':
                "Parallel port's base address, or addresses if the port has more than one in which case they are separated with tabs. These values might not have any sensible meaning for some ports",
                'label': "Base Address of Parallel Port",
                'parents': ['dev']
            },
            'active': {
                'desc':
                "A list of the device drivers using that port. A '+' will appear by the name of the device currently using the port (it might not appear against any). The string 'none' means that there are no device drivers using that port",
                'label': "Active",
                'parents': ['dev']
            },
            'dma': {
                'desc':
                "Parallel port's DMA channel, or -1 if none is being used",
                'label': "DMA Channel",
                'parents': ['dev']
            },
            'irq': {
                'desc': "Parallel port's IRQ, or -1 if none is being used",
                'label': "Parallel Port's IRQ",
                'parents': ['dev']
            },
            'modes': {
                'desc': "Parallel port's hardware modes, comma-separated",
                'label': "Parallel Port's Hardware Modes",
                'parents': ['dev']
            },
            'raid': {
                'desc': "Used to control RAID reconstruction speed",
                'label': "RAID",
                'parents': ['dev']
            },
            'speed_limit_max': {
                'desc':
                "RAID reconstruction code is expected to only access disks when there is no disk activity due to applications. With this tunable you can set the maximum speed in KB/s in that case. The default is 200000 KB/s",
                'label': "Speed Limit Maximum",
                'parents': ['dev']
            },
            'speed_limit_min': {
                'desc':
                "RAID reconstruction code is expected to only access disks when there is no disk activity due to applications, with a guaranteed minimum set by this tunable (in KB/s). The default value is 1000 KB/s",
                'label': "Speed Limit Minimum",
                'parents': ['dev']
            },
            'rtc': {
                'desc': "Configuration of the real time clock (RTC) driver",
                'label': "Real Time Clock",
                'parents': ['dev']
            },
            'scsi': {
                'desc': "Configuration of the SCSI driver",
                'label': "SCSI Driver",
                'parents': ['dev']
            },
            'logging_level': {
                'desc':
                "Defines the scsi logging feature. It is a means by which the user can select how much information they get about various goings on, and it can be really useful for fault tracing. The logging word is divided into 8 nibbles, each of which describes a loglevel",
                'label': "Logging Level",
                'parents': ['dev']
            },
        }
        return thevars
Ejemplo n.º 11
0
 def get_data(verbose=False):
     """
     """
     tree, _, _ = traverse_directory(SysDev.DEV, verbose=verbose)
     return tree
Ejemplo n.º 12
0
    def get_vars():
        """
        """
        thevars = dict()
        _, parents, all_variables = traverse_directory(SysDev.DEV)

        for var in all_variables:
            thevars[SysDev.key_format(var)] = {
                'label': var,
                'unit': '',
                'parents': parents[var]
            }

        # TODO: fill with variables and appropriate descriptions
        descs = {
            'raw': {
                'desc': "The full sys/dev log",
                'label': "Sys DEV Full",
                'parents': ['dev']
            },

            'autoclose': {
                'desc': "If enabled (1), the drive(s) will close tray upon mount request. It is the default",
                'label': "Auto Close",
                'parents': ['dev']
            },

            'autoeject': {
                'desc': "If enabled (1), the drive(s) will eject media after unmount request. The default is 0 (don't eject on unmount)",
                'label': "Auto Eject",
                'parents': ['dev']
            },

            'check_media': {
                'desc': "Check media type capability status. Disabled (0) by default",
                'label': "Check Media Type Capability",
                'parents': ['dev']
            },

            'debug': {
                'desc': "Turn on (1) or off (0) debugging messages of the CD-ROM device driver. Off by default",
                'label': "Debugging Messages",
                'parents': ['dev']
            },

            'info': {
                'desc': "Contains general information about the CD-ROM drives attached to the system",
                'label': "CD-ROM Info",
                'parents': ['dev']
            },

            'lock': {
                'desc': "If enabled (1), lock the door on device open. It is the default",
                'label': "Lock the Door on SysDevice Open",
                'parents': ['dev']
            },

            'hpet': {
                'desc': "The High Precision Event Timer (HPET) hardware is the future replacement for the 8254 and Real Time Clock (RTC) periodic timer functionality",
                'label': "High Precision Event Timer",
                'parents': ['dev']
            },

            'max-user-freq': {
                'desc': "Allows user to define the upper limit of number of interrupts generated by the HPET driver. The default value is 64",
                'label': "Limit of Number of Interrupts by HPET",
                'parents': ['dev']
            },

            'parport': {
                'desc': "Contains information about the parallel ports of your system. It has one subdirectory for each port, named after the port number (0, 1, 2...).",
                'label': "Parallel Ports",
                'parents': ['dev']
            },

            'spintime': {
                'desc': "The default for spintime. When a new port is registered, it picks up the default spintime",
                'label': "SpinTime",
                'parents': ['dev']
            },

            'timeslice': {
                'desc': "The default for timeslice. When a new device is registered, it picks up the default timeslice",
                'label': "TimeSlice",
                'parents': ['dev']
            },

            'autoprobe': {
                'desc': "Any IEEE-1284 device ID information that has been acquired from the (non-IEEE 1284.3) device",
                'label': "AutoProbe",
                'parents': ['dev']
            },

            'autoprobe0': {
                'desc': "IEEE 1284 device ID information retrieved from daisy-chain devices that conform to IEEE 1284.3",
                'label': "AutoProbe 0",
                'parents': ['dev']
            },

            'autoprobe1': {
                'desc': "EEE 1284 device ID information retrieved from daisy-chain devices that conform to IEEE 1284.3",
                'label': "AutoProbe 1",
                'parents': ['dev']
            },

            'autoprobe2': {
                'desc': "IEEE 1284 device ID information retrieved from daisy-chain devices that conform to IEEE 1284.3",
                'label': "AutoProbe 2",
                'parents': ['dev']
            },

            'autoprobe3': {
                'desc': "IEEE 1284 device ID information retrieved from daisy-chain devices that conform to IEEE 1284.3",
                'label': "AutoProbe 3",
                'parents': ['dev']
            },

            'base-addr': {
                'desc': "Parallel port's base address, or addresses if the port has more than one in which case they are separated with tabs. These values might not have any sensible meaning for some ports",
                'label': "Base Address of Parallel Port",
                'parents': ['dev']
            },

            'active': {
                'desc': "A list of the device drivers using that port. A '+' will appear by the name of the device currently using the port (it might not appear against any). The string 'none' means that there are no device drivers using that port",
                'label': "Active",
                'parents': ['dev']
            },

            'dma': {
                'desc': "Parallel port's DMA channel, or -1 if none is being used",
                'label': "DMA Channel",
                'parents': ['dev']
            },

            'irq': {
                'desc': "Parallel port's IRQ, or -1 if none is being used",
                'label': "Parallel Port's IRQ",
                'parents': ['dev']
            },

            'modes': {
                'desc': "Parallel port's hardware modes, comma-separated",
                'label': "Parallel Port's Hardware Modes",
                'parents': ['dev']
            },

            'raid': {
                'desc': "Used to control RAID reconstruction speed",
                'label': "RAID",
                'parents': ['dev']
            },

            'speed_limit_max': {
                'desc': "RAID reconstruction code is expected to only access disks when there is no disk activity due to applications. With this tunable you can set the maximum speed in KB/s in that case. The default is 200000 KB/s",
                'label': "Speed Limit Maximum",
                'parents': ['dev']
            },

            'speed_limit_min': {
                'desc': "RAID reconstruction code is expected to only access disks when there is no disk activity due to applications, with a guaranteed minimum set by this tunable (in KB/s). The default value is 1000 KB/s",
                'label': "Speed Limit Minimum",
                'parents': ['dev']
            },

            'rtc': {
                'desc': "Configuration of the real time clock (RTC) driver",
                'label': "Real Time Clock",
                'parents': ['dev']
            },

            'scsi': {
                'desc': "Configuration of the SCSI driver",
                'label': "SCSI Driver",
                'parents': ['dev']
            },

            'logging_level': {
                'desc': "Defines the scsi logging feature. It is a means by which the user can select how much information they get about various goings on, and it can be really useful for fault tracing. The logging word is divided into 8 nibbles, each of which describes a loglevel",
                'label': "Logging Level",
                'parents': ['dev']
            },

        }
        return thevars
Ejemplo n.º 13
0
 def get_data(verbose=False):
     """
     """
     tree, _, _ = traverse_directory(SysDev.DEV, verbose=verbose)
     return tree
Ejemplo n.º 14
0
    def get_vars():
        """Enumerates system variables in /proc/sys/kernel and its subdirectories.

        Returns:
            thevars (dict): parsed system variables with their descriptions
        """
        thevars = dict()
        _, parents, all_variables = traverse_directory(SysKernel.KERNEL)

        for var in all_variables:
            thevars[SysKernel.key_format(var)] = {
                'label': var,
                'unit': '',
                'parents': parents[var]
            }

        # TODO: fill with variables and appropriate descriptions
        descs = {
            'acct': {
                'desc': "BSD-style process accounting is enabled. It contains three values; highwater, lowwater, and frequency. These values control process accounting behavior. If the free space on the file system where the log lives goes below lowwater percentage, accounting suspends. If it goes above highwater percentage, accounting resumes. Frequency determines how often (in seconds) you check the amount of free space",
                'label': "BSD-Style Process Accounting",
                'parents': ['SysKernel']
            },

            'acpi_video_flags': {
                'desc': "Allows mode of video boot to be set during run time",
                'label': "ACPI Video Flags",
                'parents': ['SysKernel']
            },

            'bootloader_type': {
                'desc': "Exports to userspace the boot loader ID which has been exported by (b)zImage boot loaders since boot protocol version 2",
                'label': "BootLoader Type",
                'parents': ['SysKernel']
            },
            
            'cad_pid': {
                'desc': "Allows to set/get PID of the process that gets the signal when ctrl-alt-del key sequence is pressed. By default it is the init process (PID 1)",
                'label': "Set/Get PID",
                'parents': ['SysKernel']
            },
            
            'cap-bound': {
                'desc': "Exports the so called capability bounding set to userspace: a list of capabilities that are allowed to be held by any process on the system. If a capability does not appear in the bounding set, it may not be exercised by any process, no matter how privileged",
                'label': "Capability Bounding Set",
                'parents': ['SysKernel']
            },
            
            'core_pattern': {
                'desc': "Specifies a core dumpfile pattern name",
                'label': "Dumpfile Pattern Name",
                'parents': ['SysKernel']
            },
            
            'core_uses_pid': {
                'desc': "By setting core_uses_pid to 1 (the default is 0), the coredump filename becomes core",
                'label': "Core Uses Pid",
                'parents': ['SysKernel']
            },
            
            'ctrl-alt-del': {
                'desc': "Allows init program to handle a graceful restart (or to the PID of your choice, which you can configure with cad_pid tunable) in case the value = 0 or and immediate restart if the value >0",
                'label': "Ctrl-Alt-Del",
                'parents': ['SysKernel']
            },
            
            'domainname': {
                'desc': "Sets the NIS/YP domainname in exactly the same way as the command domainname",
                'label': "Domain Name",
                'parents': ['SysKernel']
            },
            
            'hostname': {
                'desc': "Sets the NIS/YP hostname in exactly the same way as the command hostname",
                'label': "Host Name",
                'parents': ['SysKernel']
            },
            
            'hotplug': {
                'desc': "The location where the hotplug policy agent is located. The default value is /sbin/hotplug",
                'label': "Location of HotPlug",
                'parents': ['SysKernel']
            },
            
            'hz_timer': {
                'desc': "Switches the regular HZ timer off when the system is going idle. This helps z/VM to detect that the Linux system is idle. VM can then swap out this guest which reduces memory usage. It also reduces the overhead of idle systems",
                'label': "HZ Timer Switcher",
                'parents': ['SysKernel']
            },
            
            'ieee_emulation_warnings': {
                'desc': "Reports IEEE floating point warnings",
                'label': "IEEE Emulation Warnings",
                'parents': ['SysKernel']
            },
            
            'kstack_depth_to_print': {
                'desc': "Controls the number of words to print when dumping the raw kernel stack. The default value depends on the CPU architecture",
                'label': "SysKernel Stack Print Depth",
                'parents': ['SysKernel']
            },
            
            'maps_protect': {
                'desc': "Enables/disables the protection of the per-process proc entries maps and smaps. When enabled, the contents of these files are visible only to readers that are allowed to ptrace() the given process",
                'label': "Maps/Smaps Protection",
                'parents': ['SysKernel']
            },
            
            'max_lock_depth': {
                'desc': "Limits the amount of deadlock-checking the kernel will do. The default value is 1024",
                'label': "DeadLock Checking Limit",
                'parents': ['SysKernel']
            },
            
            'modprobe': {
                'desc': "The location where the modprobe binary is located. The kernel uses this program to load modules on demand. The default value is /sbin/modprobe",
                'label': "ModProbe Location",
                'parents': ['SysKernel']
            },
            
            'msgmax': {
                'desc': "Specifies the maximum allowable size of any single message in a System V IPC message queue, in bytes. msgmax must be no larger than msgmnb (the size of a queue). The default is 8192 bytes",
                'label': "Maximum Size of a Message",
                'parents': ['SysKernel']
            },
            
            'msgmnb': {
                'desc': "Specifies the maximum allowable total combined size of all messages queued in a single given System V IPC message queue at any one time, in bytes. The default is 16384 bytes",
                'label': "Maximum Total Messages Size",
                'parents': ['SysKernel']
            },
            
            'msgmni': {
                'desc': "Specifies the maximum number of system-wide System V IPC message queue identifiers (one per queue). The default is 16",
                'label': "Maximum Number of Message Queue Identifiers",
                'parents': ['SysKernel']
            },
            
            'ngroups_max': {
                'desc': "Specifies  the maximum number of supplementary groups a user can be a member of (kernel's NGROUPS_MAX) to the userspace. The default value is 65536. This tunable does not seem to be used anywhere in the latest kernels",
                'label': "Maximum number of Supplementary Groups",
                'parents': ['SysKernel']
            },
            
            'nmi_watchdog': {
                'desc': "Enables/disables NMI watchdog. It is enabled by default on configurations that supports it",
                'label': "NWI WatchDog",
                'parents': ['SysKernel']
            },
            
            'osrelease': {
                'desc': "The running kernel version",
                'label': "OS Release",
                'parents': ['SysKernel']
            },
            
            'ostype': {
                'desc': "The running OS type",
                'label': "OS Type",
                'parents': ['SysKernel']
            },
            
            'overflowgid': {
                'desc': "Specifies GID. This sysctl allows to change the value of the fixed GID. The default is 65534",
                'label': "Specify GID",
                'parents': ['SysKernel']
            },
            
            'overflowuid': {
                'desc': "Specifies UID. This sysctl allows you to change the value of the fixed UID. The default is 65534",
                'label': "Specify UID",
                'parents': ['SysKernel']
            },
            
            'panic': {
                'desc': "Represents the number of seconds the kernel waits before rebooting on a panic. When you use the software watchdog, the recommended setting is 60. If set to 0, the auto reboot after a kernel panic is disabled, which is the default setting",
                'label': "Time Before Panic Rebooting",
                'parents': ['SysKernel']
            },
            
            'panic_on_oops': {
                'desc': "Controls the kernel's behaviour when an oops or BUG is encountered",
                'label': "Panic On Oops/Bugs",
                'parents': ['SysKernel']
            },
            
            'panic_on_unrecovered_nmi': {
                'desc': "SysKernel behaviour in case of unrecovered NMI. The default Linux behaviour on an NMI of either memory or unknown is to continue operation. For many environments such as scientific computing it is preferable that the box is taken out and the error dealt with than an uncorrected parity/ECC error get propagated",
                'label': "Panic On Unrecovered NMI",
                'parents': ['SysKernel']
            },
            
            'pid_max': {
                'desc': "PID allocation wrap value. When the kernel's next PID value reaches this value, it wraps back to a minimum PID value. PIDs of value pid_max or larger are not allocated. The default is 32768",
                'label': "Maximum PID Value",
                'parents': ['SysKernel']
            },
            
            'poweroff_cmd': {
                'desc': "The command defined in this sysctl is called by various pieces of code around the kernel that want to be able to trigger an orderly poweroff. If the orderly poweroff fails, kernel will force an immediate shutdown",
                'label': "Power OFF Command",
                'parents': ['SysKernel']
            },
            
            'print-fatal-signals': {
                'desc': "Enables printing of some minimal information about userspace segfaults to the kernel console. This is useful to find early bootup bugs where userspace debugging is very hard. Defaults to off",
                'label': "Print Fatal Signals",
                'parents': ['SysKernel']
            },
            
            'printk': {
                'desc': "Influences printk() behavior when printing or logging error messages",
                'label': "Printk() Behaviour",
                'parents': ['SysKernel']
            },
            
            'printk_ratelimit': {
                'desc': "Specifies the minimum length of time between these messages (in seconds), by default we allow one every 5 seconds. A value of 0 will disable rate limiting",
                'label': "Printk Rate Limit",
                'parents': ['SysKernel']
            },
            
            'printk_ratelimit_burst': {
                'desc': "Specifies the number of messages we can send before ratelimiting kicks in",
                'label': "Printk Rate Limit Burst",
                'parents': ['SysKernel']
            },
            
            'max': {
                'desc': "Defines the maximum number of Unix 98 pseudo-terminals",
                'label': "Maximum Number of Unix 98",
                'parents': ['SysKernel']
            },
            
            'nr': {
                'desc': "Indicates how many Unix 98 pseudo-terminals are currently in use",
                'label': "Number of Unix 98 in Use",
                'parents': ['SysKernel']
            },
            
            'boot_id': {
                'desc': "Contains random string like 6fd5a44b-35f4-4ad4-a9b9-6b9be13e1fe9. This one was generated once at boot",
                'label': "Random Boot String",
                'parents': ['SysKernel']
            },
            
            'entropy_avail': {
                'desc': "Gives the available entropy. Normally, this will be 4096 (bits), a full entropy pool",
                'label': "Available Entropy",
                'parents': ['SysKernel']
            },
            
            'poolsize': {
                'desc': "Gives the size of the entropy pool. Normally, this will be 4096 bits (512 bytes). It can be changed to any value for which an algorithm is available. Currently the choices are: 32, 64, 128, 256, 512, 1024, 2048",
                'label': "Entropy Pool Size",
                'parents': ['SysKernel']
            },
            
            'read_wakeup_threshold': {
                'desc': "Contains the number of bits of entropy required for waking up processes that sleep waiting for entropy from /dev/random. The default is 64",
                'label': "Read Wakeup Threshold",
                'parents': ['SysKernel']
            },
            
            'uuid': {
                'desc': "Contains random string like 6fd5a44b-35f4-4ad4-a9b9-6b9be13e1fe9. This one is generated afresh for each read",
                'label': "Random After-Read String",
                'parents': ['SysKernel']
            },
            
            'write_wakeup_threshold': {
                'desc': "Contains the number of bits of entropy below which we wake up processes that do a select() or poll() for write access to /dev/random",
                'label': "Write WakeUp Threshold",
                'parents': ['SysKernel']
            },
            
            'randomize_va_space': {
                'desc': "Address space randomization (security feature) if enabled (1), which is the default",
                'label': "Address Space Randomization",
                'parents': ['SysKernel']
            },
            
            'real-root-dev': {
                'desc': "Exists if there is initrd support compiled in the kernel. In that case, the real root device can be changed from within linuxrc by writing the number of the new root filesystem device to this file",
                'label': "Real Root Device",
                'parents': ['SysKernel']
            },
            
            'sched_compat_yield': {
                'desc': "Makes sys_sched_yield() be more aggressive, by moving the yielding task to the last position in the rbtree. The default is 0 (what Ingo Molnar likes)",
                'label': "",
                'parents': ['SysKernel']
            },
            
            'sem': {
                'desc': "Contains 4 numbers defining limits for System V IPC semaphores. SEMMSL - the maximum number of semaphores per semaphore set. SEMMNS - a system-wide limit on the number of semaphores in all semaphore sets. SEMOPM - the maximum number of operations that may be specified in a semop(2) call. SEMMNI - a system-wide limit on the maximum number of semaphore identifiers",
                'label': "",
                'parents': ['SysKernel']
            },
            
            'sg-big-buff': {
                'desc': "Shows the size of the generic SCSI device (sg) buffer. Not tunable yet, but could be changed on compile time by editing include/scsi/sg.h and changing the value of SG_BIG_BUFF. However, there shouldn't be any reason to change this value",
                'label': "Size of SCSI Device Buffer",
                'parents': ['SysKernel']
            },
            
            'shmall': {
                'desc': "Contains the system-wide limit on the total number of pages of System V IPC shared memory. The default value is 2097152",
                'label': "Total Number of Pages of Shared Memory",
                'parents': ['SysKernel']
            },
            
            'shmmax': {
                'desc': "Sets the run time limit on the maximum System V IPC shared memory segment size that can be created. Shared memory segments up to 1GB are now supported in the kernel. This value defaults to 33554432 (32MB",
                'label': "RunTime Limit for Maximum Memory Segment Size",
                'parents': ['SysKernel']
            },
            
            'shmmni': {
                'desc': "Specifies the system-wide maximum number of System V IPC shared memory segments that can be created. The default value is 4096",
                'label': "SystemWide Maximum Number of Shared Memory Segments",
                'parents': ['SysKernel']
            },
            
            'max-threads': {
                'desc': "The maximum number of threads that should in the slow work pool. May be anywhere between min-threads and 255 or NR_CPUS * 2, whichever is greater",
                'label': "Maximum Number of Threads in Slow Work Pool",
                'parents': ['SysKernel']
            },
            
            'min-threads': {
                'desc': "The minimum number of threads that should be in the slow work pool whilst it is in use. This may be anywhere between 2 and max-threads",
                'label': "Minimum Number of Threads in Slow Work Pool",
                'parents': ['SysKernel']
            },
            
            'vslow-percentage': {
                'desc': "The percentage of active threads in the slow work pool that may be used to execute very slow work items. This may be between 1 and 99. The resultant number is bounded to between 1 and one fewer than the number of active threads. This ensures there is always at least one thread that can process very slow work items, and always at least one thread that will not",
                'label': "Active Threads in Slow Work Pool Percentage",
                'parents': ['SysKernel']
            },
            
            'sysrq': {
                'desc': "Controls the functions allowed to be invoked via the SysRq key. By default the file contains 1 which means that every possible SysRq request is allowed",
                'label': "SesRq Functions Control",
                'parents': ['SysKernel']
            },
            
            'tainted': {
                'desc': "Specifies whether the kernel has been tainted. Non-zero if the kernel has been tainted",
                'label': "Is SysKernel Tainted",
                'parents': ['SysKernel']
            },
            
            'threads-max': {
                'desc': "Specifies the limit on the maximum number of running threads system-wide",
                'label': "Maximum Number of Running Threads",
                'parents': ['SysKernel']
            },
            
            'unknown_nmi_panic': {
                'desc': "Affects behavior of handling NMI (Non-Maskable Interrupt). When the value is non-zero, unknown NMI is trapped and then panic occurs. At that time, kernel debugging information is displayed on console. That can ease the process of diagnosing system hangs",
                'label': "Unknown NMI Panic",
                'parents': ['SysKernel']
            },
            
            'userprocess_debug': {
                'desc': "Enables user process debugging",
                'label': "User Process Debugging",
                'parents': ['SysKernel']
            },
                        
            'version': {
                'desc': "Indicates the version of the kernel",
                'label': "SysKernel Version",
                'parents': ['SysKernel']
            },
 
        }

        return thevars