Prototype: sysctlvalue(key)

Return type: string

Description: Returns the sysctl value of key using /proc/sys.

Arguments:

  • key: string - sysctl key - in the range: .*

Example:

code
vars:
  "tested" slist => { "net.ipv4.tcp_mem", "net.unix.max_dgram_qlen" };
  "values[$(tested)]" string => sysctlvalue($(tested));

Output:

code
"values[net.ipv4.tcp_mem]" = "383133\t510845\t766266"
"values[net.unix.max_dgram_qlen]" = "512"

Notes:

History: Was introduced in version 3.11.0 (2017)

See also: data_sysctlvalues()