Manipulating /proc files as structured data
/proc
provides essential data about the operating system on which the program
is running. Often there’s a need as well to alter system’s configuration using
/proc
files as an interface. Now, you may ask yourself, why should you care?
After all, there are already well established solutions like i.e.
procfs or
containerd allowing for convenient
dealing with proc files, cgroups… and I agree. Sometimes though you just
don’t want to suck in a huge dependency like containerd
and it’s much easier
to write something smaller that is better tailored to specifics of the problem
at hand. This is what I’m trying to achieve in this post.