Debugfs

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 /proc, 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 CONFIG_DEBUG_FS option must be set to yes. It is typically mounted at /sys/kernel/debug 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 linux/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.

## References

1. ↑ Linux: DebugFS , by Jeremy, December 11, 2004, KernelTrap. (Announcement of debugfs by Greg KH.)
2. ↑ "Debugfs". LWN.net. 2004-12-13. https://lwn.net/Articles/115405/.
3. ↑ Linux Kernel Documentation :: filesystems : debugfs.txt documentation from the source code (Based on kernel version 2.6.35.4. Page generated on 2010-09-02 21:39 EST.)
4. ↑ An updated guide to debugfs, By Jonathan Corbet, May 25, 2009, LWN
5. ↑ 2.5 Debugfs A guide to using debugfs, Ariane Keller, Version 0.8, July 2008, Kernel Space - User Space Interfaces

## External links

* An updated guide to debugfs at LWN

* v
* t
* e

Linux

Linux kernel|

* History
* Kernel
* Linus's law
* Linux-libre
* Linux startup process
* Linux kernel oops
* Tux
* more…

Controversies|

* Criticism of Linux
* Criticism of desktop Linux
* GNU/Linux naming controversy
* Tanenbaum–Torvalds debate
* SCO and Linux

Distributions|

* General comparison
* Distributions list
* Netbook-specific comparison
* Distributions that run from RAM
* Lightweight
* Security-focused operating system
* Proprietary software for Linux
* Package manager
* Package format
* List of software package managers

Organizations|

* LinuxChix
* Linux Counter
* Linux Documentation Project
* Linux Foundation
* Linux Mark Institute
* Linux User Group (LUG)

Adoption|

* Adopters
* Desktop
* Embedded
* Gaming
* Mobile
* Range of use

Media|

* DistroWatch
* Free Software Magazine
* Full Circle
* Linux.com
* Linux Format
* Linux Gazette
* Linux Journal
* Linux Magazine
* LinuxUser
* Ubuntu User
* Linux Outlaws
* Linux Voice
* LugRadio
* LWN.net
* Open Source For You
* Phoronix
* Revolution OS
* The Code

* Linux
* Linux kernel features
* Portal
* WikiProject

* v
* t
* e

Linux kernel

Organization|

| Kernel|

* Linux Foundation
* Linux Mark Institute
* Linus's law
* Tanenbaum–Torvalds debate
* Tux
* SCO disputes
* Linaro
* GNU GPL v2
* menuconfig
* Supported computer architectures
* Kernel names
* Criticism

|

Support|

* Developers
* The Linux Programming Interface
* kernel.org
* LKML
* Linux conferences
* Users
* Linux User Group (LUG)

Technical|

| Debugging|

* CRIU
* ftrace
* kdump
* Linux kernel oops
* SystemTap
* BPF

|

Startup|

* vmlinux
* System.map
* dracut
* initrd
* initramfs

ABIs|

* Linux Standard Base
* x32 ABI

APIs|

| Of
userspace|

| FS,
daemons|

* devfs
* devpts
* debugfs
* procfs
* sysfs
* systemd
* udev
* Kmscon

|

Wrapper
libraries|

* C standard library
* glibc
* uClibc
* Bionic
* libhybris
* dietlibc
* EGLIBC
* klibc
* musl
* Newlib
* libcgroup
* libdrm
* libalsa
* libevdev
* libusb

kernel|

| System Call
Interface|

* POSIX
* ioctl
* select
* open
* read
* close
* sync
* …
* Linux-only
* futex
* epoll
* splice
* dnotify
* inotify
* readahead
* …

|

In-kernel|

* ALSA
* Crypto API
* DRM
* kernfs
* Memory barrier
* New API
* RCU
* Video4Linux

Components|

* Kernel modules
* BlueZ
* cgroups
* Console
* bcache
* Device mapper
* dm-cache
* dm-crypt
* DRM
* EDAC
* evdev
* Kernel same-page merging (KSM)
* LIO
* Framebuffer
* LVM
* KMS driver
* Netfilter
* Netlink
* nftables
* Network scheduler
* perf
* SLUB
* zram
* zswap

* Process and I/O schedulers:
* O(n) scheduler
* O(1) scheduler
* Completely Fair Scheduler (CFQ)
* Brain Fuck Scheduler
* Noop scheduler
* SCHED_DEADLINE

* Security Modules: AppArmor
* Exec Shield
* grsecurity
* PaX
* seccomp
* SELinux
* Smack
* Tomoyo Linux
* Linux PAM

* Device drivers
* 802.11
* graphics
* Raw device

* initramfs
* KernelCare
* kexec
* kGraft
* kpatch
* Ksplice

Variants|

* Mainline
* Linux kernel
* Linux-libre
* High-performance computing
* INK
* Compute Node Linux
* SLURM
* Real-time computing
* RTLinux
* RTAI
* Xenomai
* Carrier Grade Linux
* MMU-less
* μClinux
* PSXLinux

| Virtualization|

* Hypervisor
* KVM
* Xen
* OS-level virtualization
* Linux-VServer
* Lguest
* LXC
* OpenVZ
* Other
* L4Linux
* ELinOS
* User-mode Linux
* MkLinux
* coLinux

|

Adoption|

| Range
of use|

* Desktop
* Embedded
* Gaming
* Thin client:
* LTSP
* Thinstation
* Server:
* LAMP
* LYME-LYCE
* Devices

|

Adopters|

* List of Linux adopters
* GENIVI Alliance
* Proprietary software for Linux

* Category
* Commons
* Book
* Wikiversity
* Portal

0.00

(0 votes)

Original source: https://en.wikipedia.org/wiki/Debugfs. Read more

|

Retrieved from "https://handwiki.org/wiki/index.php?title=Software:Debugfs&oldid=733982"
*[v]: View this template
*[t]: Discuss this template
*[e]: Edit this template