No, it is not a strict subset. It is not even a subset.
Here is a demonstration, on a desktop PC running a major GNU/Linux distribution without any customisations that should affect the result, that there is at least one datum present in sysfs
that is not present in procfs
:
$ grep -ir `cat /sys/block/sda/device/model | cut -f1 -d' '` /sys 2>/dev/null
/sys/devices/pci0000:00/0000:00:1f.2/ata3/host2/target2:0:0/2:0:0:0/model:SanDisk [...]
Binary file /sys/devices/pci0000:00/0000:00:1f.2/ata3/host2/target2:0:0/2:0:0:0/vpd_pg83 matches
$ grep -ir `cat /sys/block/sda/device/model | cut -f1 -d' '` /proc 2>/dev/null
Binary file /proc/26887/task/26887/cmdline matches
Binary file /proc/26887/cmdline matches
This also demonstrates, incidentally, that on that PC at least, the set of all data exposed by procfs
is not a subset of the data exposed by sysfs
.
/sys/power/state
has no equivalent under/proc
. Don't know what the rule is for what stuff goes where. – Tom Hunt May 03 '16 at 18:02/sys/power/state
has no equivalent under/proc
". You're probably right.procfs
is sufficiently arcane to me that I'm not currently confident drawing that sort of conclusion myself. So, it might be pretty clear to you, but not to me. And therefore maybe not so clear to other people at a similar level of understanding to me. Hence the value in posting the question here - the answers might help me and them alike :) – May 03 '16 at 18:10sysfs
exposes a strict subset of the information exposed byprocfs
requires either exhaustive knowledge ofsysfs
& substantial knowledge ofprocfs
(the docs aren't exhaustive), or else knowledge of at least one datum insysfs
definitely not present inprocfs
. Tom Hunt suggested/sys/power/state
as a possible example of the latter. Another (true on my system) is/sys/block/sda/device/model
. I'll expand this info in an answer. – May 03 '16 at 20:01procfs
andsysfs
; mine does. – May 04 '16 at 10:30sysfs
is not a subset ofprocfs
, so even ifsysfs
does keep growing then it will continue to not be a subset ofprocfs
. At least, that's true as long asprocfs
doesn't grow to become a superset ofsysfs
, which currently seems very unlikely. And if that latter unlikely eventuality comes to pass, then hopefully someone will update this question with a new answer to say so. – May 04 '16 at 21:32