netgate-sysctl API (24.06)

This YANG module provides a Netgate-defined data-model for Linux Kernel sysctl parameters.

Copyright 2018-2020 Rubicon Communications, LLC.

sysctl-config

returns netgate.sysctl.SysctlConfig

Linux kernel sysctl parameters.

Responses

Request samples

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))

}

Response samples

Content type
application/yang-data+json
{
  • "netgate-sysctl:sysctl-config": {
    }
}

creates netgate.sysctl.SysctlConfig

Linux kernel sysctl parameters.

Request Body schema: application/yang-data+json

netgate.sysctl.SysctlConfig to be added to list

object (netgate.sysctl.sysctlconfig.Kernel)

Kernel sysctl parameters.

object (netgate.sysctl.sysctlconfig.Vm)

VM sysctl parameters.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-sysctl:kernel": {
    },
  • "netgate-sysctl:vm": {
    }
}

creates or updates netgate.sysctl.SysctlConfig

Linux kernel sysctl parameters.

Request Body schema: application/yang-data+json

netgate.sysctl.SysctlConfig to be added or updated

object (netgate.sysctl.SysctlConfig)

Linux kernel sysctl parameters.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-sysctl:sysctl-config": {
    }
}

removes netgate.sysctl.SysctlConfig

Linux kernel sysctl parameters.

Responses

Request samples

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))

}

returns netgate.sysctl.sysctlconfig.Kernel

Kernel sysctl parameters.

Responses

Request samples

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))

}

Response samples

Content type
application/yang-data+json
{
  • "netgate-sysctl:kernel": {
    }
}

creates netgate.sysctl.sysctlconfig.Kernel

Kernel sysctl parameters.

Request Body schema: application/yang-data+json

netgate.sysctl.sysctlconfig.Kernel to be added to list

netgate-sysctl:shmmax
integer <int32>

Shared memory maximum.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-sysctl:shmmax": 0
}

creates or updates netgate.sysctl.sysctlconfig.Kernel

Kernel sysctl parameters.

Request Body schema: application/yang-data+json

netgate.sysctl.sysctlconfig.Kernel to be added or updated

object (netgate.sysctl.sysctlconfig.Kernel)

Kernel sysctl parameters.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-sysctl:kernel": {
    }
}

removes netgate.sysctl.sysctlconfig.Kernel

Kernel sysctl parameters.

Responses

Request samples

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))

}

returns netgate.sysctl.sysctlconfig.Vm

VM sysctl parameters.

Responses

Request samples

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))

}

Response samples

Content type
application/yang-data+json
{
  • "netgate-sysctl:vm": {
    }
}

creates netgate.sysctl.sysctlconfig.Vm

VM sysctl parameters.

Request Body schema: application/yang-data+json

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.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-sysctl:max_map_count": 65530,
  • "netgate-sysctl:nr_overcommit_hugepages": 256,
  • "netgate-sysctl:nr_hugepages": 1024
}

creates or updates netgate.sysctl.sysctlconfig.Vm

VM sysctl parameters.

Request Body schema: application/yang-data+json

netgate.sysctl.sysctlconfig.Vm to be added or updated

object (netgate.sysctl.sysctlconfig.Vm)

VM sysctl parameters.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-sysctl:vm": {
    }
}

removes netgate.sysctl.sysctlconfig.Vm

VM sysctl parameters.

Responses

Request samples

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))

}

sysctl-state

returns netgate.sysctl.SysctlState

Linux kernel sysctl parameters.

Responses

Request samples

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))

}

Response samples

Content type
application/yang-data+json
{
  • "netgate-sysctl:sysctl-state": {
    }
}

returns netgate.sysctl.sysctlstate.Kernel

Kernel sysctl parameters.

Responses

Request samples

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))

}

Response samples

Content type
application/yang-data+json
{
  • "netgate-sysctl:kernel": {
    }
}

returns netgate.sysctl.sysctlstate.Vm

VM sysctl parameters.

Responses

Request samples

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))

}

Response samples

Content type
application/yang-data+json
{
  • "netgate-sysctl:vm": {
    }
}