A new package RcppGetconf to read system configuration --- not unlike getconf
from the libc library. Now R can read what system calls sysconf
, pathconf
and confstr
have to say. The package is still pretty green, and now on CRAN in a very first version, corresponding to a very first (and single !) commit.
Right now, the CRAN just has one function getAll()
similar to getconf -a
. A first example shows how it provides all values which can be retried -- currently 320 on my systems.
R> res <- getAll()
R> head(res)
key value type
1 LINK_MAX 65000 path
2 _POSIX_LINK_MAX 65000 path
3 MAX_CANON 255 path
4 _POSIX_MAX_CANON 255 path
5 MAX_INPUT 255 path
6 _POSIX_MAX_INPUT 255 path
R> tail(res)
key value type
315 LEVEL4_CACHE_ASSOC 0 sys
316 LEVEL4_CACHE_LINESIZE 0 sys
317 IPV6 200809 sys
318 RAW_SOCKETS 200809 sys
319 _POSIX_IPV6 200809 sys
320 _POSIX_RAW_SOCKETS 200809 sys
R>
Earlier this evening I added a second function to the GitHub repo which can access indivial values.
But right now, the biggest need is really for someone with some systems skills---and an OS X machine---to look at the code, and maybe the getconf.c
from the C library, in order to make this build OS X. If you can help, please get in touch.
More about the package is at the local RcppGetconf page and the GitHub repo.
This post by Dirk Eddelbuettel originated on his Thinking inside the box blog. Please report excessive re-aggregation in third-party for-profit settings.