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
1 answer

Identify systemd/sysctl conf files, that are not distribution-native

I have an GCP provided Unix/Linux (RHEL7 and CentOS7 in this case, at the time of writing this SO question) files, for example: /etc/sysctl.d/60-gce-network-security.conf The check can be done by simply grepping/catting/sedding , but it will be…
HX_unbanned
  • 583
  • 1
  • 15
  • 51
0
votes
1 answer

How to override settings in /etc/sysctl.conf CentOS 7?

I was trying to set certain kernel parameters using "/etc/sysctl.conf" file on Cent OS 7.5. I copied "/etc/sysctl.conf" file into "/etc/sysctl.d/sysctl.conf" and updated certain parameters and reloaded settings using "sysctl --system". But I…
user3526905
  • 171
  • 1
  • 12
0
votes
1 answer

What does the number in sysctl configuration file denote?

The sysctl utility allows a Linux admin to query and modify kernel parameters in runtime. For example, to change the swappiness of a linux system to 0 we can: echo 0 > /proc/sys/vm/swappiness Or we can use sysctl sysctl -w vm.swappiness=0 To…
15 Volts
  • 1,946
  • 15
  • 37
0
votes
2 answers

sysctl in a NSAutoreleasePool -> bus errors & segfaults

Thanks in advance to everyone trying to help me. I'm having a big issue here, I've found some example code about sysctl and extended it so I can query the network interfaces for their in/out data. When I run this code directly in main() (without any…
YllierDev
  • 571
  • 4
  • 16
0
votes
1 answer

Go isn't detecting SOMAXCONN changes from aws ubuntu server

I'm trying to stress test my golang net/http server with k6. When I'm using 2048 virtual users to hit my aws ubuntu server, k6 throws "connection reset by peer". Investigating on the internet, I found that probably the backlog queue is the…
Joaco Terniro
  • 115
  • 1
  • 2
  • 13
0
votes
2 answers

Change fs.protectected_hardlinks on Ubuntu docker container

I'm very new to docker but I'm trying to change that setting and the usual ways aren't working. The settings is fs.protected_hardlinks to 1 I've tried changing /etc/sysctl.d files as well as the /etc/sysctl.conf
0
votes
0 answers

clock_settime backward correction

I'm trying to do a couple of tests where I need to set the computer time backward or forward depending on some external values. I know that I can do this using clock_settime() in time.h. I've encountered the problem that when needing to set the…
0
votes
1 answer

ArangoDB:Can I safely increase the vm.max_map_count as per installation recommendation

When I upgrade to 3.3.5 version of ArangoDB, there is the following warning 2018-05-24T10:25:32Z [26942] WARNING {memory} maximum number of memory mappings per process is 65530, which seems too low. it is recommended to set it to at least…
Loredra L
  • 1,485
  • 2
  • 16
  • 32
0
votes
0 answers

undefined reference to `sysctlbyname': Cannot use sysctlbyname in C?

I tried to compile a code using the function 'sysctlbyname' and it flashed a list of errors while compiling /tmp/ccq6bQz6.o: In function `main': haha.c:(.text+0x43): undefined reference to `sysctlbyname' haha.c:(.text+0x7a): undefined reference to…
Padmanava
  • 27
  • 7
0
votes
0 answers

exec-shield kernel parameter cant be enabled in arm platform

i want to enable kernel.exec-shield parameter in an embedded platform at run-time or compile time. i have 32-bit arm architecture in my embedded platform. i list all the kernel parameters with following command. sysctl -a and i get many unrelated…
mehmet riza oz
  • 541
  • 6
  • 18
0
votes
1 answer

MacOS using sysctl() to get HW_MACHINE_ARCH getting "no such file or directory"

I've been using sysctl for a lot of things recently and now I the HW_MACHINE_ARCH variable. I am using the following code. Note that when I try to get the other variable HW_MACHINE this code works perfectly. I have also thought that maybe the…
lelephantt
  • 169
  • 1
  • 1
  • 10
0
votes
1 answer

Is it possible to add flags by default to Docker run

I'd like to know if it's possible to configure the docker engine to always add a custom flag (--sysctl) for all containers? My problem is that I'am a rancher user, and rancher doesn't support the --sysctl flag. I'am looking for a workarround to…
Cabrinha
  • 440
  • 1
  • 3
  • 15
0
votes
1 answer

Getting Virtual Memory Max Map Count in Linux C++

How to get 'sysctl vm.max_map_count', or the '/proc/sys/vm/max_map_count' using C++ I do not want to open the /proc/sys file.. Is there a http://man7.org/linux/man-pages/man2/sysctl.2.html call to get the number ?
Adi
  • 475
  • 5
  • 15
0
votes
0 answers

Python access sysctl variable or alternative

I've network sniffer process which runs indefinitely capturing the live traffic and doing some other analysis as well. I want a variable which can turn on and off this analysis at the run-time which I should be able to change from outside the…
RatDon
  • 3,403
  • 8
  • 43
  • 85
0
votes
1 answer

Get parent process information at runtime on iOS application

I'm trying to obtain some process information at runtime on iOS, particularly the parent process name. While I'm able to obtain the current process name, it seems that I can't to do the same for its parent. Here is what I'm doing: static inline bool…
Andrea
  • 26,120
  • 10
  • 85
  • 131