LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


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

Rep: Reputation: 0
Unhappy 'klogd' problem


Hi!

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.

Thanks!
 
Old 05-26-2007, 04:09 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
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.


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

Rep: Reputation: 130Reputation: 130
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, 04:11 PM   #4
NervusMagnus
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 syslog-ng.conf.in to control messages for your needs.
In section of file syslog-ng.conf.in:
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/syslog-ng.conf.in" (now, messages control by this file). If your system reports some error messages after typed command, compare files syslog-ng.conf and syslog-ng.conf.in in named line in error messages.

Note:
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 syslog-ng.conf.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 04:13 PM.
 
  


Reply


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/klogd.pid failed jay73 Linux - Software 2 03-01-2007 07:07 AM
klogd and syslog asahlot Linux - Kernel 1 09-22-2006 11:35 AM
why my ssytem have klogd and syslogd? xcore_on Linux - Newbie 1 05-21-2006 10:34 AM
klogd - how to use full version sceadu Linux - General 0 04-22-2005 10:16 AM
can i delete syslogd, klogd? lmmix Linux - Security 9 03-10-2005 06:12 PM


All times are GMT -5. The time now is 10:32 AM.

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