Distinguish between configs and logs/debugs/statistics within sysfs (/sys)
0
votes
1
answer
29
views
> sysfs is a feature of the Linux kernel that allows kernel code to
> export information to user processes via an in-memory filesystem. The
> organization of the filesystem directory hierarchy is strict, and
> based the internal organization of kernel data structures. The files
> that are created in the filesystem are (mostly) ASCII files with
> (usually) one value per file
Is there a way in which I can differentiate between modifiable configs and logs/debugs/statistics/infos within the
/sys
filesystem?
Use case is to build a profiling tool which can identify the runtime configurations of a system.
Could it be that read-only files correspond to logs/debugs/statistics/information and read-write files are tunable parameters always?
For example:
/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
is relevant for profiling as it indicates the value of CPU frequency scaling governor and is modifiable. However,
/sys/devices/system/cpu/cpu0/topology/core_cpus
is just the internal kernel map of CPUs within the same core and is unmodifiable.
Asked by Kenzo
(3 rep)
Mar 20, 2025, 11:27 AM
Last activity: Mar 20, 2025, 11:55 AM
Last activity: Mar 20, 2025, 11:55 AM