LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   What account does logrotate run under? (https://www.linuxquestions.org/questions/linux-newbie-8/what-account-does-logrotate-run-under-847780/)

userunfriendly 12-01-2010 04:47 PM

What account does logrotate run under?
 
What account does logrotate usually run under. We have one machine where logrotate does not appear to be running automatically but I just ran it manually and it rotated fine. I look on some of our other machines where logrotate is working properly but I do not see a cron entry for it.

We mostly use redhat machines.

The only root entry on all of the machines I have checked is /bin/rpm.

TIA

stress_junkie 12-01-2010 04:51 PM

This is on my Ubuntu system. anacron is run from /etc/crontab. That runs all of the other cron jobs.

Code:

$ ls  /etc/cron*
/etc/crontab

/etc/cron.d:
anacron  debsecan  sysstat

/etc/cron.daily:
0anacron  aptitude      exim4-base    man-db              standard
apport    bsdmainutils  google-chrome  mlocate            sysstat
apt      dpkg          logrotate      popularity-contest

/etc/cron.hourly:

/etc/cron.monthly:
0anacron  standard

/etc/cron.weekly:
0anacron  apt-xapian-index  man-db


paulsm4 12-01-2010 04:58 PM

Hi -

1. You should see a file "/etc/cron.daily/logrotate". This is what enables "logrotate"
<= Compare your "working" PCs with the one that isn't working

2. You create individual logrotate jobs under "/etc/logrotate.d". The syntax is described in "man 8 logrotate", or any number of on-line tutorials. For example:

http://articles.techrepublic.com.com...1-1052474.html

'Hope that helps

Tinkster 12-01-2010 05:06 PM

I took the liberty to split the unrelated question and
responses out of the corpse (4 years dead) into a thread
of its own. Please don't thread-jack and necropost.


Cheers,
Tink

stress_junkie 12-01-2010 06:04 PM

http://www.amctv.com/originals/The-Walking-Dead/video

I think you meant corpse, not corps as in Marine Corps.

Tinkster 12-01-2010 06:08 PM

Quote:

Originally Posted by stress_junkie (Post 4177592)
http://www.amctv.com/originals/The-Walking-Dead/video

I think you meant corpse, not corps as in Marine Corps.

Quite right!

Thanks for catching that.

userunfriendly 12-01-2010 10:41 PM

Quote:

Originally Posted by Tinkster (Post 4177537)
I took the liberty to split the unrelated question and
responses out of the corpse (4 years dead) into a thread
of its own. Please don't thread-jack and necropost.


Cheers,
Tink

Thank you and sorry.

userunfriendly 12-01-2010 10:43 PM

Thanks for the replies, I found the file where it should be. I decided to try limiting the size in /etc/logrotate.d/syslog to 50M and will monitor.

catkin 12-01-2010 11:04 PM

Quote:

Originally Posted by Tinkster (Post 4177537)
necropost

Great word :) Did you make it up?


All times are GMT -5. The time now is 06:40 AM.