# How to use debugfs ?

## chy168

I'm setup USB Monitor (Kernel feature: USBmon)

http://www.mjmwired.net/kernel/Documentation/usb/usbmon.txt

in the document, it need to mount "debugfs" to /sys/kernel/debug, 

but I cannot find "debugfs" in `man mount`

I event has no /sys/kernel/debug in my dir.

1. how can I mount the fs type: "debugfs"

2. what feature should I enable in kernel to get the dir : "/sys/kernel/debug"

thank you  :Smile: 

----------

## ecosta

Have you checked if debugfs is enabled in your kernel?

```

# grep -i debug_fs /usr/src/linux/.config

CONFIG_DEBUG_FS = y

```

... and that usb monitoring is enabled too

```

# grep -i usb_mon /usr/src/linux/.config

CONFIG_USB_MON = y/m

```

if it's a module, you'll need to load it into the kernel before you can use it.

Hope this helps.

 -Ed

----------

## chy168

Thanks for your prompt.  :Very Happy: 

I forgot to enable the "Debug Filesystem" in "Kernel Hacking".

But I still cannot find the dir "/sys/kernel/debug" in my Linux.

I've tried to `mkdir /sys/kernel/debug`, but:

```
mkdir: cannot create directory `/sys/kernel/debug': Operation not permitted
```

What more feature should I enable in my kernel ?

thank you ~

----------

