2026-11-03 21:24 UTC
Is there a better way to get values out of Linux /proc than grep e.g.:
# grep size /proc/spl/kstat/zfs/arcstats
#linux #sysadmin
Replies (1)
-
@smallsees@social.dropbear.xyz 2026-11-04 00:33
@mwl@io.mwl.io Are you asking to use something different to grep, which in that case the answer is plenty of alternatives. Or is it more about the kernel interface? Don't read a file, but use a.. say an ioctl()? The answer to the latter is most stuff is available out of /proc or /sys and not exposed elsewhere by the kernel.