Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [sysctl]

The tag has no usage guidance.

1
vote
1answer
28 views

Is `vm.swapiness=0` equivalent to `swapoff -a` (in kernel >= 3.5)

Is setting in /etc/sysctl.conf: vm.swappiness=0 equivalent (except that it's persistent) to running swapoff -a, *in Linux kernels >= 3.5? *in earlier kernel versions, 0 meant 'no swapping until out ...
1
vote
1answer
16 views

What's the default value of the admin_reserve_kbytes kernel parameter?

Many of the kernel parameters have default values assigned. But some of them aren't really clear. I'm reading the proc manual and in the case of admin_reserve_kbytes we can read the following: The ...
0
votes
0answers
21 views

Kernel parameter about max threads not being applied

I have manually edited /etc/sysctl.conf and added this line kernel.threads-max=70000 However despite the fact that # cat /etc/sysctl.conf | grep thread kernel.threads-max=70000 what I see is that ...
0
votes
1answer
32 views

oracle 11g installation on ubuntu 16.04 sysctl permission denied?

I am trying to install oracle 11g on ubuntu 16.04 after setting oracle 11g xe kernel parameters successfully # Oracle 11g XE kernel parameters fs.file-max=6815744 net.ipv4.ip_local_port_range=...
0
votes
1answer
54 views

Disabling all devices in /proc/acpi/wakeup permanently

In an effort to weed out an acpi problem, I need to set all the /proc/acpi/wakeup device variables to disabled. For the time being I'm doing it with acpitool and a script in /etc/rc.local ... usr/...
0
votes
1answer
48 views

how to turn off tcp timestamps?

I tried to turn off the tcp timestamp but it didn't work. The step i performed are the following: $ sysctl -w net.ipv4.tcp_timestamps=0 $ sysctl -p $ sysctl net.ipv4.tcp_timestamps (=> to be sure ...
1
vote
0answers
86 views

What's the purpose of use_tempaddr=1 kernel parameter?

Reading sysctl docs, I found the following: use_tempaddr - INTEGER Preference for Privacy Extensions (RFC3041). <= 0 : disable Privacy Extensions == 1 : enable Privacy Extensions, ...
0
votes
1answer
312 views

Enabling rp_filter loose (#2) mode for IPv6

does anyone have a solution to make reverse path filtering work (in loose mode) also for IPv6 and not only for IPv4? The setup I am having is a machine1 connected directly to a machine2, while ...
3
votes
1answer
137 views

Writeback cache (`dirty`) seems to be limited below the expected threshold where throttling starts. What is it being limited by?

In a previous question and answer, I showed an experiment about dirty_ratio. Writeback cache (`dirty`) seems to be limited to even less than dirty_background_ratio. What is it being limited by? How ...
1
vote
0answers
310 views

How do I make my system only use swap when RAM is totally full?

In the past, setting vm.swappiness to 0 meant the system would only swap when RAM was totally full. $ cat /etc/sysctl.d/99-sysctl.conf kernel.sysrq = 1 vm.swappiness=0 $ sysctl vm.swappiness vm....
2
votes
1answer
304 views

Writeback cache (`dirty`) seems to be limited to even less than dirty_background_ratio. What is it being limited by? How is this limit calculated?

I have been testing Linux 4.18.16-200.fc28.x86_64. My system has 7.7G total RAM, according to free -h. I have default values for the vm.dirty* sysctl's. dirty_background_ratio is 10, and ...
0
votes
1answer
162 views

Differences between forwarding and redirect in net.inet.ip

What are the differences between sysctl variables net.inet.ip.forwarding and net.inet.ip.redirect?
4
votes
2answers
247 views

Is sysctl.conf last match?

Where can I find the official documentation that sysctl.conf is last match based? So, there are two entries in the /etc/sysctl.conf file: vm.swappiness=10 vm.swappiness=11 Which will win? The ...
0
votes
1answer
68 views

Can't ping anything when IPV6 is disabled

When I disable IPV6 on my Debian install I can't reach the internet, and whenever I ping anything I get ping: unknown host ... This is how I am currently disabling IPV6 net.ipv6.conf.all....
1
vote
2answers
251 views

sysctl command returning info not asked about

I want to grep a particular kernel setting as follows $ sudo sysctl -a --ignore | grep -i max_map_count 2>/dev/null sysctl: reading key "net.ipv6.conf.all.stable_secret" sysctl: reading key "net....
1
vote
1answer
75 views

do you have to restart services after running sysctl -p?

I'm increasing the watch limit on my RHEL 7 server and I'd like my changes to take effect without having to reboot. I've updated the /etc/sysctl.conf file so that the changes will be permanent. If I ...
1
vote
1answer
905 views

Disable core file generation in RHEL7

I'm currently running RHEL7. I haven't been able to find a definitive explanation of how to disable core dump files. I can limit to number of core files that are produced, but I don't know how to ...
2
votes
1answer
516 views

editing sysctl.conf on oracle linux 7.5

I am going to install oracle database 12c on oracle linux 7.5. In the process, I have to edit following kernel parameters and set values. fs.aio-max-nr = 1048576 fs.file-max = 6815744 kernel.shmall = ...
7
votes
1answer
4k views

How to set and understand fs.notify.max_user_watches

I don't understand the best way to set fs.inotify.max_user_watches with sysctl. In fact, I don't understand much of what is happening here other than the fact that I need to set the number of files ...
0
votes
0answers
67 views

Log sysctl changes to a particular variable

Is there any way I can log (preferably only a particular variable, vm.swappiness) because I want to find when and what changes vm.swappiness value to 1 during boot even though I have configured it to ...
1
vote
1answer
1k views

lsmod gives error: “could not get list of modules” on Debian running on WSL

When I run lsmod or sudo lsmod, I get an error that says: libkmod: ERROR ../libkmod/libkmod-module.c:1655 kmod_module_new_from_loaded: could not open /proc/modules: No such file or directory Error: ...
1
vote
0answers
252 views

Can't change kernel.printk value

I want to set kernel.printk value to 5 4 1 1 for disable logging on booting but when I try sysctl -w kernel.printk="5 4 1 1" I get error: sysctl: setting key "kernel.printk": Invalid argument ...
0
votes
2answers
540 views

Open file handles

As I spawn several processes in a loop, I hit the maximum number of open files handles and the for loop breaks. When I count the open file handles using lsof I get: $ lsof | wc -l 1464377 However ...
30
votes
3answers
10k views

What is the difference between ping localhost and ping 127.0.0.1?

After executing the following to disable ping replies: # sysctl net.ipv4.icmp_echo_ignore_all=1 # sysctl -p I obtain different results from pinging localhost vs. 127.0.0.1 # ping -c 3 localhost ...
1
vote
0answers
65 views

Using a large number of nullfs mounts to create a virtual FS on FreeBSD - what are the practical limits + impacts?

I have a situation where I'm possibly going to create a virtual file system on FreeBSD, comprised entirely of nullfs mounts of selected "ordinary" dirs within my various ZFS datasets (and their ...
3
votes
2answers
2k views

Fedora /etc/sysctl.conf not loaded upon boot

I am running Fedora 27 with kernel 4.14.5 and have a problem that /etc/sysctl.conf is not being loaded upon boot. If I run: sudo sysctl -p after boot, my settings are loaded and everything works ...
4
votes
1answer
518 views

Difference between modprobe and sysctl -w in terms of setting system parameters?

We know that sysctl command can change kernel parameters with : # sysctl -w kernel.domainname="example.com" or by directly editing the file in /proc/sys directory. And for persistent changes, the ...
1
vote
1answer
58 views

Less than 1000 possible connections although I updated sysctl

I ran c1000k on my CentOS 7.2 machine and it told me connections: 921 error: Too many open files Because of this I changed my /etc/sysctl.conf to contain this: fs.file-max = 2097152 But even ...
1
vote
0answers
57 views

write error for rmem_max on Angstrom

I am trying to tune the UDP receive and transmit buffer size. According to my real time application needs, I need to configure the Tx buffer as 6 bytes and Rx buffer as 22 bytes. I am running Angstrom ...
3
votes
0answers
2k views

Why is my `net.ipv4.ip_forward = 1`?

I just discovered accidentally that cat /proc/sys/net/ipv4/ip_forward returns 1. I can't remember having enabled net.ipv4.ip_forward anytime ago, but since my system runs for several years now, I can'...
1
vote
1answer
465 views

Can I restrict dmesg to a group?

I understand that, for security reasons (like address randomization), it makes some sense to not let every user be able to read the kernel's dmesg. Linux allows one to restrict dmesg to the root user ...
12
votes
1answer
10k views

dmesg: read kernel buffer failed: Permission denied

Since recently Debian has changed the default behavior for dmesg and I cannot use it simply from my local user. % dmesg dmesg: read kernel buffer failed: Operation not permitted Same goes for: % ...
3
votes
1answer
1k views

Does changing sysctl require a process restart?

I'm on a redhat machine. I'm changing the value of max_map_count via sysctl: # sysctl vm.max_map_count vm.max_map_count = 65530 # sysctl -w vm.max_map_count=655300 vm.max_map_count = 655300 # sysctl ...
1
vote
0answers
109 views

sysctl IPv6 funtional defaults

ip-sysctl.txt: accept_ra_defrtr - BOOLEAN Learn default router in Router Advertisement. Functional default: enabled if accept_ra is enabled. disabled if ...
1
vote
0answers
402 views

linux sysctl tunable knob kernel.yama.ptrace_scope

The reference lists as values 0,1,2,3. Today I tried it on two servers : kernel 3.0.0 sysctl -w kernel.yama.ptrace_scope=3 error: "Invalid argument" setting key "kernel.yama.ptrace_scope" ...
6
votes
1answer
2k views

What's the difference between setting open file limits in /etc/sysctl.conf vs /etc/security/limits.conf?

I've read two separate ways of increasing the allowed open file count (I'm attempting to modify for root, if it matters). One way is to update the settings in /etc/security/limits.conf with something ...
3
votes
2answers
2k views

From where does sysctl -a print all kernel parameters?

We have a Linux machine (Redhat 6) When we print all parameters from /etc/sysctl.conf we see only ~20 but when we perform sysctl -a we see more than 200. So from where sysctl -a print all these ...
1
vote
1answer
836 views

Default kernel parameters on new network namespaces

What are the default kernel parameters, when creating a new network namespace? Is there a way to override them upon creation? I think they are inherited by the parent process. An example using ...
0
votes
1answer
1k views

ulimit value not changing for a process

We have a ruby application that started throwing lot of "unable to create new socket: Too many open files" errors recently I have updated "etc/security/limits.conf" as below root soft nofile ...
1
vote
1answer
3k views

Kernel module for net.bridge.bridge-nf-call-iptables

This is on the Linux OS. I see that on some machines the net.bridge.bridge-nf-call-iptables variable doesn't exist until I modprobe the br_netfilter filter. I also see that there are some machines ...
3
votes
0answers
765 views

Gratuitous ARP packet gets not send out even if “arp_notify” in sysctl is set to 1 on OpenWRT

I am running a router on OpenWRT 15.05.1 and I did notice, that it does not send out Gratuitous ARP packets on a change of the IP address, nor on a reboot, nor on change of the Ethernet link state. ...
2
votes
0answers
221 views

Is there an alternative for net.ipv6.ip_nonlocal_bind on FreeBSD?

On Linux (Kernel >= 4.3) I can "claim" an entire IPv6 subnet by routing it to localhost (sf#403648), and then by setting net.ipv6.ip_nonlocal_bind=1 so that I can bind on any of these addresses. I ...
5
votes
2answers
5k views

Why is editing core_pattern restricted?

This question is associated with Where is core file with abrt-hook-cpp installed? . While I was trying to generate a core file for an intentionally-crashing program, at first core file generation ...
1
vote
0answers
479 views

change TCP_TIMEWAIT_LEN at runtime

Linux kernel defines a timeout to destroy TIME-WAIT state of a connection in include/net/tcp.h: #define TCP_TIMEWAIT_LEN (60*HZ) Is there a way to change this parameter at runtime, via sysctl or /...
1
vote
0answers
722 views

Linux + kernel tuning parameters

I configured the following parametersbut after restart the values return to the previews values. How to configure them as permanent? echo 500 > /proc/sys/vm/dirty_expire_centisecs echo 3 > /...
1
vote
0answers
370 views

How can I configure system not respond to ICMPv6 echo requests sent to a broadcast address

I am attempting it by using echo command and it gives me the below error +++++++++++++ t040ml000002:/proc/sys/net/ipv4 # echo “1” > /proc/sys/net/ipv6/icmp_echo_ignore_all -bash: /proc/sys/net/...
7
votes
2answers
2k views

How to limit range of random port sockets?

There's a binary that I need to run which uses bind with a port argument of zero, to get a random free port from the system. Is there a way I can constrain the range of ports the kernel is allowed to ...
6
votes
1answer
7k views

How to enable user_namespaces in the kernel? (For unprivileged `unshare`.)

My Linux kernel must have been configured with user_namespaces when built, but their use is restricted after boot and has to be explicitly enabled. Which sysctl should I use? (If this was turned on, ...
1
vote
1answer
518 views

Why remount of /proc/sys is not global or does not persist in network namespace inside LXC

I have host running RHEL-7.2. Inside that running LXC. Inside LXC creating network namespaces. Inside the namespace changing sysctl variables was failing (as root): $ ip netns add testns $ ip netns ...
0
votes
1answer
365 views

Where is the __sysctl function defined in FreeBSD?

I am reading the source code to understand sysctl in FreeBSD. It looks like the most important function int __sysctl(const int *name, u_int namelen, void *oldp, size_t *oldlenp, const void *newp, ...