Questions tagged [sysctl]

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.

174 questions
1
vote
1 answer

"Not a directory" when writing kernel configurations

I am trying to toggle IPv6 on Linux systems using this function in Qt. The problem is that it fails opening the file and simply reports "Not a directory". bool toggle_ipv6(const bool &enabled) { const std::vector
Chase
  • 95
  • 11
1
vote
1 answer

How to set default HopLimit value for multicast in armLinux?

I'm trying to send packets via socket to multicast address. hopLimit by default == 1. I need hopLimit == 255 by default. I can change hopLimit for all packets that was sent through this socket using IPV6_MULTICAST_HOPS setsockopt. But I need…
YP_
  • 13
  • 4
1
vote
1 answer

How to map block numbers to file names from the dmesg output resultant from vm.block_dump=1, if device is ext4?

tl;dr: I want to see/get the filenames that the reported block numbers on dmesg are part of, when vm.block_dump=1 example dmesg: bash(13515): READ block 5434824 on xvda3 (32 sectors) When eg. sudo sysctl -w vm.block_dump=1 or eg. echo '1' | sudo…
user10239615
1
vote
0 answers

Freebsd 11.1 - I added own sysctl - but it's not listed by sysctl -a command, when invoked manualy no value is shown and I cannot change it's value

Codebase is FreeBSD11.1 Code: **** * Attempt on implementing own sycstl ****/ #include #include #include #include #include` #include int thats_my_stat_var=1; /*it…
KonFoozed
  • 11
  • 2
1
vote
2 answers

Kubernetes Kops - set sysctl flag on kubelet

We need to enable some sysctl parameters in kubernetes. This should be achievable with the below annotation in the Deployment. annotations: security.alpha.kubernetes.io/unsafe-sysctls: net.ipv4.ip_local_port_range="10240 65535" When doing so the…
the_frank
  • 105
  • 3
  • 12
1
vote
2 answers

Modify sysctl parameters inside docker container

I am running a 3 node swarm cluster and trying to launch services with docker stack deploy Below is my compose file services: nginx: image: nginx:latest networks: - til-prod-network volumes: - type: bind source:…
1
vote
0 answers

TCP: Setting retransmits to zero

I am using a linux machine. I want to set the number of TCP retransmits to zero. I am using below command to modify: sudo sysctl -w net.ipv4.tcp_syn_retries=0 The above command dont work and gives me below error: error: "Invalid argument"…
ojas
  • 2,150
  • 5
  • 22
  • 37
1
vote
2 answers

What does docker run on an existing docker container do?

I am trying to change the value of somaxconn in a running docker container. I am using this command: docker run --net=container:redis --sysctl net.core.somaxconn=65535 bash I have checked that this command changes the value of somaxconn from 128 to…
1
vote
0 answers

Ephymeral ports range and tw buckets

Should value of net.ipv4.tcp_max_tw_buckets be lower than the range set with net.ipv4.ip_local_port_range? And if no, why they doesn't conflicts? Thanks
reisub83
  • 429
  • 3
  • 10
1
vote
1 answer

host_statistics64 become blocking under iOS 11

I used the code in Watching memory usage in iOS to get free memoty for years. But something went wrong since iOS 11 was born. The host_statistics64 will be blocked for 0 to 3 seconds if it is called from two threads simultaneously. It won't be…
Dar Hoo
  • 21
  • 2
1
vote
1 answer

Why no error when setting socket send/receive buffer size higher than sysctl max?

Why no error when setting socket send/receive buffer size higher than sysctl max (as I have demonstrated below)? is no error the "expected behavior"? My sysctl values for socket rmem_max and wmem_max are both set to 212992: net.core.rmem_default =…
Trevor Boyd Smith
  • 18,164
  • 32
  • 127
  • 177
1
vote
2 answers

How to increase the open files user limit in boxfuse?

I'm receiving a "TooManyOpenFiles" exception. I already added a custom src/main/resources/sysctl.conf: fs.file-max = 64000 But UnixOperatingSystemMXBean#getMaxFileDescriptorCount() returns still 4096 I guess I'd also have to set the user limit - is…
Jan
  • 2,803
  • 6
  • 36
  • 57
1
vote
1 answer

Cygwin error that sysctl cannot be found in directory /usr/local/bin

Running tuning-primer.sh on Cygwin results in the error: sysctl not in directory /usr/local/bin or Error: Needed command "sysctl" not found in PATH! I have added sysctl code that I found on this url and created files sysctl.c, sysctl.h using…
TEHSEEN
  • 11
  • 6
1
vote
0 answers

/etc/sysctl.conf shmall shmmax calculation Oracle DB

I have a question about what COULD be the possible impact to a system, if we have the following kernel shmmax and shmall kernel settings: # Controls the maximum shared segment size, in bytes kernel.shmmax = 135456844800 # Controls the maximum number…
Delgado
  • 21
  • 3
1
vote
1 answer

Linux: programmatically get system shutdown time?

I am getting Linux uptime from file /proc/uptime. From where to get last shutdown time of machine. how to read it from wtmp file in "c". I don't want parse output of last -x command. can i get using sysctl?
Ravi Bhushan
  • 253
  • 3
  • 17