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
0
votes
0 answers

Override system boot_id in docker

My application checks /proc/sys/kernel/random/boot_id and invokes some code to find out if this changed since last execution (stuff related to reading monotonic time). I'd like to test this behaviour in docker; however I can't find a way to set…
Radim Vansa
  • 5,686
  • 2
  • 25
  • 40
0
votes
0 answers

Raspberry Pi 4 with mutliple eth interfaces all have another ip

The scenario is that I do have two Raspi 4 bullseye. The first Raspi is connected via the eth0 interface to a switch.The second Raspi is connected to the same switch with the eth0 interface and two USB/ETH interfaces eth1 and eth2. I want that…
contax
  • 11
  • 2
0
votes
1 answer

List all processes with arguments in Swift

I'm trying to convert some piece of code to Swift that will list all running processes. But since it requires calling some C specific APIs I'm a bit struggling. Can someone tell me here what am I doing here incorrectly? print statement at the end is…
Thunder
  • 611
  • 1
  • 8
  • 25
0
votes
0 answers

Why does iOS obtain app thread startup time sometimes exceeds the actual startup time

I get app thread start time via sysctl. Then, when the app starts in the background (such as receiving an incoming call), I calculate the preMain duration of the app. Most of the time, the data is normal (hundreds of milliseconds). But occasionally…
Jayden
  • 51
  • 4
0
votes
1 answer

MacOS `subprocess` raising: FileNotFoundError: /usr/sbin/sysctl

I've suddenly started getting an error on all versions of Python on MacOS reporting the following when using subprocess: FileNotFoundError: [Errno 2] No such file or directory: '/usr/sbin/sysctl -n machdep.cpu.brand_string' However, /usr/sbin/sysctl…
luke
  • 1,005
  • 7
  • 19
0
votes
2 answers

Flutter simply showing 'sysctl -n hw.optional.arm64' returned unexpected output: ''

Not sure which details are relevant so I'll include as many as possible. Had to upgrade flutter today and instead of working when I typed in 'flutter upgrade' into android studios terminal/Iterm2/terminal zsh I was met with the following…
Arkonis
  • 1
  • 1
0
votes
0 answers

cannot stat /proc/sys/net/core/rmem_default: No such file or directory

I am facing issue in finding this path in my google cloud editor Debian kernel. Any help would be appreciated.
0
votes
1 answer

First basic playbook on Ansible is there a better way?

Just getting my head around Ansible. Just trying to see what I am doing wrong or what is a better way to reach my goal. Task : My goal here is to update a file /proc/sys/vm/overcommit_memory. I want to put the value 0 into it. I also want the value…
user19137493
0
votes
1 answer

Use the sysctlbyname function within a Linux Swift Package

i am trying to add linux support to my swift package library for system info, but i don't know how i can access the sysctlbyname function on linux within a Swift package. For all of it's detections the library relies on the sysctlbyname function…
0
votes
1 answer

Set systctl in Kubenetes for pod

Hi I have problem. I want to defind kernel paramenter in pod "net.ipv4.tcp_tw_reuse=1" . I test on vm is very good. But I config in manifest file in not work . please help me. cat test_sysctl4.yml apiVersion: v1 kind: Pod metadata: labels: …
0
votes
0 answers

High CPU load on SYN flood

When being under SYN flood attack, my CPU reach to 100% in no time by the kernel proccess named ksoftirqd, I tried so many mitigations but none solve the problem. This is my sysctl configurations returned by the sysctl -p: net.ipv4.tcp_syncookies =…
iTaMaR
  • 189
  • 2
  • 10
0
votes
0 answers

how decrease UDP backlog to once packet at a time?

Most articles are about how to increase a UDP socket's receive buffer size to handle more packets, but I need a solution to decrease the UDP receive buffer to accept only 1 packet at a time and discard/drop all other packets until that packet is…
abgr
  • 63
  • 9
0
votes
1 answer

changing the sysctl hugepages of a AWS container

I am using the AWS EC2 task defintions to run a docker container on a aws ecs cluster. The issue i am having is that i would like to set the vm.nr_hugepages value to 1280 for the host system. AWS has included to option to add system controls to the…
0
votes
2 answers

Is the sysctl.conf file always structured as /etc/sysctl.conf?

I need to know if all distributions of Linux have sysctl.conf be under /etc/sysctl.conf I was told that Arch Linux does not. Can configurations set under the aforementioned path be overridden by another file in some distros?
0
votes
1 answer

SYN Flooding Attack

I am trying to stop SYN Flooding Attack but when I set net.ipv4.tcp_syncookies = 1 in sysctl.conf I get this error /proc/sys/net/ipv4/tcp_syncookies: No such file or directory