#1  
Old 29th September 2011, 09:09
manjunath.nm89 manjunath.nm89 is offline
Junior Member
 
Join Date: Sep 2011
Posts: 4
Thanks: 0
Thanked 1 Time in 1 Post
Default Cron syslog issue

I have written a custom cron. This cron executes a rake task every 5 minutes. I also log the trace of this execution in a file locally on my server. The whole process seems to execute seamlessly every 5 minutes, but then it seems to log it in /var/log/syslog. I investigated on the syslog and found that system's critical errors, and other cron issues are logged in syslog. Has anybody faced this kind of an issue ?
Reply With Quote
The Following User Says Thank You to manjunath.nm89 For This Useful Post:
sarahlol (4th September 2012)
Sponsored Links
  #2  
Old 29th September 2011, 09:16
Mark_NL Mark_NL is offline
Senior Member
 
Join Date: Sep 2008
Location: The Netherlands
Posts: 912
Thanks: 12
Thanked 100 Times in 96 Posts
Default

Everything is logged in syslog

it's defined in the config file /etc/rsyslog.conf
Code:
*.*;auth,authpriv.none		-/var/log/syslog
If you want cron log to go somewhere else, uncomment the line
Code:
#cron.*				/var/log/cron.log
and all cronlog entries will go there (they will also still go to syslog though.
__________________
Real men don't backup... Real men cry!

http://www.e-rave.nl/
Reply With Quote
  #3  
Old 29th September 2011, 11:55
manjunath.nm89 manjunath.nm89 is offline
Junior Member
 
Join Date: Sep 2011
Posts: 4
Thanks: 0
Thanked 1 Time in 1 Post
Default Syslog.conf

But in my etc/syslog.conf, Everything is referenced as /mnt/log/syslog and not /var/log/syslog .

Is this the same for you also.. I Have logged in as root.
Reply With Quote
  #4  
Old 29th September 2011, 11:59
Mark_NL Mark_NL is offline
Senior Member
 
Join Date: Sep 2008
Location: The Netherlands
Posts: 912
Thanks: 12
Thanked 100 Times in 96 Posts
Default

Ah well, that depends on what the admin of the server set-up.

default it's /var/log/* .. but maybe if you run in a openvz container, vps, or smth .. those folders could be different (weird, but ok) ..

If all your log files are in /mnt/log/*

then set a line: cron.* -/mnt/log/cron.log

in your rsyslog.conf and restart rsyslogd
__________________
Real men don't backup... Real men cry!

http://www.e-rave.nl/
Reply With Quote
  #5  
Old 29th September 2011, 12:02
manjunath.nm89 manjunath.nm89 is offline
Junior Member
 
Join Date: Sep 2011
Posts: 4
Thanks: 0
Thanked 1 Time in 1 Post
Default syslog issue

Thanks for the quick reply..

But, I have these logs stored both in

/var/log/syslog and /mnt/log/syslog

is this possible. My configuration seems to store only in /mnt/log/syslog
Reply With Quote
  #6  
Old 29th September 2011, 12:03
Mark_NL Mark_NL is offline
Senior Member
 
Join Date: Sep 2008
Location: The Netherlands
Posts: 912
Thanks: 12
Thanked 100 Times in 96 Posts
Default

it might help if you post the content of rsyslog.conf
__________________
Real men don't backup... Real men cry!

http://www.e-rave.nl/
Reply With Quote
Reply

Bookmarks

Tags
cron, rails

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Cron issue in Debian 6 Nolan Installation/Configuration 6 18th April 2011 16:36
Problem getting cron job to run and in need of help :) MrCompTech General 7 27th July 2010 09:50
openbravo installer won't start. Heeter Installation/Configuration 10 7th February 2009 04:42
Log file housekeeping question chillifire Server Operation 2 5th January 2009 19:19
Syslog problem (I think) WaveQam Server Operation 1 4th January 2007 15:35


All times are GMT +2. The time now is 18:12.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.