The sysctl is a Unix interface used to modify variables that the kernel uses to determine behavior. There are two ways to work with sysctl: by directly reading and modifying files in /proc/sys and by using the sysctl program supplied with most distributions. The regedit interface is the closest parallel for Windows.
Questions tagged [sysctl]
174 questions
1
vote
1 answer
sysctl migrate to 2.6.35
I have userspace sysctl calls made to sysctl tables configured on a 2.6.24 kernel. I have migrated the sysctl code to 2.6.35 kernel. I'm seeing warning msgs sayg that 'deprecated sysctl warning' when i make sysctl() calls from userspace. The same…

progster
- 79
- 3
- 10
1
vote
1 answer
how get per process info,such as mem,3G flow
I use sysctl () function to get the process list,but I only find start time,name.how can I get more info from per process?

MAC-z
- 11
- 2
1
vote
0 answers
Got Numerical result out of range and Invalid argument on sysctl
On one operating system, when i execute the following sysctl command,
got errors:
sysctl -w kernel.sem="4096 2097152000 2097152 512000"
--> sysctl: setting key "kernel.sem": Numeric result out of range.
systcl -w kernel.shmmni=819200
--> sysctl:…

yaoweijq
- 263
- 2
- 12
1
vote
2 answers
How to permanently change sysctl settings on a GKE host node?
We have a kubernetes cluster running in Google GKE. I want to permanently set another value for fs.aio-max-nr in sysctl, but it keeps changing back to default after running sudo reboot.
This is what I've tried:
sysctl -w fs.aio-max-nr=1048576
echo…

NorwegianClassic
- 935
- 8
- 26
1
vote
2 answers
why does sysctl show failed to access a file when using Ansbile
I have hit this a few times and never figured it out/ it resolved itself.
Running below playbook gives an error but it does make the change requested. . . .
If I run the same play again it does show the message but that is cause it is not updating…
user19137493
1
vote
1 answer
Is it possible to access mptcp sysctl inside docker?
I would like to access sysctl -n net.mptcp.mptcp_enabled from docker container, but currently I couldn't achieve it. I already tried the below things.
1.
docker run -d --sysctl net.mptcp.mptcp_enabled=1 --name=test -p 3100:3100…

Vencat
- 1,272
- 11
- 36
1
vote
1 answer
I need to disable reverse path filtering in linux to set net.ipv4.conf.default.rp_filter to 0 (net.ipv4.conf.default.rp_filter = 2)
I need to disable reverse path filtering in Linux. I tried like this
root@user:/home/user# sysctl -w net.ipv4.conf.default.rp_filter=0
now I like to know how to make above settings active so reverse path filtering is disabled do I need to restart…

user786
- 3,902
- 4
- 40
- 72
1
vote
1 answer
Which Linux capability to use to properly run "sysctl -w net.ipv4.conf.tun0.route_localnet=1" in a Docker container?
I'm using an OpenVPN server in a Docker container for multiple client connections.
This container is located in a specific Docker network in which I have a web server as client target.
I want to publish the host name of my web server to clients so…

jbaptperez
- 656
- 6
- 20
1
vote
1 answer
How to show hidden sysctl tunable?
I'm on a Yocto Linux distribution and I need to set the sysctl tunable kernel.panic_on_rcu_stall to 1. The problem is when I list the elements inside /proc/sys/kernel I have no panic_on_rcu_stall and if I try to set the option anyway I get the…

Johann
- 11
- 1
- 4
1
vote
1 answer
Whitelisting sysctl parameters for helm chart
I have a helm chart that deploys an app but also needs to reconfigure some sysctl parameters in order to run properly. When I install the helm chart and run kubectl describe pod/pod_name on the pod that was deployed, I get forbidden sysctl:…

Eddie
- 31
- 4
1
vote
1 answer
Why ip_forward_use_pmtu added in the result of sysctl in linux server
So I did an OS version-up in a linux server, and was seeing if any setting has been changed.
And when I typed "sysctl -a | grep "net.ipv4.ip_forward"
The following line was added,
net.ipv4.ip_forward_use_pmtu = 0
I know that this is because this…

rosa
- 71
- 1
- 4
1
vote
1 answer
Burned by address space layout randomization
I'm porting a bunch of unix apps to linux, and one of them has a problem with address space randomization. The app is part of a system of shared apps that save 'state' info to disk. Each transaction for a given user could be performed by either…

littlenoodles
- 435
- 4
- 13
1
vote
0 answers
What is `kern.num_files` in `sysctl`?
I'm trying to find out total number of currently open file descriptors (or any file related objects) on current OS.
My current betting is sysctl(3), and I think kern.num_files does the job. But I'm not actually sure what it means, and I can't find…

eonil
- 83,476
- 81
- 317
- 516
1
vote
0 answers
Powershell can not find sysctl
Running sysctl in powershell gives the following error:
sysctl : The term 'sysctl' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path…

a3dsfcv
- 1,146
- 2
- 20
- 35
1
vote
1 answer
Example of using sysctl() call in C on Linux
I've read some of the warnings against using the sysctl() call in C, and it seems if I cannot use sysctl() safely, the only other way I can find to make the needed change would be to use soemething like:
system("echo …