0

I am currently working on making a kernel module that would print certain contents of proc/meminfo (SwapTotal to be specific) into the kernel using printk. Unfortunately all the guides on the net teach you how to open your own procfs file. Is it possible to modify the proc_read of proc/meminfo to view only SwapTotal component? Thanks!

  • Could you please add a bit more context and specific information :)? Which OS/distro, which kernel version, which programming language etc – Morten Jensen Sep 18 '12 at 16:20

1 Answers1

0

This is the file of your interest:

http://lxr.linux.no/linux+v3.5.4/fs/proc/meminfo.c

Serge
  • 6,088
  • 17
  • 27