Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 05-26-2007, 09:14 AM   #1
LQ Newbie
Registered: May 2007
Location: Donja Livadica, Serbia
Distribution: SuSE 10.1
Posts: 2

Rep: Reputation: 0
Unhappy 'klogd' problem


Does anybody know how to configure my klogd to output log messages in specified file? I tried with 'klogd -f /home/module/my_debug' but nothing happened.
Also, I have problem to configure my console level to display log messages. I don't know how to do this. Can anybody help me? I have not 'syslogd' file at all. Also, I have not manual for syslogd. When I typed 'man syslogd' I got message 'No manual...'

I'm running SuSE 10.1 with kernel 2.6. I tried all advises from O'Reily book 'Linux Device Driver' but nothing.

Old 05-26-2007, 03:09 PM   #2
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 927Reputation: 927Reputation: 927Reputation: 927Reputation: 927Reputation: 927Reputation: 927Reputation: 927
Hi, and welcome to LQ!

Are there any newly touched files in /var/log?
ls -ltr ... look at their time stamps.

If you run
ps -ef | grep log
... what do you get? Chances are your distro uses syslog-ng.

Old 05-26-2007, 04:47 PM   #3
LQ Guru
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 133Reputation: 133
Search you /etc directory for the relevant configuration file; it should contain a section specifying the target(s) for outputting logs.
Old 05-27-2007, 03:11 PM   #4
LQ Newbie
Registered: May 2007
Location: Donja Livadica, Serbia
Distribution: SuSE 10.1
Posts: 2

Original Poster
Rep: Reputation: 0
Thanks Tinkster!
Thanks jay73!

Yes, my distro uses syslog-ng.

And, I got it!

For other Linux newbies who have same problem and want to do kernel programming:
syslogd or syslog-ng (depend of your distro) controls log messages; read manual for these. There is configuration file

syslog-ng.conf (syslogd.conf) in the directory /etc/syslog-ng/ (etc/sysylogd/). Don't edit this file. Edit file to control messages for your needs.
In section of file
destination messages { file("/var/log/messages"); }; -> describes where messages are stored
replace "/var/log/message" with your file's path where you want to store messages.

In order for this change to take effect you need to kill syslog-ng. To see syslog-ng process ID (PID) type "ps -ef | grep log". Then type "kill <syslog-ng PID>". Now, start syslog-ng with "syslog-ng -f /etc/syslog-ng/" (now, messages control by this file). If your system reports some error messages after typed command, compare files syslog-ng.conf and in named line in error messages.

If you want to display kernel messages in your file, you need to kill klogd (after you killed syslog-ng) to take changes made in To kill klogd use the same procedure as the one when you killed syslog-ng. Now, after the syslog-ng has started, start klogd with "klogd -c <messages level>" (see manual klogd for information about messages level).

Am I right, Tinkster?

Last edited by NervusMagnus; 05-27-2007 at 03:13 PM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
can't open or create /var/run/ failed jay73 Linux - Software 2 03-01-2007 06:07 AM
klogd and syslog asahlot Linux - Kernel 1 09-22-2006 10:35 AM
why my ssytem have klogd and syslogd? xcore_on Linux - Newbie 1 05-21-2006 09:34 AM
klogd - how to use full version sceadu Linux - General 0 04-22-2005 09:16 AM
can i delete syslogd, klogd? lmmix Linux - Security 9 03-10-2005 05:12 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:33 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration