The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Operating Systems > Linux > Red Hat
.
google unix.com



Red Hat Red Hat is the world's leading open source technology solutions provider with offerings including Red Hat Enterprise Linux (RHEL), Fedora, open source applications, security and systems management, virtualization, and Services Oriented Architecture (SOA) solutions.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Pls Help me out ... I want to check process status at regular intervals of time srinivasvandana Shell Programming and Scripting 5 08-02-2008 04:44 AM
eCos real-time OS makes short work of building a SAN appliance iBot UNIX and Linux RSS News 0 12-01-2007 11:05 AM
mailing myself at regular intervals... timepassman Shell Programming and Scripting 4 08-21-2005 09:11 PM
Date Intervals yongho Shell Programming and Scripting 7 07-29-2005 05:19 PM
How to perform Date Intervals? yongho Shell Programming and Scripting 2 06-21-2005 12:02 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 10-23-2008
mschwage mschwage is offline
Registered User
  
 

Join Date: Jul 2005
Location: Oak Park, IL
Posts: 102
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
  #2 (permalink)  
Old 10-24-2008
Annihilannic Annihilannic is offline Forum Advisor  
  
 

Join Date: May 2008
Location: Sydney, Australia
Posts: 1,009
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.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 11:41 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0