'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! |
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 |
Search you /etc directory for the relevant configuration file; it should contain a section specifying the target(s) for outputting logs.
|
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? ;) |
All times are GMT -5. The time now is 02:42 PM. |