Questions tagged [sysctl]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
9 views

How high can I tune my network stack buffer size to increase network performance due to long distance server latency?

I followed this guide: https://www.cyberciti.biz/faq/linux-tcp-tuning/ I added the following values into my /etc/sysctl.conf file: net.core.wmem_max=12582912 net.core.rmem_max=12582912 net....
0
votes
0answers
47 views

Reboot frozen system

Due to some reason, my machine is not responding and remains in frozen state. I am unable to ping it I am unable to use keyboard/mouse No script runs as per scheduled in cron Only way to use the ...
4
votes
2answers
854 views

Linux Kernel.org misleading about kernel panic

I always have /proc/sys/kernel/panic set up to 0. Looking at description of this option in kernel.org we can see: panic: The value in this file represents the number of seconds the kernel ...
1
vote
0answers
73 views

How to set sysctl using kernel command line parameter?

Is it possible to set Linux kernel sysctl settings (those usually set in /etc/sysctl.d) using kernel command line (those visible in /proc/cmdline)? (Using grub config file /etc/default/grub variable ...
0
votes
0answers
19 views

limits.conf nproc not being applied

this is our limits.conf * soft nofile 999999 * hard nofile 999999 * soft noproc 256000 * hard noproc 256000 and then we check for the changes after a reboot, ...
5
votes
2answers
148 views

Customize sysctl parameters by user

I know there's *.conf file in /usr/lib/sysctl.d and/or /etc/sysctl.d folders ready to establish kernel parameters on boot. But they are general; what I want is to customize some of these parameters (...
1
vote
1answer
79 views

Why does UFW use a different sysctl.conf file?

There are a lot of network-related settings in /etc/sysctl.conf and a number of files in /etc/sysctl.d/. My data centre operator who has preconfigured the Ubuntu OS to work best in their environment ...
0
votes
0answers
30 views

sysctl changes persist after removing conf file and reboot

I have a package which installs a sysctl config file to /etc/sysctl.d in order to "tune" some default settings. For example, some are sys.ipv4.tcp_congestion_control = agilesd sys.ipv4....
0
votes
1answer
22 views

sysctl -a doesn't include log_buf_len

I hope to check the value of log_buf_len via sysctl, but sysctl -a doesn't show it, why and is there any other way to check its value
0
votes
0answers
30 views

lsof show number of open files that are more then what configured [duplicate]

we verify the file max as [root@linux02 ~]# cat /proc/sys/fs/file-max 500000 but when we run lsof we get [root@linux02 ~]# lsof | wc -l lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/...
0
votes
0answers
43 views

cant counting all open files by lsof + lsof is hung

we are tying to count all open files by lsof lsof | wc -l lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/42/gvfs Output information may be incomplete. but sill after 1 hour ...
2
votes
1answer
226 views

How to use sysctl on UNIX variants, e.g. macOS, to read information normally found in /proc/self on Linux?

I've been using /proc/self for a long time to read process-related information like /proc/self/maps etc. However, on some UNIX variants, like macOS, the procfs filesystem is not implemented; but as ...
0
votes
1answer
25 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
151 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.
0
votes
1answer
185 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 ...
0
votes
1answer
179 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
1answer
107 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
99 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
170 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
73 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
279 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
497 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
1answer
278 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
967 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 ...
2
votes
1answer
277 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
640 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....
3
votes
1answer
643 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
399 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
709 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
101 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
417 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
234 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 ...
2
votes
2answers
2k 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
984 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 = ...
13
votes
1answer
12k 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 ...
3
votes
2answers
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
0answers
373 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
822 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 ...
31
votes
3answers
12k 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 ...
2
votes
0answers
90 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
3k 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 ...
5
votes
1answer
784 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
101 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
84 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
679 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 ...
17
votes
1answer
17k 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: % ...
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
136 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
578 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" ...