LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-06-2009, 11:29 PM   #1
Buddhike G
Member
 
Registered: Jun 2007
Distribution: RHEL, CentOS, Solaris
Posts: 63

Rep: Reputation: 16
enable separate logging for watchdog


Hi

I want to enable separate log file ( which will log everything related to watchdog in it) for watchdog demon which is running on my system. Syslog is running as system logger in RHEL4 box which i am using and my /etc/syslog.conf file looks like follows.


# Log all kernel messages to the console.
# Logging much else clutters up the screen.
#kern.* /dev/console

# Log anything (except mail) of level info or higher.
# Don't log private authentication messages!
*.info;watchdog.none;mail.none;authpriv.none;cron.none /var/log/messages

# The authpriv file has restricted access.
authpriv.* /var/log/secure

# Log all the mail messages in one place.
mail.* -/var/log/maillog


# Log cron stuff
cron.* /var/log/cron

# Watchdog Logs
watchdog.* /var/log/watchdog/watchdog.log

# Everybody gets emergency messages
*.emerg *

# Save news errors of level crit and higher in a special file.
uucp,news.crit /var/log/spooler

# Save boot messages also to boot.log
local7.* /var/log/boot.log


Also My /etc/watchdog.conf file is look like as follows.



#ping = 172.31.14.1
#ping = 172.26.1.255
#interface = eth0
file = /var/log/watchdog/watchdog.log
#change = 1407

# Uncomment to enable test. Setting one of these values to '0' disables it.
# These values will hopefully never reboot your machine during normal use
# (if your machine is really hung, the loadavg will go much higher than 25)
max-load-1 = 24
max-load-5 = 18
max-load-15 = 12

# Note that this is the number of pages!
# To get the real size, check how large the pagesize is on your machine.
min-memory = 1

repair-binary = /usr/local/bin/repair
#test-binary = /usr/local/bin/test
#test-timeout =

watchdog-device = /dev/watchdog

# Defaults compiled into the binary
#temperature-device =
#max-temperature = 120

# Defaults compiled into the binary
#admin = root
#interval = 10
logtick = 3

# This greatly decreases the chance that watchdog won't be scheduled before
# your machine is really loaded
realtime = yes
priority = 1

# Check if syslogd is still running by enabling the following line
#pidfile = /var/run/syslogd.pid
#pidfile = /var/run/httpd.pid



after changing the configuration files i've rebooted the system and saw that logging is not working (even I've created /var/log/watchdog/watchdog.log) file mannually. Can anybody please help me out to solve that problem.

Thanx in advance !!!
 
Old 04-07-2009, 04:32 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
watchdog.* is invalid. the first part of that pair of attributes is the syslog facility, not a process name or anything, and must be from the list here. http://doc.novsu.ac.ru/oreilly/tcpip/puis/ch10_05.htm

if you check out syslog-ng you can match on process name (which is actually parsed out of the message text, not the process actually creating the log, or match on other strings to redirect to separate files.
 
  


Reply

Tags
syslog



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
Intel's watchdog support iTCO_wdt - does this mean watchdog is not present? kushalkoolwal Linux - Hardware 3 02-06-2009 03:16 PM
Hardware watchdog in BIOS and Linux watchdog driver are different? travishein Linux - Hardware 1 12-22-2008 09:41 PM
logging daily cron jobs in separate files csmwlee Linux - Newbie 5 10-10-2005 10:30 AM
Howto to enable logging in Knoppix 3.8? bigrigdriver Linux - Software 5 10-05-2005 09:38 PM
enable separate terminal for application i/o in KDevelop mrosati Linux - Software 0 04-21-2004 09:56 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:41 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
Open Source Consulting | Domain Registration