- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: How Do I set the filesize for the cron logs
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
Discussions
Discussions
Discussions
Forums
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
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
тАО12-13-2005 05:51 AM
тАО12-13-2005 05:51 AM
I'm running "Linux 2.4.18-6mdk" and compressing logs every week using logrotate.
My problem is that the cron logs only hold about 1.5 days information, acting as a circular buffer.
Where/How can I specify the cron (or any other) log to be sequential and unlimited size?
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-13-2005 08:08 AM
тАО12-13-2005 08:08 AM
Re: How Do I set the filesize for the cron logs
You might want to look at /etc/syslog.conf
I've never heard of a setup like this.
It may be that the system is running logrotate.
If its a logroate configuration problem its probably in /etc/logroate.d
There are a series of files in there named for the daemon log they are controlling.
Check ou the one for cron and perhaps post it. Also determine if logroate is running. For red hat compatibles: chkconfig --list | grep logrotate
I'm wondering if the setup was done to limit log size. Its certainly possible to locate these logs on NFS or other external storage.
Regards,
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-13-2005 08:26 AM
тАО12-13-2005 08:26 AM
Re: How Do I set the filesize for the cron logs
It works great, weekly.
My problem is that the /var/log/cron/info files only contain the latest 1.5 day's info. It looks like the cron writer is using a circular buffer.
Here is the /etc/logrotate.d/cron file:
/var/log/cron {
missingok
notifempty
postrotate
/bin/kill -HUP `/bin/cat /var/run/crond.pid`
endscript
}
and the /etc/logrotate.conf with comments removed
weekly
rotate 4
create
compress
include /etc/logrotate.d
/var/log/wtmp {
monthly
create 0664 root utmp
rotate 1
}
/var/log/lastlog {
monthly
rotate 1
}
Weird
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-13-2005 06:01 PM
тАО12-13-2005 06:01 PM
Re: How Do I set the filesize for the cron logs
There is no size limitation in cron daemon itself. We can limit log size using logratete, but in default configuration it's unlimited. [in fact, logratete size limit will just activate log rotation when logfile reaches the limit. it won't drop some part of log]
Can you please remove (comment) cron logs rotation in logrotate?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-13-2005 10:33 PM
тАО12-13-2005 10:33 PM
Re: How Do I set the filesize for the cron logs
The logrotate configuration is:
/var/log/cron {
missingok
notifempty
postrotate
/bin/kill -HUP `/bin/cat /var/run/crond.pid`
endscript
}
That means that the file to be proceses is /var/log/cron
And you are talking about a file in the directory /var/log/cron called info (/var/log/cron/info)
So, I think that logrotate is not working because it won't act over directories. And I don't ever heard about the /var/log/cron/info file. Normally, cron logs are in the /var/log/cron file.
What is your Linux distribution?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-14-2005 12:47 AM
тАО12-14-2005 12:47 AM
Re: How Do I set the filesize for the cron logs
Logrotate is working as seen below... Notice how all files are rotated on Sundays. I don't know what happened today to info.1...
# ll cron
total 176
-rw-r----- 1 root root 0 Dec 11 01:02 errors
-rw-r----- 1 root root 29 Dec 4 01:02 errors.1.gz
-rw-r----- 1 root root 29 Nov 27 01:02 errors.2.gz
-rw-r----- 1 root root 29 Nov 20 01:02 errors.3.gz
-rw-r----- 1 root root 29 Nov 13 01:02 errors.4.gz
-rw-r----- 1 root root 29 Nov 6 01:02 errors.5.gz
-rw-r----- 1 root root 85991 Dec 14 09:45 info
-rw-r----- 1 root root 0 Dec 14 02:30 info.1
-rw-r----- 1 root root 15748 Dec 4 01:02 info.2.gz
-rw-r----- 1 root root 16186 Nov 27 01:02 info.3.gz
-rw-r----- 1 root root 0 Nov 23 02:30 info.4.gz
-rw-r----- 1 root root 16068 Nov 13 01:02 info.5.gz
-rw-r----- 1 root root 0 Dec 11 01:02 warnings
-rw-r----- 1 root root 31 Dec 4 01:02 warnings.1.gz
-rw-r----- 1 root root 31 Nov 27 01:02 warnings.2.gz
-rw-r----- 1 root root 31 Nov 20 01:02 warnings.3.gz
-rw-r----- 1 root root 31 Nov 13 01:02 warnings.4.gz
-rw-r----- 1 root root 31 Nov 6 01:02 warnings.5.gz
# pwd
/var/log
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-14-2005 02:30 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-14-2005 02:36 AM
тАО12-14-2005 02:36 AM
Re: How Do I set the filesize for the cron logs
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-14-2005 02:38 AM
тАО12-14-2005 02:38 AM
Re: How Do I set the filesize for the cron logs
cron.=debug;cron.=info;cron.=notice -/var/log/cron/info
cron.=warn -/var/log/cron/warnings
cron.err -/var/log/cron/errors
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-14-2005 02:57 AM
тАО12-14-2005 02:57 AM
Re: How Do I set the filesize for the cron logs
You put me on the right track.
Turns out that our old server had a home grown log purge that truncated (daily) the cron logs after they got bigger than 16K.
We implemented logrotate when we upgraded but forgot to remove the old truncate entry.
Let's see how many others there are...
Thanks again.
RayB