LWN.net Logo

Breaking userspace

Breaking userspace

Posted Jan 29, 2013 16:29 UTC (Tue) by cesarb (subscriber, #6266)
In reply to: Breaking userspace by eru
Parent article: Poettering: The Biggest Myths

Copying an old Stack Overflow answer of mine:

The definitive resource for /sys is Documentation/sysfs-rules.txt. The definitive resource for /proc/sys is Documentation/sysctl/. The definitive resource for the rest of /proc appears to be Documentation/filesystems/proc.txt. The rest of the Documentation/ directory in the Linux kernel source has other interesting information. In particular, Documentation/ABI/ mentions the stability of each interface.

(Unfortunately for your use case, I found nothing about /proc/cpuinfo in these files, and I know that the output is very different depending on the architecture, so it is probably not stable. The /sys/devices/system/cpu directory has some of that information, however, including how many cores there are, and should be the same for all architectures, so I would recommend looking there first and using /proc/cpuinfo as a fallback.)


(Log in to post comments)

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds