Unix/Linux Go Back    

Solaris The Solaris Operating System, usually known simply as Solaris, is a Unix-based operating system introduced by Sun Microsystems. The Solaris OS is now owned by Oracle.

sar logs in /var/adm/sa


Thread Tools Search this Thread Display Modes
Old Unix and Linux 09-27-2007   -   Original Discussion by RobSand
RobSand RobSand is offline
Registered User
Join Date: Sep 2007
Last Activity: 26 November 2010, 9:51 PM EST
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts
sar logs in /var/adm/sa

I recently enabled sar (system activity recorder tool) on a Solaris 10 sparc

The performance "logs" being recorded in /var/adm/sa
are getting quite large, quite quickly! How do I rotate these logs so I keep 7 days worth of logs and everything else gets automatically deleted? I suspect this is done in the crontab file. Here are the contents of my crontab file:

0,5,10,15,20,25,30,35,40,45,50,55 * * * 0-6 /usr/lib/sa/sa1
20,40 8-17 * * 1-5 /usr/lib/sa/sa1
5 18 * * 1-5 /usr/lib/sa/sa2 -s 8:00 -e 18:01 -i 1200 -A

I have heard that the line above containing "sa2" is supposed to rotate the logs, but it does not appear to be doing so. Any suggestions are greatly appreciated and thanks ahead of time!


Rob Sandifer
Sponsored Links
Old Unix and Linux 10-03-2007   -   Original Discussion by RobSand
suntac suntac is offline
Registered User
Join Date: Jul 2005
Last Activity: 10 December 2007, 11:32 AM EST
Location: Amsterdam
Posts: 97
Thanks: 0
Thanked 0 Times in 0 Posts
I have no experience with SAR however have you thought about writing a simple script that will do this for you... You could write a script that rotates your logs.... you can also take a look at Freeware for Solaris for the log-rotate utility.

Johan Louwers.
Sponsored Links

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
regarding logs KAREENA18 UNIX Desktop Questions & Answers 3 01-07-2012 02:51 AM
ssh ip logs itik Linux 3 03-08-2010 12:35 PM
Grep yesterday logs from weblogic logs harish.parker Shell Programming and Scripting 3 11-04-2008 09:00 AM
Logs charbel Shell Programming and Scripting 5 05-04-2006 08:59 AM
logs cubicle^dweller UNIX for Dummies Questions & Answers 6 10-29-2002 07:42 PM

All times are GMT -4. The time now is 08:10 AM.