Debugfs Explained

debugfs is a special file system available in the Linux kernel since version 2.6.10-rc3.[1] It was written by Greg Kroah-Hartman.[2]

debugfs is a simple-to-use RAM-based file system specially designed for debugging purposes. It exists as a simple way for kernel developers to make information available to user space.[3] Unlike, which is only meant for information about a process, or sysfs, which has strict one-value-per-file rules, debugfs has no rules at all. Developers can put any information they want there.[4]

Use

To compile a Linux kernel with the debugfs facility, the option must be set to yes. It is typically mounted at with a command such as:[5]

mount -t debugfs none /sys/kernel/debug

It can be manipulated using several calls from the C header file, which include:

External links

Notes and References

  1. http://kerneltrap.org/node/4394 Linux: DebugFS
  2. Web site: Debugfs . 2004-12-13 . LWN.net.
  3. http://www.mjmwired.net/kernel/Documentation/filesystems/debugfs.txt Linux Kernel Documentation :: filesystems : debugfs.txt
  4. https://lwn.net/Articles/334546/ An updated guide to debugfs
  5. https://web.archive.org/web/20160105144119/http://people.ee.ethz.ch/~arkeller/linux/kernel_user_space_howto.html#ss2.5 2.5 Debugfs