This YANG module provides a Netgate-defined data-model for Linux Kernel sysctl parameters.
Copyright 2018-2020 Rubicon Communications, LLC.
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-sysctl:sysctl-config" req, _ := http.NewRequest("GET", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
{- "netgate-sysctl:sysctl-config": {
- "netgate-sysctl:kernel": {
- "netgate-sysctl:shmmax": 0
}, - "netgate-sysctl:vm": {
- "netgate-sysctl:max_map_count": 65530,
- "netgate-sysctl:nr_overcommit_hugepages": 256,
- "netgate-sysctl:nr_hugepages": 1024
}
}
}
Linux kernel sysctl parameters.
netgate.sysctl.SysctlConfig to be added to list
object (netgate.sysctl.sysctlconfig.Kernel) Kernel sysctl parameters. | |
object (netgate.sysctl.sysctlconfig.Vm) VM sysctl parameters. |
{- "netgate-sysctl:kernel": {
- "netgate-sysctl:shmmax": 0
}, - "netgate-sysctl:vm": {
- "netgate-sysctl:max_map_count": 65530,
- "netgate-sysctl:nr_overcommit_hugepages": 256,
- "netgate-sysctl:nr_hugepages": 1024
}
}
Linux kernel sysctl parameters.
netgate.sysctl.SysctlConfig to be added or updated
object (netgate.sysctl.SysctlConfig) Linux kernel sysctl parameters. |
{- "netgate-sysctl:sysctl-config": {
- "netgate-sysctl:kernel": {
- "netgate-sysctl:shmmax": 0
}, - "netgate-sysctl:vm": {
- "netgate-sysctl:max_map_count": 65530,
- "netgate-sysctl:nr_overcommit_hugepages": 256,
- "netgate-sysctl:nr_hugepages": 1024
}
}
}
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-sysctl:sysctl-config" req, _ := http.NewRequest("DELETE", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-sysctl:sysctl-config/kernel" req, _ := http.NewRequest("GET", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
{- "netgate-sysctl:kernel": {
- "netgate-sysctl:shmmax": 0
}
}
Kernel sysctl parameters.
netgate.sysctl.sysctlconfig.Kernel to be added to list
netgate-sysctl:shmmax | integer <int32> Shared memory maximum. |
{- "netgate-sysctl:shmmax": 0
}
Kernel sysctl parameters.
netgate.sysctl.sysctlconfig.Kernel to be added or updated
object (netgate.sysctl.sysctlconfig.Kernel) Kernel sysctl parameters. |
{- "netgate-sysctl:kernel": {
- "netgate-sysctl:shmmax": 0
}
}
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-sysctl:sysctl-config/kernel" req, _ := http.NewRequest("DELETE", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-sysctl:sysctl-config/vm" req, _ := http.NewRequest("GET", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
{- "netgate-sysctl:vm": {
- "netgate-sysctl:max_map_count": 65530,
- "netgate-sysctl:nr_overcommit_hugepages": 256,
- "netgate-sysctl:nr_hugepages": 1024
}
}
VM sysctl parameters.
netgate.sysctl.sysctlconfig.Vm to be added to list
netgate-sysctl:max_map_count | integer <int32> Default: 65530 Maximum map count. |
netgate-sysctl:nr_overcommit_hugepages | integer <int32> Default: 256 Number of extra huge pages. |
netgate-sysctl:nr_hugepages | integer <int32> Default: 1024 Number of huge pages. |
{- "netgate-sysctl:max_map_count": 65530,
- "netgate-sysctl:nr_overcommit_hugepages": 256,
- "netgate-sysctl:nr_hugepages": 1024
}
VM sysctl parameters.
netgate.sysctl.sysctlconfig.Vm to be added or updated
object (netgate.sysctl.sysctlconfig.Vm) VM sysctl parameters. |
{- "netgate-sysctl:vm": {
- "netgate-sysctl:max_map_count": 65530,
- "netgate-sysctl:nr_overcommit_hugepages": 256,
- "netgate-sysctl:nr_hugepages": 1024
}
}
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-sysctl:sysctl-config/vm" req, _ := http.NewRequest("DELETE", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-sysctl:sysctl-state" req, _ := http.NewRequest("GET", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
{- "netgate-sysctl:sysctl-state": {
- "netgate-sysctl:kernel": {
- "netgate-sysctl:shmmax": 0
}, - "netgate-sysctl:vm": {
- "netgate-sysctl:max_map_count": 0,
- "netgate-sysctl:nr_overcommit_hugepages": 0,
- "netgate-sysctl:nr_hugepages": 0
}
}
}
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-sysctl:sysctl-state/kernel" req, _ := http.NewRequest("GET", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
{- "netgate-sysctl:kernel": {
- "netgate-sysctl:shmmax": 0
}
}
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-sysctl:sysctl-state/vm" req, _ := http.NewRequest("GET", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
{- "netgate-sysctl:vm": {
- "netgate-sysctl:max_map_count": 0,
- "netgate-sysctl:nr_overcommit_hugepages": 0,
- "netgate-sysctl:nr_hugepages": 0
}
}