Logrotate every 15days


 
Thread Tools Search this Thread
Operating Systems Linux Logrotate every 15days
# 1  
Old 08-16-2011
Logrotate every 15days

Hi all,

I have been asked to configure logrotate for a perticular log file for every 15 days. I do not find options other than weekly or monthly.Need you expertise on the sameSmilie
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

Logrotate - /etc/logrotate.conf does't exist

Hi Admins. I have installed logrotate rpm on Aix 6.1. After the installation of rpm, I don't find /etc/logrotate.conf file and /etc/logrotate.d dir . The config file is located in /opt/freeware/etc/logrotate.conf. When I ran logrotate -v /opt/freeware/etc/logrotate.conf I get below... (2 Replies)
Discussion started by: snchaudhari2
2 Replies

2. Shell Programming and Scripting

Logrotate - I am not able to rotate files using logrotate

I have written script which is working in Home directory perfectly and also compressing log files and rotating correctly. But, when i try to run script for /var/log/ i am able to get compressed log files but not able to get rotation of compressed log files. Please suggest. I am using below command... (5 Replies)
Discussion started by: VSom007
5 Replies

3. Shell Programming and Scripting

AIX: Find a process older than 15days

Hi All, My application has specific processes when the developers start using respective GUI . I would like to find related process on server side that is older than 15 days for my application. I am using AIX 6.0. Could you please help with the command on how to find the older process? ... (5 Replies)
Discussion started by: chandu123
5 Replies

4. SuSE

Which logs to logrotate?

Hi all We've had new servers coming in and one of the requirement was to keep logs for up to 8 months. I know logrotate can do the job, but by default (on Suse Enterprise10, 11) we have these logs in /etc/logrotate.d dir as default logs which are rotated: -rw-r--r-- 1 root root 140 Jul... (0 Replies)
Discussion started by: hedkandi
0 Replies

5. UNIX for Dummies Questions & Answers

How to test logrotate?

I want to test whether logrotate will rotate my log file or not? (1 Reply)
Discussion started by: proactiveaditya
1 Replies

6. Linux

LogRotate

Hi I am trying to rotate specific log by using logrotate function in unix I have made following entry in the /etc/logrotate.conf file /var/log/testlog/debug_log { daily rotate 7 create compress } But only issue is that my other logs like /var/log/messages,... (2 Replies)
Discussion started by: SiddhV
2 Replies

7. UNIX for Advanced & Expert Users

logrotate with /etc/logrotate.conf file

Hi there, I want to rotate the logfiles which are located in /var/log/jboss/tomcat* so I have created a file named as 'tomat' in /etc/logrotate.d/tomcat with the following content. # cat /etc/logrotate.d/tomcat /var/log/jboss/tomcat_access_log*.log { daily nocreate ... (2 Replies)
Discussion started by: skmdu
2 Replies

8. Red Hat

Problem seen with logrotate

Hi all, I have configured logrotate to logorotate every 12 hour. The configurations are as follows. /etc/cron.d/config ------------------------- SHELL=/bin/bash PATH=/sbin:/bin:/usr/sbin:/usr/bin MAILTO="" HOME=/root 0 */12 * * * root logrotate /etc/logrotate.d/test ... (1 Reply)
Discussion started by: rsravi74
1 Replies

9. UNIX for Advanced & Expert Users

logrotate question

I am getting this system message: /etc/cron.daily/logrotate: error: rsync:7 unknown option 'endscript' -- ignoring line I don't find anything related to rsync in the logrotate.conf file, so I am unsure as to how to resolve this and stop this message. Thanks. (1 Reply)
Discussion started by: manouche
1 Replies

10. Post Here to Contact Site Administrators and Moderators

How to remove 15days back old files

Hi Experts, I want to delete the log files which is created 15 days back. 1st I want to view the files and later I want to delete viewed files I have tried with following command but its not working. find . -name '*.log' -mtime +15 -exec ls -ltr {} \; This is showing the list which shows... (2 Replies)
Discussion started by: vidya2006
2 Replies
Login or Register to Ask a Question
DateTime::Event::Recurrence(3pm)			User Contributed Perl Documentation			  DateTime::Event::Recurrence(3pm)

NAME
DateTime::Event::Recurrence - DateTime::Set extension for create basic recurrence sets SYNOPSIS
use DateTime; use DateTime::Event::Recurrence; my $dt = DateTime->new( year => 2000, month => 6, day => 20, ); my $daily_set = DateTime::Event::Recurrence->daily; my $dt_next = $daily_set->next( $dt ); my $dt_previous = $daily_set->previous( $dt ); my $bool = $daily_set->contains( $dt ); my @days = $daily_set->as_list( start => $dt1, end => $dt2 ); my $iter = $daily_set->iterator; while ( my $dt = $iter->next ) { print ' ', $dt->datetime; } DESCRIPTION
This module provides convenience methods that let you easily create "DateTime::Set" objects for various recurrences, such as "once a month" or "every day". You can also create more complicated recurrences, such as "every Monday, Wednesday and Thursday at 10:00 AM and 2:00 PM". USAGE
o yearly monthly weekly daily hourly minutely secondly These methods all return a new "DateTime::Set" object representing the given recurrence. my $daily_set = DateTime::Event::Recurrence->daily; If no parameters are given, then the set members each occur at the beginning of the specified recurrence. For example, by default, the "monthly()" method returns a set containing the first day of each month. Without parameters, the "weekly()" method returns a set containing Mondays. However, you can pass in parameters to alter where these datetimes fall. The parameters are the same as those given to the "DateTime::Duration" constructor for specifying the length of a duration. For example, to create a set representing a daily recurrence at 10:30 each day, we write this: my $daily_at_10_30_set = DateTime::Event::Recurrence->daily( hours => 10, minutes => 30 ); To represent every Tuesday (second day of the week): my $weekly_on_tuesday_set = DateTime::Event::Recurrence->weekly( days => 2 ); A negative duration counts backwards from the end of the period. This is done in the same manner as is specified in RFC 2445 (iCal). Negative durations are useful for creating recurrences such as the last day of each month: my $last_day_of_month_set = DateTime::Event::Recurrence->monthly( days => -1 ); You can also provide multiple sets of duration arguments, such as this: my $set = DateTime::Event::Recurrence->daily ( hours => [ 10, 14, -1 ], minutes => [ 15, 30, -15 ], ); This specifies a recurrence occurring every day at these 9 different times: 10:15, 10:30, 10:45, # +10h ( +15min / +30min / last 15min (-15) ) 14:15, 14:30, 14:45, # +14h ( +15min / +30min / last 15min (-15) ) 23:15, 23:30, 23:45, # last 1h (-1) ( +15min / +30min / last 15min (-15) ) To create a set of recurrences occurring every thirty seconds, we could do this: my $every_30_seconds_set = DateTime::Event::Recurrence->minutely( seconds => [ 0, 30 ] ); The following is also valid. See the section on the "interval" parameter: my $every_30_seconds_set = DateTime::Event::Recurrence->secondly( interval => 30 ); Invalid DateTimes Invalid values are skipped at run time. For example, when days are added to a month, the result is checked for a nonexisting day (such as 31 or 30), and the invalid datetimes are skipped. Another example of this would be creating a set via the "daily()" method and specifying "hours => 25". The "days" Parameter The "days" parameter can be combined with yearly, monthly, and weekly recurrences, resulting in six possible meanings: # tuesday of every week my $set = DateTime::Event::Recurrence->weekly( days => 2 ); # 10th day of every month my $set = DateTime::Event::Recurrence->monthly( days => 10 ); # second tuesday of every month my $set = DateTime::Event::Recurrence->monthly( weeks => 2, days => 2 ); # 10th day of every year my $set = DateTime::Event::Recurrence->yearly( days => 10 ); # 10th day of every december my $set = DateTime::Event::Recurrence->yearly( months => 12, days => 10 ); # second tuesday of every year my $set = DateTime::Event::Recurrence->yearly( weeks => 2, days => 2 ); Week days can also be called by name, as is specified in RFC 2445 (iCal): my $weekly_on_tuesday_set = DateTime::Event::Recurrence->weekly( days => 'tu' ); The "days" parameter defaults to "the first day". See also the section on the "week start day" parameter. # second monday of every month my $set = DateTime::Event::Recurrence->monthly( weeks => 2 ); The "interval" and "start" Parameters The "interval" parameter represents how often the recurrence rule repeats. The optional "start" parameter specifies where to start counting: my $dt_start = DateTime->new( year => 2003, month => 6, day => 15 ); my $set = DateTime::Event::Recurrence->daily ( interval => 11, hours => 10, minutes => 30, start => $dt_start, ); This specifies a recurrence that happens at 10:30 on the day specified by "start => $dt", and then every 11 days before and after $dt. So we get a set like this: ... 2003-06-04T10:30:00, 2003-06-15T10:30:00, 2003-06-26T10:30:00, ... In this case, the method is used to specify the unit, so "daily()" means that our unit is a day, and "interval => 11" specifies the quantity of our unit. The "start" parameter should have no time zone. The "week_start_day" Parameter The "week_start_day" parameter is intended for internal use by the "DateTime::Event::ICal" module, for generating RFC2445 recurrences. The "week_start_day" represents how the 'first week' of a period is calculated: "mo" - this is the default. The first week is one that starts in monday, and has the most days in this period. "tu", "we", "th", "fr", "sa", "su" - The first week is one that starts in this week-day, and has the most days in this period. Works for "weekly" and "yearly" recurrences. "1tu", "1we", "1th", "1fr", "1sa", "1su" - The first week is one that starts in this week-day, and has all days in this period. This works for "weekly()", "monthly()" and "yearly()" recurrences. Time Zones Recurrences are created in the 'floating' time zone, as specified in the "DateTime" module. If you want to specify a time zone for a recurrence, you can do this by calling "set_time_zone()" on the returned set: my $daily = DateTime::Event::Recurrence->daily; $daily->set_time_zone( 'Europe/Berlin' ); You can also pass a "DateTime.pm" object with a time zone to the set's "next()" and "previous()" methods: my $dt = DateTime->today( time_zone => 'Europe/Berlin' ); my $next = $daily->next($dt); A recurrence can be affected DST changes, so it would be possible to specify a recurrence that creates nonexistent datetimes. Because "DateTime.pm" throws an exception if asked to create a non-existent datetime, please be careful when setting a time zone for your recurrence. It might be preferable to always use "UTC" for your sets, and then convert the returned object to the desired time zone. Leap Seconds There are no leap seconds, because the recurrences are created in the 'floating' time zone. The value 60 for seconds (the leap second) is ignored. If you really want the leap second, then specify the second as "-1". AUTHOR
Flavio Soibelmann Glock fglock@pucrs.br CREDITS
The API was developed with help from the people in the datetime@perl.org list. Special thanks to Dave Rolsky, Ron Hill and Matt Sisk for being around with ideas. If you can understand what this module does by reading the docs, you should thank Dave Rolsky. If you can't understand it, yell at him. He also helped removing weird idioms from the code. Jerrad Pierce came with the idea to move "interval" from DateTime::Event::ICal to here. COPYRIGHT
Copyright (c) 2003 Flavio Soibelmann Glock. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The full text of the license can be found in the LICENSE file included with this module. SEE ALSO
datetime@perl.org mailing list DateTime Web page at http://datetime.perl.org/ DateTime - date and time :) DateTime::Set - for recurrence-set accessors docs. You can use DateTime::Set to specify recurrences using callback subroutines. DateTime::Event::ICal - if you need more complex recurrences. DateTime::SpanSet - sets of intervals, including recurring sets of intervals. perl v5.10.0 2005-05-12 DateTime::Event::Recurrence(3pm)