The UNIX and Linux Forums

The UNIX and Linux Forums (http://www.unix.com/index.php)
-   Solaris (http://www.unix.com/solaris/)
-   -   rotating a log yearly (http://www.unix.com/solaris/134793-rotating-log-yearly.html)

lwif 04-20-2010 11:33 AM

rotating a log yearly
 
Hi,

I am having some troubles using /usr/sbin/logadm to rotate sulog yearly. Can someone please assist with the correct syntax to rotate the sulog yearly? I'd like to maintain up to 3 years of logs.

I am on Solaris 10.

Thanks,

RTM 04-22-2010 12:20 PM

I won't know if this actually works due to the fact that our logs are changed out by a script (and by logadm - great, now I have to see if they are messing with each other)...but in reading the logadm man page, this looks like it would work to change the log every year, and keep 3 years worth...hope you have disk space!

Code:

# logadm -w /var/adm/sulog -A 3y -p 1y
(This is assuming there are no other entries for sulog in the /etc/logadm.conf already and that no one runs the logadm command to get rid of old files throughout the 3 years...or does a rm command, mv command,...etc.)

Let us know in 2013 how it worked! :)


All times are GMT -4. The time now is 05:07 AM.

Linux and Unix Supported by: vBulletin
Search Engine Optimisation provided by DragonByte SEO v1.1.4 (Pro) - vBulletin Mods & Addons Copyright © 2014 DragonByte Technologies Ltd.
The UNIX and Linux Forums Content Copyright ©1993-2013. All Rights Reserved.
Forum Operations by The UNIX and Linux Forums