- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Stop cron loggnig
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2004 06:31 PM
06-07-2004 06:31 PM
How can I stop cron logging in HP-UX 11.00 ?
In Solaris systems I can modify /etc/default/cron from CRONLOG=YES to CRONLOG=NO.
Thx!
KRI
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2004 06:37 PM
06-07-2004 06:37 PM
Re: Stop cron loggnig
/sbin/init.d/cron stop
To start Cron jobs:
/sbin/init.d/cron start
Hope this helps,
Anshu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2004 06:43 PM
06-07-2004 06:43 PM
Re: Stop cron loggnig
I can't stop cron jobs !
I can stop cron logging to /var/adm/cron/log file.
KRI
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2004 06:48 PM
06-07-2004 06:48 PM
Re: Stop cron loggnig
if i understand u correctly, u want the jobs to continue running but not to log at all? i am guessing, maybe because u have a lot of jobs running, say, every minute?
please note that /var/adm/cron/log is meant as a audit/accounting file to track that jobs are "fire" and stopping it from logging may not be desirable to the auditor. morever, i believe /var should always be quite large.
for now, i know the only way to not log is if you have no schedule jobs.
regards.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2004 07:01 PM
06-07-2004 07:01 PM
Re: Stop cron loggnig
45 0 * * * > /var/adm/cron/log
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2004 07:02 PM
06-07-2004 07:02 PM
Re: Stop cron loggnig
thx for your replay !
You correctly understand me. I want to run cron jobs, but not to log at all. Yes, i have a lot of jobs, and log file /var/adm/cron/log grows very fast.
I want to stop cron from logging.
In Solaris it is possible.
KRI
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2004 07:05 PM
06-07-2004 07:05 PM
SolutionI would go for the first option. This way you can still find jobs that fail through the logfile(s), but you're filesystem will not fill up too fast with logging info.
Good luck,
Elmar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2004 07:05 PM
06-07-2004 07:05 PM
Re: Stop cron loggnig
The disabling of log can be achieved as suggested in previous post.
sks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2004 07:10 PM
06-07-2004 07:10 PM
Re: Stop cron loggnig
# echo > /var/adm/cron/log
Hope this helps,
Anshu
PS: I understand this is not exactly what you are looking for, rather its just a work around.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2004 07:10 PM
06-07-2004 07:10 PM
Re: Stop cron loggnig
We have the same problem.But we choose to wrote another cronjob to wipe out the cron log every day at 00:00 am.
regards
mB
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2004 07:12 PM
06-07-2004 07:12 PM
Re: Stop cron loggnig
You can have one more cron job to clear /var/adm/cron/log, may be every minute depending on the frequency of log file generation.
regards,
RDL.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2004 07:41 PM
06-07-2004 07:41 PM
Re: Stop cron loggnig
Good idea for me is to replace the log file with a symbolic link to /dev/null
Thank you Elmar !
Best regards!
KRI
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2004 07:46 PM
06-07-2004 07:46 PM
Re: Stop cron loggnig
A way could be redirect the standar an error ouputs to a /dev/null for each task in the cronfile, i.e:
00 02 * * * /any_path/your_task >/dev/null 2>/dev/null
Rgds.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2004 07:52 PM
06-07-2004 07:52 PM
Re: Stop cron loggnig
It is not good way.
Cron log contains:
> CMD: /my_path/to_run.sh >/dev/null 2>&1
> root 2951 c Tue May 18 17:40:00 METDST 2004
KRI
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2004 07:54 PM
06-07-2004 07:54 PM
Re: Stop cron loggnig
linking /var/adm/cron/log to /dev/null is an option for disabling logging completely (I wonder however what happens if cron is stopped and restarted : logfile is renamed and a new one is created).
But this leaves you with no possibility for troubleshooting nor auditing! It's no use to turn logging on AFTER you're in trouble, you have to do this BEFORE. Remember the cron log logs also batch and at-jobs, next to cron jobs.
Have a look at log rotation tools like "newsyslog" which allow you to control the size of log files and keep "older" logs in compressed format.
regards,
Thierry.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2004 08:08 PM
06-07-2004 08:08 PM
Re: Stop cron loggnig
as said I was curious how "/sbin/init.d/cron start" would handle a link to /dev/null...
Things seem to be going well, /sbin/init.d/cron checks if <
regards,
Thierry.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2004 09:08 PM
06-07-2004 09:08 PM
Re: Stop cron loggnig
I'm not sure about your answer but my hint works fine in my box using the *exact* sintax posted.
Rgds.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-08-2004 05:56 PM
06-08-2004 05:56 PM
Re: Stop cron loggnig
The problem with your solution is that it doesn't solve the problem. It will only result in no mails to the user, but in the cron logging there is no logging of the output of commands but logging from cron itself, reporting what it starts, at which time and when it stops with what exit code. So three lines per command that's being started.
Hope this explains it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-08-2004 06:27 PM
06-08-2004 06:27 PM
Re: Stop cron loggnig
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-08-2004 09:28 PM
06-08-2004 09:28 PM
Re: Stop cron loggnig
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-08-2004 09:53 PM
06-08-2004 09:53 PM
Re: Stop cron loggnig
My suggestion doesn't really avoid logging action into /var/adm/cron/log file. In fact, the Thierry's solution looks fine.
Best regards and excuse me the nuisances.