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

OS X getting remote process input args sometimes fails

i would like to retrieve remote process input arguments programmatically, so i used sysctl in the following manner (partial code) : int mib[3] mib = {CTL_KERN, KERN_ARGMAX,0,0} size = sizeof(argmax); if (sysctl(mib, 2, &argmax, &size, NULL, 0)…
Zohar81
  • 4,554
  • 5
  • 29
  • 82
1
vote
1 answer

Performance tuning via sysctl, what is the difference between setting net.core.rmem_default (r/w) / net.ipv4.tcp_mem / net.ipv4.udp_mem

What is the difference between setting read/write mem default via net/core and setting the protocol min/max/default net/ipv4 in sysctl? Detailed explanation or resource request net.core.wmem_default net.core.rmem_default net.ipv4.tcp_mem …
jc_
  • 53
  • 1
  • 6
1
vote
3 answers

How to avoid Undertow Connection RESET in apache benchmark test?

Using apache benchmarking 100K request 20K concurrent users: $ ab -n 100000 -c 20000 http://localhost:8080/mrs/ping Completed 10000 requests Completed 20000 requests Completed 30000 requests Completed 40000 requests Completed…
Matthew Ong
  • 104
  • 8
1
vote
2 answers

Linux Command to set TCP window size

I want to send TCP packet with window size 65535 (0xffff). I m looking to set the TCP window size to 65535 on my linux system. I know that there is the sysctl command but I could not find how tochange the tcp window. How I can do that on my linux…
MOHAMED
  • 41,599
  • 58
  • 163
  • 268
1
vote
4 answers

Enable Packet Forwarding

I am using Fedora 20 after running this command: "sysctl -w net.inet.ip.forwarding=1" it is giving this error: "sysctl: cannot stat /proc/sys/net/inet/ip/forwarding: No such file or directory"
techboyz
  • 11
  • 1
  • 5
1
vote
0 answers

Why sysctl disables ipv6 for new created interface?

I'm creating interface with IPv6 address using this answer: https://stackoverflow.com/a/8338398/2317204 On ubuntu (x86_64) everything works fine, however on angstrom linux I see the failure of ioctl setting SIOCSIFADDR flag. So, I can create…
shahan
  • 79
  • 7
1
vote
1 answer

array of CPUSTATES uint64_ts (user, nice, sys, intr, idle) in ubuntu

I required a command in ubuntu to get cpustats, like array of CPUSTATES uint64_ts(user, nice, sys, intr, idle), in FreeBSD when i give command "sysctl -a | grep kern.cp_time" I am able to get the information in FREEBSD command given above.. what…
1
vote
1 answer

Docker 0.9 - /etc/sysctl.conf not working

I set net.core.somaxconn = 65535 in /etc/sysctl.conf inside an Ubuntu image. But the net.core.somaxconn turns to 128 in the container using command sysctl -a | grep net.core.somaxconn. After I execute sysctl -p, it turns to 65535. Why doesn't…
Tallmad
  • 1,951
  • 4
  • 22
  • 29
1
vote
1 answer

errno: 38 (Function not implemented) on a call to change sysctl value

I want to set some local sysctl parameters with my program and I followed the directions given here: http://www.linux.it/~rubini/docs/sysctl/ As an example, here's what I'm doing to set the value for /proc/sys/net/ipv6/conf/tun0/accept_ra. I just…
SuPra
  • 8,488
  • 4
  • 37
  • 30
1
vote
2 answers

How to find the value of kernel.shmmax from C code

I want to get the value of kernel.shmmax in C code (which I query on centos5.0, centos6.0 and ubuntu10.04 using the shell command "$ sysctl -q kernel.shmmax"). I used the following code to find it: #include const int…
mukul
  • 121
  • 1
  • 11
1
vote
1 answer

Check what device are You running and execute action

I've written this script: #!/bin/sh DEVICE=`sysctl hw.machine` if [ $DEVICE = "hw.machine: iPhone3,1" ] then echo "Test Done" else echo "Test failed" fi After I run it I've got a message: ./test: line 5: [: too many arguments why isn't it…
Andrzej Florek
  • 335
  • 1
  • 3
  • 8
1
vote
2 answers

freebsd shpgperproc what is responsible for?

i've googled a lot about what is "page share factor per proc" responsible for and found nothing. It's just interesting for me, i have no current problem with it for now, just curious (wnat to know more). In sysctl it is: vm.pmap.shpgperproc Thanks…
milo
  • 1,220
  • 3
  • 17
  • 33
0
votes
0 answers

sysctl hook in ios 15 leads to no mobile network connection

Hi i am hooking sysctl on ios 15, i have problem after hooking, imei code disappears, sim and mobile network service lose connection, can anyone help me! Here is code Objective C++ and Logos: int (* original_sysctl)(const int *name, u_int namelen,…
dinhthiet
  • 1
  • 1
0
votes
0 answers

Modifying tcp_options and tcp_options_seq

I was trying to modify tcp options parameters using sysctl, but nothing seems to work. for example: mac machine has following tcp_options seq: mss,nop,ws,nop,nop,ts,sok,eol,eol windows has: mss,nop,ws,nop,nop,sok linux has: mss,sok,ts,nop,ws how can…
0
votes
0 answers

Martian source and sysctl

Okay, so I have one machine with this config: net.ipv4.conf.all.log_martians = 0 net.ipv4.conf.default.log_martians = 0 And, after a sysctl -p, it stopped flooding the /var/log/messages (as it should). But I have this other machine, with an sdiff…
Alan Mackey
  • 105
  • 5