LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 02-16-2015, 06:12 AM   #1
yzT!
Member
 
Registered: Jan 2013
Distribution: Debian
Posts: 168

Rep: Reputation: 2
Trying to figure out when is logrotate running? (systemd)


I have configured a couple of logs to be included on logrotate. Now I'm trying to figure out when is logrotate running, because as I'm using Debian Jessie (systemd), it no longer works through cron.

Reading, it seems a logrotate.timer should exist, but
Code:
systemctl status logrotate.timer
● logrotate.timer
   Loaded: not-found (Reason: No such file or directory)
   Active: inactive (dead)
Logrotate is working because I see that logs like syslog, messages... are rotating.

So where (in systemd's realm) is this configured?
 
Old 02-16-2015, 07:09 AM   #2
Head_on_a_Stick
Senior Member
 
Registered: Dec 2014
Location: London, England
Distribution: Debian stable (and OpenBSD-current)
Posts: 1,187

Rep: Reputation: 285Reputation: 285Reputation: 285
Quote:
Originally Posted by yzT! View Post
So where (in systemd's realm) is this configured?
Have a look at /etc/logrotate.conf and /etc/logrotate.d/

I'm pretty sure (but not certain) that cron still works under systemd -- I know it can work just fine under Arch as long as the .service is enabled.

However, I only dabble in Debian and it is much more complicated so I could be wrong here.
 
Old 02-16-2015, 08:16 AM   #3
yzT!
Member
 
Registered: Jan 2013
Distribution: Debian
Posts: 168

Original Poster
Rep: Reputation: 2
I think you didn't understand my question. logrotate.conf and logrotate.d/* is for configuring logrotate. However, what I'm asking is where does systemd schedule the time at which logrotate is going to be executed.

Cron works on systemd, in fact I have custom scripts that run under cron. But system services now run under systemd. To make it clearer, if I set up a cron task for logrotate, it would run twice, cron time and systemd time.
 
Old 02-16-2015, 08:33 AM   #4
Head_on_a_Stick
Senior Member
 
Registered: Dec 2014
Location: London, England
Distribution: Debian stable (and OpenBSD-current)
Posts: 1,187

Rep: Reputation: 285Reputation: 285Reputation: 285
Yes sorry.

I think the cron tasks you set up are still honoured under systemd as they were before -- systemd would only act if you wrote and enabled a systemd .timer file.
 
Old 02-16-2015, 02:14 PM   #5
yzT!
Member
 
Registered: Jan 2013
Distribution: Debian
Posts: 168

Original Poster
Rep: Reputation: 2
I performed a search on the whole system for logrotate, and found that it was running through anacron. That's why I couldn't see it on any crontab.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Can't figure out how to get wireless running unawares Slackware 17 05-02-2011 01:12 AM
logrotate permissions problem - can't figure it out ocgltd Linux - Server 1 09-25-2008 07:21 AM
Logrotate script is running even if my m/c is not on at 4.02 vmniza Linux - General 2 02-25-2004 06:17 AM
I want to figure out which display a process is running on drgowans Linux - Software 4 11-10-2003 11:32 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:12 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration