Simple system stats.

Andre Schmidt andre at osku.de
Sat Nov 2 09:05:19 EDT 2019


On Sat, 2 Nov 2019 13:07:00 +0100
Greg KH <greg at kroah.com> wrote:

> On Sat, Nov 02, 2019 at 12:51:05PM +0100, Andre Schmidt wrote:
> > Hello kernel space,
> > 
> > user space webmonkey here, tinkering on my home desktop setup and spelunking way too many rabbit holes... damn you source code! ;P
> > 
> > The other day i got frustrated with re-implementing parsing and calculation of /proc/stat and /proc/meminfo for my visual user interface experiments (in various languages), so i "created"* a kernel module that helps me with that (https://github.com/oskude/proc_topstat).
> > 
> > But i could not get swap info in the kernel module, cause - i guess - it's not exported?
> > So i wonder, would/could upstream EXPORT_SYMBOL(si_swapinfo)?
> > If yes/maybe, where/how should i propose such change?
>
> Symbols and functions are only exported if an in-kernel-tree module
> needs it.  Sorry.
>
> What's wrong with parsing the existing exports of this value as-is?

do you mean i can get swap usage info in a kernel module without si_swapinfo?
(as seen here https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/fs/proc/meminfo.c#n44)

or do you mean what is wrong with /proc/meminfo?

Cheers
Andre Schmidt



More information about the Kernelnewbies mailing list