Crontab to output sar stopped automatically


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Crontab to output sar stopped automatically
# 1  
Old 12-30-2008
Crontab to output sar stopped automatically

We have created a crontab to output the sar result as below:
0,5,10,15,20,25,30,35,40,45,50,55 * * * * /usr/lib/sa/sa1

However, the sar output was being truncated off, meaning, rather than capturing the output in an interval of 5 minutes, it stopped at certain hour and will not be resumed. The sar output will only be resumed in the next day. Smilie

Any advice on how to prevent the sar output from being truncated off? Please advise. Thanks
# 2  
Old 12-31-2008
Version of unix?

1) Check disc space in /usr/adm/sa - or wherever your sa1 is writing sa* data files. Important to cd to the directory and do a disc space enquiry there. Some systems have links to /var though the scripts refer to /usr .
System accounting will stop if disc space is low.

2) Consider maintaining the sa* data files. This is usually done in the reporting script /usr/adm/sa/sa2 . Read the script before executing because default behaviour can be to delete sar* and sa* after only 7 days.

3) I assume that your truncation is visible with "sar -f /usr/adm/sa/sa.. " command rather than when reading a /usr/adm/sa/sar.. report. If it is in the sar report, try looking at the time parameters in the sa2 cron.
# 3  
Old 01-04-2009
Our server is running on Solaris version 9 platform.

I have used du -h to check the utilisation of /usr/adm/sa and found that it is only using 27M. This directory only contain the output of sa (from sa01 to sa31).

Was unable to locate the /usr/adm/sa/sa2 script.

The output of "sar -f /usr/adm/sa/sa.." is also being truncated off even though its file size is same as other days Smilie

Kindly advise. Thanks
# 4  
Old 01-05-2009
See "man sadc" for location of the sa1/sa2 etc. scripts and example crons.
I suspect that you need to maintain the /usr/adm/sa/saxx files such that you are not trying to append to them the next month.
Beware that the sa1 and sa2 scripts are really just examples and you can make your own to suit your requirements. Beware that most versions of sa2 delete sa data files after only 7 days.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

Sar output

I am facing situation where sar -u command is showing 0 for all cps, so does it mean all the cpus are fully utilized, os is oracle Linux 6.8 01:34:13 PM all 0 0 0 0 0.00 0 (2 Replies)
Discussion started by: manoj.solaris
2 Replies

2. Solaris

Odd output from sar

We're experiencing some intermittent freezes on one of our systems and I'm trying to figure out what is happening. We're running Solaris 10 zones mounting shares from netapp through nfs. On the zone that freezes we have sar running and are getting this output: SunOS prodserver 5.10... (3 Replies)
Discussion started by: Jyda
3 Replies

3. Shell Programming and Scripting

Extract info from sar output

Hi I have an output of sarcommand which is as follows: 10:22:18 bread/s lread/s %rcache bwrit/s lwrit/s %wcache pread/s pwrit/s 10:23:18 0 398 100 5 13 64 0 0 10:24:18 0 332 100 5 15 65 0 0 10:25:18 0 ... (7 Replies)
Discussion started by: fretagi
7 Replies

4. Shell Programming and Scripting

Scheduled job not running automatically in crontab

i have a job scheduled in crontab. The problem is, it is not running automatically as per the time scheduled. But runs when executed manually. What would be the problem? Help me with this please. (6 Replies)
Discussion started by: Santhosh CJ
6 Replies

5. Solaris

sar output

One of my servers giving all zero sar output. Could anyone explain this behaviour. Thanks CHaandana Sample: 10:43:37 %usr %sys %wio %idle 16:15:01 2 1 0 97 16:20:02 2 1 0 97 16:25:02 2 1 0 97 16:30:01 ... (3 Replies)
Discussion started by: chaandana
3 Replies

6. Solaris

Strange sar output

I was reviewing yesterday's sar file and came across this strange output! What in the world? Any reason why there's output like that? SunOS unixbox 5.10 Generic_144488-07 sun4v sparc SUNW,T5240 Solaris 00:00:58 device %busy avque r+w/s blks/s avwait avserv 11:20:01 ... (4 Replies)
Discussion started by: dangral
4 Replies

7. Solaris

extraction of sar output

Hi, Anyone knows how to extract sar command output to excel or Is there any free grapical tools to extract this sar log file. thanks, regards (2 Replies)
Discussion started by: vijill
2 Replies

8. Shell Programming and Scripting

sar today's output

Hi All, i tried sar command the output appears to be for several days I would like to just see today's SAR output: Please advice me. $sar Linux 2.6.9-67.ELsmp (lrtp50) 02/28/09 00:00:01 CPU %user %nice %system %iowait %idle 00:05:02 all 3.10... (4 Replies)
Discussion started by: raghur77
4 Replies

9. Shell Programming and Scripting

Stopped (tty output)

What is mean by "Stopped (tty output)", how can i get rid of it. (3 Replies)
Discussion started by: Chandu
3 Replies

10. Shell Programming and Scripting

sar -q output for one processor

Hello, We like to know if there is a way to report the sar -q per processor on AIX 4.3 . Please help RGDS,Elie. (1 Reply)
Discussion started by: eyounes
1 Replies
Login or Register to Ask a Question