Sponsored Content
Operating Systems Linux Red Hat How do sa1/sar time intervals work? Post 302250455 by mschwage on Thursday 23rd of October 2008 11:05:14 AM
Old 10-23-2008
How do sa1/sar time intervals work?

Hi,
I have set up sar on my RedHat and Fedora Linux systems. I am running sa1 from cron:

Code:
0 8-17 * * 1-5 /usr/lib/sa/sa1 1200 3 &

The 1200 and 3 parameters tell sa1 to save data every 1200 seconds (== 20 minutes) and to write 3 times.

When I run sar to observe my data, I'll see something like this:
Code:
# sar -A -f /var/log/sa/sa22 | more
Linux 2.6.21-1.3228.fc7 (opchux0011.comp.optiver.com)   10/22/2008

12:00:01 AM    proc/s
12:10:01 AM      0.03
12:20:01 AM      0.03
12:30:01 AM      0.03
12:40:01 AM      0.03
12:50:01 AM      0.03
01:00:01 AM      0.03
01:10:01 AM      0.18
01:20:01 AM      0.03
01:30:01 AM      0.38
01:40:01 AM      0.03
01:50:01 AM      0.03
...

...What gives? Why is it reporting data every 10 minutes? How come I only see 1 entry every 10 minutes, and not 3? I'm confused...

Thanks.
-mschwage
 

9 More Discussions You Might Find Interesting

1. Solaris

Sun Solaris 10 - SA1,2,and 3 PDF's

Dear All, Where can i get the Sun Solaris 10 ( SA 1,2, and 3) in pdf ? (4 Replies)
Discussion started by: viswanadhan
4 Replies

2. AIX

sa1 and sa2

Hi all, does anyone know what is the relationship between sa1 and sa2? Apparently both have to be included to make reporting work. If you include only 1, let's say sa2, the file is created but there's no content inside. Can someone shed some light and also provide examples of sa1 and sa2? Thanks a... (0 Replies)
Discussion started by: smallbook
0 Replies

3. Shell Programming and Scripting

Pls Help me out ... I want to check process status at regular intervals of time

I want to check process status at regular interval of time ... so i ha wirtten this BUT its not working when i placed this peace of code in .sh .. please help me out #!/bin/sh w = ps -ef|grep processname | wc - l echo $w if ; then Banner "Proceesname Problem" else Banner " Running... (5 Replies)
Discussion started by: srinivasvandana
5 Replies

4. UNIX for Dummies Questions & Answers

sar Vs. gnuplot time format

Hi, I want to generate gnuplot graph from sar data. My problem is the time format. 1- Gnuplot doesn't support the sar format (01:00:59 AM/PM) 2- Sar doesn't provide a switch to choose the format. The only way to do it is by exporting LANG=fr_FR. Since I have other apps running and... (0 Replies)
Discussion started by: foxmtl
0 Replies

5. Shell Programming and Scripting

How to work with one directory at a time?

I have a backup folder that has sub folders created daily. Each sub-folder contains files for that specific day. I need to search all those files to see which ones contains a specific phrase. I also need to take that phrase and output to a text file for that day. This can be done with a one liner,... (3 Replies)
Discussion started by: bbbngowc
3 Replies

6. Shell Programming and Scripting

awk work with time change in csv file

Hi, i have csv input file looks like below 3rd field is date and time field i want to change it with user supplied date and time says year=2011 month=09 day=05 hour=11 count=2 when count is say 10 then first ten records should pick and it should increment the... (2 Replies)
Discussion started by: raghavendra.nsn
2 Replies

7. Solaris

sysout from crontab process /usr/lib/sa/sa1

Hi I've found this crontab entry to run sa1 on sunOs box but I don't know where the result of this command is being stored. Is there a standard location for this? I assume the command is supposed to be storing the details somewhere.. Thanks (2 Replies)
Discussion started by: Grueben
2 Replies

8. Shell Programming and Scripting

Awk: time intervals based on epoch time

I have a list of epoch times delimited by "-" as follows: 1335078000 - 1335176700 1335340800 - 1335527400 1335771300 - 1335945600 1336201200 - 1336218000 The corresponding dates are: 20120422 1000 - 20120423 1325 20120425 1100 - 20120427 1450 20120430 1035 - 20120502 1100 ... (3 Replies)
Discussion started by: alex2005
3 Replies

9. OS X (Apple)

'time' does NOT work on a function in 'dash'.

Hi guys and gals... I am writing a piece of code that is dash compliant and came across this error. I have put it in the OSX section as that is what I am using. I have no idea what the 'dash' version is but was installed about 6 months ago. MBP, OSX 10.12.6, default terminal running dash on... (4 Replies)
Discussion started by: wisecracker
4 Replies
SA1(8)								Linux User's Manual							    SA1(8)

NAME
sa1 - Collect and store binary data in the system activity daily data file. SYNOPSIS
/usr/lib/sa/sa1 [ interval count ] DESCRIPTION
The sa1 command is a shell procedure variant of the sadc command and handles all of the flags and parameters of that command. The sa1 com- mand collects and store binary data in the /var/log/sa/sadd file, where the dd parameter indicates the current day. The interval and count parameters specify that the record should be written count times at interval seconds. If you do not specify these parameters, a single record is written. The sa1 command is designed to be started automatically by the cron command. EXAMPLES
To create a daily record of sar activities, place the following entry in your root or adm crontab file: 0 8-18 * * 1-5 /usr/lib/sa/sa1 1200 3 & FILES
/var/log/sa/sadd Indicate the daily data file, where the dd parameter is a number representing the day of the month. AUTHOR
Sebastien Godard <sebastien.godard@wanadoo.fr> SEE ALSO
sar(1), sadc(8), sa2(8), mpstat(1), iostat(1), vmstat(8) http://perso.wanadoo.fr/sebastien.godard/ Linux DECEMBER 1999 SA1(8)
All times are GMT -4. The time now is 06:17 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy