Questions tagged [sysctl]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
20 views

Is -w option of sysctl really needed when changing kernel parameters?

sysctl has this -w switch. Is it really needed? I tried to do: sysctl vm.max_map_count=262144 And it seems to have worked out.
2
votes
1answer
31 views

How to disable iptables from kernel

I'm famillar with iptables -F and other features of iptables. I need to disable iptables from kernel, of course I prefer to disable from sysctl instead of recompiling the kernel.
62
votes
11answers
117k views

disable transparent hugepages

We are installing SAP HANA in a RAID machine. As part of the installation step, it is mentioned that, To disable the usage of transparent hugepages set the kernel settings at runtime with echo ...
0
votes
1answer
45 views

How do I revert sudo sysctl -w kernel.unprivileged_userns_clone=1?

I did this in order to execute "brave browser" in my new debian installation. sudo sysctl -w kernel.unprivileged_userns_clone=1 I've read this maybe a potential risk for my machine security how do I ...
1
vote
1answer
142 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
44 views

remove specific sysctl.conf setting

on some of my machines i have this block of setting in sysctl.conf(the numbers are different on each machine) : #Size Of RAM (In GB): 23 kernel.shmmni= 2547 kernel.shmmax= 365482458 kernel....
1
vote
2answers
454 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/...
2
votes
1answer
666 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 = ...
1
vote
1answer
1k 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 ...
1
vote
1answer
46 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
35 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
66 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
125 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 ...
0
votes
0answers
402 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....
0
votes
1answer
42 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
124 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/...
3
votes
1answer
721 views

Force local IP traffic to go through LAN WITHOUT ip address changes

I know there's some topics about forcing local IP trafic of a Linux machine to go through the LAN (over the network where a WireShark is captuting trafic) but all solutions implies IP address ...
3
votes
1answer
393 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 ...
2
votes
1answer
175 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 ...
0
votes
1answer
476 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 ...
117
votes
6answers
98k views

Can I configure my Linux system for more aggressive file system caching?

I am neither concerned about RAM usage (as I've got enough) nor about losing data in case of an accidental shut-down (as my power is backed, the system is reliable and the data are not critical). But ...
0
votes
1answer
247 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
339 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
86 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
323 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....
4
votes
1answer
2k 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
457 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" ...
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
2k 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
1answer
118 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 ...
36
votes
2answers
9k views

What is the difference between “all”, “default” and “eth*” in /proc/sys/net/ipv[46]/conf/?

In sysctl, the /proc/sys/net/ipv[46]/conf/ keys have the following subkeys: all, default, and a key for each network interface. For example, on a machine with a single network interface eth0, it will ...
8
votes
1answer
6k 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 ...
5
votes
2answers
6k 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 ...
0
votes
2answers
12k views

View current kernel parameters?

I saw in my syslog kernel.perf_event_max_sample_rate get changed. I was wondering if I could write a quick script to log this variable every few minutes. Currently it is: sysctl -a | grep kernel....
1
vote
0answers
286 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 ...
30
votes
3answers
11k 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 ...
0
votes
2answers
622 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 ...
85
votes
4answers
100k views

How to persistently control maximum system resource consumption on Mac?

Before Mavericks, I could use /etc/launchd.conf file to change maximum system resource consumption, for example: limit maxfiles 16384 unlimited limit maxproc 16384 unlimited It no longer works in ...
2
votes
0answers
77 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 ...
1
vote
1answer
63 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 ...
4
votes
1answer
633 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
0answers
64 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
539 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 ...
15
votes
1answer
12k 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
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
9k 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
55k 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
125 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 ...