Linux Kernel Procfs Guide

Erik (J.A.K.) Mouw

Delft University of Technology
Faculty of Information Technology and Systems

            PO BOX 5031
            2600 GA
            The Netherlands

This documentation is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This documentation is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

For more details see the file COPYING in the source distribution of Linux.

Revision History
Revision 1.0 May 30, 2001
Initial revision posted to linux-kernel
Revision 1.1 June 3, 2001
Revised after comments from linux-kernel

Table of Contents

1. Introduction
2. Managing procfs entries
Creating a regular file
Creating a symlink
Creating a directory
Removing an entry
3. Communicating with userland
Reading data
Writing data
A single call back for many files
4. Tips and tricks
Convenience functions
Mode and ownership
5. Example