- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- preserve cron log
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
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
03-09-2006 03:47 AM
03-09-2006 03:47 AM
I can use /var/adm/cron/log for this, except that it gets recreated every time cron is restarted, and the old log copied to OLDlog. What approach would be best to solve this problem?
I'm considering modifying the cron startup script not to start a new log every time and then invent another method of trimming the log at more desireable intervals, for example once every 6 months remove the first month's entries, or something like that.
Or would it be better to come up with a way of duplicating in real time all entries in the cron log to another log?
Or some other scheme?
- John
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2006 03:51 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2006 03:54 AM
03-09-2006 03:54 AM
Re: preserve cron log
I think it's not a good idea to keep all the logs for ages in a single file. It has to be regenerated in regular intervals.
you may need to feed the auditors back that, it's an OS inbuilt facility to duplicate and regenerate a new file in each time. Why should we stop this!!!
Most of the logs in various UNIX are managed like that.
Best of luck
Shahul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2006 03:57 AM
03-09-2006 03:57 AM
Re: preserve cron log
http://www.interhack.net/projects/rotatelog/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2006 03:58 AM
03-09-2006 03:58 AM
Re: preserve cron log
The cron daemon start in run level 2. In the cron start up script /sbin/init.d/cron , there is a line which moves the cron log to OLDlog as shown below...
'start')
if [ -f /etc/rc.config.d/cron ] ; then
. /etc/rc.config.d/cron
else
echo "ERROR: /etc/rc.config.d/cron defaults file MISSING"
fi
if [ "$CRON" -eq 1 -a -x /usr/sbin/cron ]; then
if [ -f /var/adm/cron/log ]; then
mv /var/adm/cron/log /var/adm/cron/OLDlog
fi
/usr/sbin/cron && echo cron started
set_return
else
rval=2
fi
;;
The elegant method would be to just, modify this line to suite you purpose. The realtime copy of cron log is unecessary,which simply consumes processor power for no advantage and adds one more process in the table.
Regards,
Senthil Kumar .A