no swim no life
커널에서의 로그 출력 본문
printk( ) 로 출력하는 커널 메시지는 klogd --> syslogd를 통해 /var/log/messages에 기록되며,
사용되는 출력 레벨은 Console 출력이다.
이 메시지는 기본적으로 X-Window 같은 터미널에서 바로 확인할 수 없으므로,
아래와 같은 방법을 통해 확인해야 한다.
messages 파일의 갱신을 지속적으로 확인
[-@localhost] # tail -f /var/log/messages
커널 메시지의 출력 레벨을 높이면 터미널에서도 확인 할 수 있다.
linux/kernel.h
#define KERN_EMERG "<0>" /* system is unusable */
#define KERN_ALERT "<1>" /* action must be taken immediately */
#define KERN_CRIT "<2>" /* critical conditions */
#define KERN_ERR "<3>" /* error conditions */
#define KERN_WARNING "<4>" /* warning conditions */
#define KERN_NOTICE "<5>" /* normal but significant condition */
#define KERN_INFO "<6>" /* informational */
#define KERN_DEBUG "<7>" /* debug-level messages */
/etc/syslog.conf 설정 변경
#kern.* /dev/console
~
[-@localhost] # /etc/rc.d/init.d/syslog restart
위의 주석을 제거 하고 syslogd를 재시작 후,
xterm -C 명령으로 콘솔 터미널을 시작한다.
'work > kernel' 카테고리의 다른 글
리눅스 메모리 사용 제약 (0) | 2008.09.04 |
---|---|
insmod 수행 중 undefined (0) | 2008.09.03 |
2.6 Kernel Kbuild System (0) | 2008.09.03 |
Comments