Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 03-27-2014, 12:38 AM   #1
LQ Newbie
Registered: Mar 2014
Posts: 1

Rep: Reputation: Disabled
Configuring Syslog server in Linux

I want to configure log rotate on my syslog server where there is a directory called /syslog inside this directory there are couple of folders with different hostnames and there i can see syslog.log on each folders

My intention is to configure log rotate and keep 90days data and remove rest of the files and need to add this in cron to run weekly once

Ex:- /syslog/test/syslog.log ( where test is the hostname )
/syslog/test1/syslog.log (where test1 is the 2nd hostname)
/syslog/test2/syslog.log (where test2 is the 3rd hostname)

Here is my logrotate configuration file

/syslog/test {
maxage 90
rotate 1

Please help me in configuring logrotate
Old 03-27-2014, 03:14 AM   #2
Senior Member
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7
Posts: 2,415

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
You could use the identifier:

That'll rotate the syslog.log files in:


As for the rest of your directives, you say you want to run logrotate weekly but you have the "monthly" directive, as for keeping 90 days, if you're rotating "monthly" then set "rotate 3" to keep 3 months worth.

Last edited by TenTenths; 03-27-2014 at 03:17 AM.


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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
configuring syslog server and exporting of logs to the server kpratik Linux - Server 6 01-18-2011 10:50 AM
Configuring syslog and sending file to server alee Linux - Server 10 06-11-2010 03:24 PM
I need help configuring a syslog server on a xen virtual machine sezam2 Linux - Server 7 02-21-2009 06:00 PM
LXer: Centralized Syslog Server Using syslog-NG LXer Syndicated Linux News 0 04-28-2006 06:21 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:24 AM.

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