Re: Logrotate - daily log files for a month

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Mikkel L. Ellertson wrote:
This can be changed - either change the entry in /etc/crontab, or
remove logrotate from /etc/cron.daily and put an entry in
/etc/cron.d to run it at 12:01 or something like that.
Doesn't quite work for me. I have SARG generate daily reports for my
proxy usage and if logrotate happens before the SARG process is started,
then it generates reports from what is currently in access.log, ie. it's
doesn't fetch data from the rotated logs. Other utilities for log
analysis may behave differently.

Well, you could run a daily cron job that pulls everything with
yesterday's date out of the log and the rotated log, and puts the
results in a file with the correct date as part of the name. Or, if
you want to archive the entire month in one file, append the output
to a fine. Then have a monthly job that renames the file to the
correct mouth and year, and create a new, empty file to collect the
next month's job. That way, the daily cron job doesn't have to know
the month.

The possibilities are endless. :-)

--
Regards,
विवेक ज. पाटणकर (Vivek J. Patankar)

Registered Linux User #374218
Fedora release 7 (Moonshine)
Linux 2.6.22.1-33.fc7 x86_64

--
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux