10/12/2014

Kernel의 printk debug-2

1. User에서 Printk 관련설정 

User에서 printk 설정 세부 확인

$ cat /proc/sys/kernel/printk  // printk 설정 및 보기  

상위를 보면 숫자 4개가 나오며 각각의 의미는 아래와 같다.
  1. console_loglevel,
  2. default_message_loglevel,
  3. minimum_console_level
  4. default_console_loglevel respectively.


These values influence printk() behavior when printing or logging error messages, which come from inside the kernel.
See syslog(2) for more information on the different log levels.

  • /proc/sys/kernel/console_loglevel
Messages with a higher priority than this will be printed to the console.

  • /proc/sys/kernel/default_message_level
Messages without an explicit priority will be printed with this priority.

  • /proc/sys/kernel/minimum_console_loglevel
Minimum (highest) value to which the console_loglevel can be set.

  • /proc/sys/kernel/default_console_loglevel
Default value for console_loglevel.


# cat /proc/sys/kernel/printk
기본 설정: 6 4 1 7

Kernel Message 막기 위해서 아래와 같이 설정 

# echo "0 4 1 7" > /proc/sys/kernel/printk
# echo 0 > /proc/sys/kernel/printk

1.1  Kernel message 보기 

# dmesg

혹은 klogd을 죽이고

#cat /proc/kmsg

  https://elinux.org/Debugging_by_printing


댓글 없음 :