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/proc, which is only meant for information about a process, orsysfs, which has strict one-value-per-file rules, debugfs has no rules at all. Developers can put any information they want there.[4]
To compile a Linux kernel with the debugfs facility, theCONFIG_DEBUG_FS option must be set to yes. It is typically mounted at/sys/kernel/debug with a command such as:[5]
mount-tdebugfsnone/sys/kernel/debug
It can be manipulated using several calls from the Cheader filelinux/debugfs.h, which include:
debugfs_create_file – for creating a file in the debug filesystem.
debugfs_create_dir – for creating a directory inside the debug filesystem.
debugfs_create_symlink – for creating a symbolic link inside the debug filesystem.
debugfs_remove – for removing a debugfs entry from the debug filesystem.