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.
Questions tagged [sysctl]
174 questions
2
votes
1 answer
modify kernel parameters in linux without using sysctl
I have an embedded system. An old linux OS runs on it. When i enter "uname -r" command i get the version information as "3.3.8-3.4".
I want to modify some of network kernel parameters (increase tcp receive buffer size etc.) in /proc/sys. But sysctl…

mehmet riza oz
- 541
- 6
- 18
2
votes
1 answer
sysctl doesn't creates file in proc
To communicate in kernel mode and user space, I am using this C program. I am using following Makefile to create .ko file to load.
bj-m := sysctl_test.o
KDIR := /lib/modules/$(shell uname -r)/build
PWD := $(shell pwd)
default:
…

Nitinkumar Ambekar
- 969
- 20
- 39
2
votes
0 answers
Is it possible to set a process's command name (p_comm)?
iTerm2 on OS X sets the tab title based on the active process's command name, as given by kp.kp_proc.p_comm from the kinfo_proc structure (see…

asmeurer
- 86,894
- 26
- 169
- 240
2
votes
1 answer
Android Edit Sysctl Settings
In my app i need to edit sysctl settings in Android. I've seen few apps that can do this, for example but i have no idea how do they do this programmatically, any ideas how to do this?

HellCat2405
- 752
- 7
- 16
2
votes
1 answer
Does Apple allow the usage of sysctl.h within iOS applications?
Does Apple allow the usage of sysctl.h within iOS applications?
PS: App Scanner, a third party tool that checks code for possible private-API usage seems to think it's okay.
Note:
There is one more question like this : How can I know if I'm using…

boopathi
- 137
- 2
- 9
2
votes
1 answer
Inconsistent runtime kernel parameters in DOCKER container and on host
my host is on Ubuntu 14.04.2 LTS and I'm using the latest centos base image in order to create a DOCKER image of IBM InfoSphere BigInsights in order to push it to the Bluemix Container Cloud.
I've solved nearly everything but I'm stuck with setting…

Romeo Kienzler
- 3,373
- 3
- 36
- 58
2
votes
1 answer
Temporarily disable AES-NI hw.optional.aes setting via sysctl
For testing reasons I would like to temporarily disable the hw.optional.aes setting on my OS X MacBook (10.10).
Since I couldn't change the value directly via "sysctl -w hw.optional.aes=0" I tried to create a sysctl.conf in /etc/ and wrote the line…

user1683766
- 189
- 1
- 11
2
votes
2 answers
Performance Issue on Nginx Static File Serving 10Gbps Server
I'm using Nginx to Serve Static Files on Dedicated Servers.
The server has no website, it is only a File Download Server. File sizes range from MB to GBs.
Previously I had 8 Dedicated Servers with 500 Mbps at unmetered.com. Each of them was…

Umar Hayat
- 111
- 1
- 10
2
votes
1 answer
Why is sysctl producing E_INVAL on Mac OS X?
Below is a pared-down (error/null checks omitted) snippet of C/Obj-C code that uses sysctl to get the argv of a particular process with PID 50.
...
int getProcessArgs[3] = { CTL_KERN, KERN_PROCARGS, 50 };
sysctl(getProcessArgs, 3, NULL, &length,…

DNS
- 37,249
- 18
- 95
- 132
2
votes
1 answer
Detect app (process) state is currently running on iOS using sysctl
Is it possible at runtime to detect the state of the running processes (apps) in iOS? I would like to know if the currently running apps are running in background or foreground? Is that even possible. I've been trying for a week now to find a…

James Laurenstin
- 506
- 1
- 6
- 13
2
votes
4 answers
Using sysctl(3) to write safe, portable code: good idea?
When writing safe code in straight C, I'm sick and tired of coming up with arbitrary
numbers to represent limitations -- specifically, the maximum amount of
memory to allocate for a single line of text. I know I can always say
stuff like
#define…

christiank
- 21
- 1
2
votes
1 answer
Handling process information from a KEXT
Inside a KEXT, I need to do some processing where I would get either a proc_t or just a pid.
If I go the pid route, I would do a sysctl() of sorts.
Unfortunately, I can't do either. proc_t is undefined and sysctl() isn't either. sysctlbyname() can…

E.T
- 1,095
- 1
- 10
- 19
2
votes
1 answer
setting tcp delayed ack using sysctl programmatically
I am trying to change the delayed_ack value to 0 from 3(default) in OS X. I can change the send space programmatically, but not the delayed_ack. Thoughts ? thanks.
int sendspace,retval,new_sendspace,len;
len = sizeof(sendspace);
new_sendspace =…

cocoacoder
- 381
- 8
- 19
2
votes
0 answers
Detect other running iOS app using systcl
I use sysctl () function to get the process list, but is there a way to detect currently running app? My app is location based app and it runs in the background. I want to detect which app is running in foreground at certain time intervals. Is this…

Rukshan
- 7,902
- 6
- 43
- 61
2
votes
1 answer
Linux and KERN_PROC
I'm attempting to get the information of another process via the sysctl interface
int mib[4] = {0};
size_t len = sizeof( mib ) / sizeof( int );
struct kinfo_proc kp;
mib[0] = CTL_KERN;
mib[1] = KERN_PROC;
mib[2] = KERN_PROC_PID;
…

Ben Crowhurst
- 8,204
- 6
- 48
- 78