Solved

log rotate of tacacs+ in redhat6

Posted on 2004-08-12
6
1,120 Views
Last Modified: 2013-12-16
I just install tacacs on RH6 and it work and have log of tacacs is "/var/log/tac_plus.log" ,so I want to make it rotate every day in 1 week...

tac_plus.log
tac_plus.log.6
tac_plus.log.5
tac_plus.log.4
tac_plus.log.3
tac_plus.log.2
tac_plus.log.1

 how can I start it same as /var/log/messages
I try to make it by use command
“logrotate -f /etc/logrotate.d/tac_plus”
result is not create only 1 file and don't create new file in every day. There're have another command to set it up?
0
Comment
Question by:ahchun
  • 3
  • 3
6 Comments
 
LVL 11

Expert Comment

by:lbertacco
ID: 11791175
add a file "tacacs" in dir /etc/logrotate.d like the following

/var/log/tac_plus.log {
           rotate 7
           weekly
           nocompress
           missingok
}

then try logrotate -f /etc/logrotate.d/tacacs

See also "man logrotate" for options you can specify in this file. In particular you might need to restart or signal the tacacs daemon when you rotate the log file
0
 

Author Comment

by:ahchun
ID: 11817250
I done it, result it have new file after use 'logrotate -f /etc/logrotate.d/tac_plus' (I create file name to be tac_plus)

but when next day com'in a log file is not rotate.
Please advice.
0
 
LVL 11

Accepted Solution

by:
lbertacco earned 50 total points
ID: 11824141
what do you have in your /etc/logrotate.d/tac_plus file? With "weekly" logfile is rotate only every other week. If you want it to be rotate every day, use "daily"
0
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 

Author Comment

by:ahchun
ID: 11827142
OK, I do it thank you. :)
Will saw the result in next day.

====================================
1. [root@localhost root]# more /etc/logrotate.d/tac_plus
/var/log/tac_plus.log {
           rotate 7
           daily
           nocompress
           missingok
}

2. logrotate -f /etc/logrotate.d/tac_plus
====================================
0
 

Author Comment

by:ahchun
ID: 11842232
so, I have /etc/logrotate.d/tac_plus
but it can't rotate everyday....it not start rotate.
0
 
LVL 11

Expert Comment

by:lbertacco
ID: 11844400
Wait until tomorrow. If still doesn't work it will need some investigation (but I'm going on vacation for one week so I'm not sure I'll be able to help)
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

rdate is a Linux command and the network time protocol for immediate date and time setup from another machine. The clocks are synchronized by entering rdate with the -s switch (command without switch just checks the time but does not set anything). …
Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question