Sponsored Content
Operating Systems Linux Red Hat How do sa1/sar time intervals work? Post 302250631 by Annihilannic on Thursday 23rd of October 2008 11:15:59 PM
Old 10-24-2008
Did you add this cron job yourself, or did you just use the one that was installed by sysstat (usually in /etc/cron.d/sysstat)? Maybe there's another job running that's recording data every 10 minutes.

You shouldn't see 3 entries every x minutes anyway... the 3 just means that it should write 3 entries 20 minutes apart. i.e. first cron job of the day runs at 08:00, collects data for 1200 seconds, writes an entry, collects data for 1200 seconds, writes second entry, collects data for 1200 seconds, writes third entry and exits... at which time it would be 09:00 when the next cron job kicks in and repeats the exercise.

So the only mystery here is why it's recording at 10 minute intervals... unless sar insists on reporting in 10 minute intervals by default, but I didn't think it could do that unless the data was actually recorded with that frequency.
 

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
sar(1M) 						  System Administration Commands						   sar(1M)

NAME
sar, sa1, sa2, sadc - system activity report package SYNOPSIS
/usr/lib/sa/sadc [ t n] [ofile] /usr/lib/sa/sa1 [ t n] /usr/lib/sa/sa2 [-aAbcdgkmpqruvwy] [-e time] [-f filename] [-i sec] [-s time] DESCRIPTION
System activity data can be accessed at the special request of a user (see sar(1)) and automatically, on a routine basis, as described here. The operating system contains several counters that are incremented as various system actions occur. These include counters for CPU utilization, buffer usage, disk and tape I/O activity, TTY device activity, switching and system-call activity, file-access, queue activ- ity, inter-process communications, and paging. For more general system statistics, use iostat(1M), sar(1), or vmstat(1M). sadc and two shell procedures, sa1 and sa2, are used to sample, save, and process this data. sadc, the data collector, samples system data n times, with an interval of t seconds between samples, and writes in binary format to ofile or to standard output. The sampling interval t should be greater than 5 seconds; otherwise, the activity of sadc itself may affect the sam- ple. If t and n are omitted, a special record is written. This facility can be used at system boot time, when booting to a multi-user state, to mark the time at which the counters restart from zero. For example, when accounting is enabled, the svc:/sys- tem/sar:default service writes the restart mark to the daily data file using the command entry: su sys -c "/usr/lib/sa/sadc /var/adm/sa/sa'date +%d'" The shell script sa1, a variant of sadc, is used to collect and store data in the binary file /var/adm/sa/sadd, where dd is the current day. The arguments t and n cause records to be written n times at an interval of t seconds, or once if omitted. The following entries in /var/spool/cron/crontabs/sys will produce records every 20 minutes during working hours and hourly otherwise: 0 * * * 0-6 /usr/lib/sa/sa1 20,40 8-17 * * 1-5 /usr/lib/sa/sa1 See crontab(1) for details. The shell script sa2, a variant of sar, writes a daily report in the file /var/adm/sa/sardd. See the OPTIONS section in sar(1) for an explanation of the various options. The following entry in /var/spool/cron/crontabs/sys will report important activities hourly during the working day: 5 18 * * 1-5 /usr/lib/sa/sa2 -s 8:00 -e 18:01 -i 1200 -A FILES
/tmp/sa.adrfl address file /var/adm/sa/sadd Daily data file /var/adm/sa/sardd Daily report file /var/spool/cron/crontabs/sys ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWaccu | +-----------------------------+-----------------------------+ SEE ALSO
crontab(1), sag(1), sar(1), svcs(1), timex(1), iostat(1M), svcadm(1M), vmstat(1M), attributes(5), smf(5) System Administration Guide: Basic Administration NOTES
The sar service is managed by the service management facility, smf(5), under the service identifier: svc:/system/sar Administrative actions on this service, such as enabling, disabling, or requesting restart, can be performed using svcadm(1M). The ser- vice's status can be queried using the svcs(1) command. SunOS 5.10 20 Aug 2004 sar(1M)
All times are GMT -4. The time now is 11:08 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy