Sponsored Content
Full Discussion: sar logs in /var/adm/sa
Operating Systems Solaris sar logs in /var/adm/sa Post 302137884 by RobSand on Thursday 27th of September 2007 10:33:35 AM
Old 09-27-2007
sar logs in /var/adm/sa

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

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!

Sincerely,

Rob Sandifer
 

10 More Discussions You Might Find Interesting

1. Solaris

/var/adm/messages- Help

Solaris 8/ sun 420R Checked /var/adm/messages file and got the following message: Dec 4 16:40:05 serverXYZ ConfigProvider: get_pkg_instdate: getdate failed for the standard C locale (7) Does anyone know what this means? Looked up getdate but do not understand.... Thanks. (1 Reply)
Discussion started by: finster
1 Replies

2. Solaris

/var/adm/loginlog

As root I have created the loginlog file in /var/adm with permissions (r and w) for root:root only. Failed attempts(> 5) to log in as root do not get logged in the file. What am I missing?? I am on a Solaris 8 Box. :confused: :confused: :confused: (4 Replies)
Discussion started by: encrypted
4 Replies

3. UNIX for Dummies Questions & Answers

var/adm/cron

Hi, Here im using WinSCP and looking into the remote dir var/adm/cron and I get the following error.Is this bcoz i dont have admin privileges: Cannot get real path for '/var/adm/cron'. Unexpected OK response. Error code: 0 Error message from server: Success Request code: 16 BTW im... (1 Reply)
Discussion started by: thumsup9
1 Replies

4. AIX

AIX and cron logs filtering ?: /etc/cronlog.conf, /var/adm/cron/log

Hi, I can use 'crontabs –e' and do all the scheduling I like. However I would like to auto send myself just the cronjobs logs that fail. That is to say the PIDs that fail and the related lines with those PID’s only. (Not the full set of logs) Has anyone done this work? Or does an AIX 5.3 tool... (0 Replies)
Discussion started by: Keith Johnson
0 Replies

5. Solaris

/var/adm/messages

Hello Friends, I am geting the folowing error in /var/adm/message is it disl related problem? if yes.. how to check all the disk are perfect or not? Sep 15 06:01:12 scsi: WARNING: /pci@1f,700000/scsi@2/sd@2,0 (sd7): Sep 15 06:01:12 Error for Command: write(10) Error Level:... (5 Replies)
Discussion started by: bullz26
5 Replies

6. Solaris

diff b/w /var/log/syslog and /var/adm/messages

hi sirs can u tell the difference between /var/log/syslogs and /var/adm/messages in my working place i am having two servers. in one servers messages file is empty and syslog file is going on increasing.. and in another servers message file is going on increasing but syslog file is... (2 Replies)
Discussion started by: tv.praveenkumar
2 Replies

7. Shell Programming and Scripting

trying get the last /var/adm/messages

grep \"^`date "+%b %d %T"`\" /var/adm/messages | egrep \"emerg|alert|crit|err|warning\ but get an output like this ksh: alert: not found ksh: crit: not found ksh: err: not found ksh: warning": not found grep: can't open "19" grep: can't open "16:27:16"" (1 Reply)
Discussion started by: arch12
1 Replies

8. Solaris

/var/adm & /var/sadm

what is the difference between tha /var/adm and /var/sadm files in solaris 10 Os please can any one respond quickly thanking you (2 Replies)
Discussion started by: wkbn86
2 Replies

9. Solaris

Difference between /var/log/syslog and /var/adm/messages

Hi, Is the contents in /var/log/syslog and /var/adm/messages are same?? Regards (3 Replies)
Discussion started by: vks47
3 Replies

10. Solaris

Maintaining SA logs /var/adm/sa/

Hi all, I have enable sar and the sa cron jobs in the sys account. I would like to however, keep only 1 month of data. Can i check for Solaris10, does sa2 do automatic purging of logs in /var/adm/sa/ that are 1 week old ? -- Answer = yes ( in "/usr/lib/sa/sa2" if you open the script,... (2 Replies)
Discussion started by: javanoob
2 Replies
SA2(8)								Linux User's Manual							    SA2(8)

NAME
sa2 - Write a daily report in the /var/log/sa directory. SYNOPSIS
/usr/lib64/sa/sa2 DESCRIPTION
The sa2 command is a shell procedure variant of the sar command which writes a daily report in the /var/log/sa/sardd file, where the dd parameter indicates the current day. The sa2 command handles all of the flags and parameters of the sar command. The sa2 command is designed to be started automatically by the cron command. EXAMPLES
To run the sa2 command daily, place the following entry in your root or adm crontab file: 5 19 * * 1-5 /usr/lib64/sa/sa2 -A & This will generate a daily report called /var/log/sa/sardd It will also remove reports more than one week old. FILES
/var/log/sa/sardd Indicate the daily report file, where the dd parameter is a number representing the day of the month. AUTHOR
Sebastien Godard (sysstat <at> orange.fr) SEE ALSO
sar(1), sadc(8), sa1(8), sadf(1) http://pagesperso-orange.fr/sebastien.godard/ Linux AUGUST 2010 SA2(8)
All times are GMT -4. The time now is 06:55 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy