sysctl

What is a cross platform way of reading sysctl information?

What is a cross platform / portable way of reading sysctl information? I want to know things like max open files, max open files per process, socket buffer sizes, max threads, max threads per process, etc. ...

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, NULL, 0); char* processArgs = malloc(length * sizeof(char)); sysctl(getProcessArgs, 3, proce...

What are the units of UDP buffers, and where are docs for sysctl params?

I'm running x86_64 RedHat 5.3 (kernel 2.6.18) and looking specifically at net.core.rmem_max from sysctl -a in the context of trying to set UDP buffers. The receiver application misses packets sometimes, but I think the buffer is already plenty large, depending upon what it means: What are the units of this setting -- bits, bytes, packet...