The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [sysctl]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
3
votes
1answer
5k views

File descriptor limits in /etc/system vs /etc/sysctl.conf vs /etc/security/limits.conf on Solaris

Let me explain first what I understood. In Solaris 10, rlim_fd_max and rlim_fd_cur in /etc/system set the hard and soft limits at the system level. And /etc/security/limits.conf sets the limits for ...
6
votes
1answer
10k 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, ...
19
votes
3answers
56k views

Finding out the values of kernel options related to sysctl.conf and sysctl.d

On my Ubuntu machine, in /etc/sysctl.conf file, I've got reverse path filtering options commented out by default like this: #net.ipv4.conf.default.rp_filter=1 #net.ipv4.conf.all.rp_filter=1 but in /...
1
vote
0answers
128 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 ...
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 ...
1
vote
1answer
1k 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
4k 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
914 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
275 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 ...
1
vote
0answers
93 views

/etc/sysctl.conf abstraction for custom usage

Is there an abstraction model for configuration files like /etc/sysctl.conf ? I find it great for a few reasons, it's humanly readable, has nestable namespaces, hierachy of settings instead of one-...
19
votes
2answers
23k views

Description of kernel.printk values

Between Debian 5 and 6, the default suggested value for kernel.printk in /etc/sysctl.conf was changed from kernel.printk = 4 4 1 7 to kernel.printk = 3 4 1 3. I understand that the first value ...
1
vote
0answers
558 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
745 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
704 views

UDP buffer overrun and old datagram clearing

I am reading UDP datagrams on a linux server at 700,000 per second from HDL32 LIDAR system. Interface is ipv4. Sockets are set to SOREUSADDR. I turn on the LIDAR, start up socket program, it started ...
5
votes
1answer
4k views

Benchmarking Apache using ab

I was doing some performance testing for Apache using ab. Apache in our case is only working as a load balancer balancing load between two Liferay servers. Initially, I did the testing for 1000 ...
7
votes
2answers
3k 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 ...
0
votes
1answer
415 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, ...
1
vote
1answer
557 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 ...
1
vote
1answer
798 views

Restore part of a package that was accidentally deleted

In the process of trying to fix an issue, I accidentally deleted /sbin/sysctl when I was intending to delete /etc/sysctl.conf. When I run sysctl I get the error that says The program 'sysctl' is ...
1
vote
0answers
295 views

Can you set Linux sysctl values at compile time

I am compiling a custom linux kernel. I want to set some sysctl values at kernel compile time. Defaults I want are different to the defaults kernel sets. Is there a way to do this? Please note I ...
0
votes
1answer
81 views

linux + sysctl.conf configuration

Is it right to comment line with # in the file sysctl.conf? I ask because I am not sure if the comment lines would be read or not. more /etc/sysctl.conf #net.core.rmem_default = 1048576 #net.core....
1
vote
1answer
2k views

sysctl: malformed setting “net.ipv4.ip_local_reserved_ports=”

I'm trying to assign an empty string to a system setting, but it fails: [root@wc8rh7 ~]# sysctl -w net.ipv4.ip_local_reserved_ports="50000" net.ipv4.ip_local_reserved_ports = 50000 [root@wc8rh7 ~]# ...
2
votes
3answers
2k views

net.ipv4.ip_forward reverting to 0 even though set in /etc/sysctl.conf

I set net.ipv4.ip_forward = 1 in /etc/sysctl.conf and ran sysctl -p which caused it to set to 1 as expected in the output of sysctl -a, but sometime between last night and now something set it back to ...
3
votes
1answer
6k views

cannot read key “net.ipv6.conf.all.stable_secret” in sysctl?

I am running kernel version as followings on an Arch Linux computer: [root@router ~ ]$ uname -a Linux router 4.2.5-1-ARCH #1 SMP PREEMPT Tue Oct 27 08:13:28 CET 2015 and I noticed that every time I ...
1
vote
1answer
977 views

flashcache tuning

I installed flashcache version 3.1.1 and created a write-back cache. The performance is good as long as the percentage of dirty blocks is not too high. My application does heavy I/O at the beginning,...
4
votes
1answer
1k views

How to limit port range in Ubuntu 14.04?

I want to limit source port range in my ubuntu machine upto 20000 , that means no Application should be able to use port higher than that.I have this command in mind iptables -A OUTPUT -p tcp --...
2
votes
1answer
2k views

Why am I unable to attach `strace` to a kworker process?

As root, I try to attach strace to a running kworker process, without success. root@rasal# whoami root root@rasal:/# cat /proc/sys/kernel/yama/ptrace_scope 0 ...
1
vote
1answer
172 views

Kill process instead of panic on hung_task

There are sysctl parameters for hung_task* that allow you to emit error messages or panic if a process is in the D state for some amount of time. Is there anyway way to have the kernel kill the ...
2
votes
1answer
247 views

Managing settings from /sys directory in arch

I can manage /proc directory settings with sysctl and config files in /etc/sysctl.d but is there equivalent tool for the /sys directory? I want to change the I/O scheduler to bfq permanently. Should ...
1
vote
1answer
1k views

Permission denied on aio-max-nr file

I would like to edit the file aio-max-nr: root@node:~# echo 65536 > /proc/sys/fs/aio-max-nr -su: /proc/sys/fs/aio-max-nr: Permission denied Knowing that : root@node:~# ls -lrth /proc/sys/fs/aio-...
1
vote
1answer
448 views

/etc/sysctl.conf Fedora {17-20}?

Since Fedora 16 or 17 there no longer file /etc/sysctl.conf. How do I setup net.ipv4.ip_forward = 1?
7
votes
1answer
2k views

Pernicious USB-stick stall problem. Reverting workaround fix?

There's an issue with Ubuntu that hasn't been fixed yet, where the PC freezes or gets really slow whenever it is copying to an USB stick (see Why is my PC freezing while I'm copying a file to a ...
7
votes
1answer
12k views

What is the difference between all and default in kernel setting? [duplicate]

I want to enable reversed path filtering to prevent source ip spoofing on my server. I noticed that I have the following settings at current: net.ipv4.conf.all.rp_filter = 0 net.ipv4.conf.default....
1
vote
1answer
601 views

How to undo kernel settings?

While trying to read some kernel parameters, I think I have mistakenly set some instead: # sysctl --system -r ^net.*tcp * Applying /usr/lib/sysctl.d/00-system.conf ... * Applying /usr/lib/sysctl.d/50-...
1
vote
1answer
419 views

Sysctl parameter change after every reboot

I have found that the value of net.netfilter.nf_conntrack_count variable change every time i reboot the system. Did any one have an explanation for that?
0
votes
1answer
811 views

Get a faster response for a ping

I noticed that the answer to my ping is slower in one debian machine that another. For the first one when i ping to 8.8.8.8: 64 bytes from 8.8.8.8: icmp_req=1 ttl=47 time=29.6 ms For the second ...
0
votes
1answer
260 views

Change network values from sysctl.conf

Can I change the value of those parameters (spoofprotect, syncookies, dynaddr_hack, notimestamps, nobroadcasticmpecho, ip_forward) from sysctl.conf file in systemd?
3
votes
1answer
2k views

Change sysctl parameters for all interfaces

How can i change a parameter for all interfaces in systemd ? For example: sysctl -w "net.ipv4.conf.eth0.rp_filter=0" sysctl -w "net.ipv4.conf.eth1.rp_filter=0" How can change it for all interfaces ...
4
votes
1answer
5k views

What's the right way to set Linux kernel runtime parameters?

What's the prescribed way to set Linux kernel runtime parameters? I've seen sometimes that people will set these in files such as /etc/rc.local. Is this really the right way to do this?
2
votes
1answer
3k views

Error: permission denied on key 'fs.file-nr'

# sysctl -w fs.file-nr=131072 error: permission denied on key 'fs.file-nr' Same issue when I edit /etc/sysctl.conf and try sysctl -p. Any reason why I cannot edit this value? I am on CentOS 6.5
10
votes
2answers
6k views

/proc/sys vs /sys/modules/mod/parameter

I've been wondering for last few days how exactly does it work. We can set kernel runtimes parameters using sysctl or echo boolen 1> /proc/sys/module/exactParameter but in /sys/modules/module/...
10
votes
2answers
8k views

Find out sysctl default values? (without rebooting)

I have modified the value of net.core.rmem_max with sysctl, and now I would like to set it back to its default value. If I reboot, net.core.rmem_max will go back to its default value (because it is ...
4
votes
1answer
16k views

sysctl parameter for correct ARP response

I have a server that has some VMs, but the VMs can't communicate properly with the server because the server has several interfaces, and it responds on the wrong one. Q: We know that there is a ...
2
votes
1answer
1k views

Puppet problem with sysctl

Running CentOS 5.5 with Puppet 0.25.5 I have installed and am using the puppet-sysctl module. However the following error occurs: //linux_tuning/Sysctl::Value[net.core.rmem_default] Sysctl[net.core....