Solved

sysstat not recording historical disk stats

Posted on 2009-03-29
8
4,477 Views
Last Modified: 2013-12-16
Hi All,

Anyone come across the following;

I'm looking at disk stats using sar, if I run `sar -d 5 1` I get the following (trimmed) output.

   Linux 2.6.18-92.1.22.el5         03/29/2009

   05:38:59 PM       DEV       tps  rd_sec/s  wr_sec/s  avgrq-sz  avgqu-sz     await     svctm     %util
   05:39:04 PM    dev8-0      1.20      0.00     28.80     24.00      0.01      5.17      5.17      0.62
   05:39:04 PM   dev8-16      1.20      0.00     28.80     24.00      0.01      8.50      8.50      1.02
   05:39:04 PM    dev9-1      2.80      0.00     22.40      8.00      0.00      0.00      0.00      0.00
   05:39:04 PM    dev9-0      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00

   Average:          DEV       tps  rd_sec/s  wr_sec/s  avgrq-sz  avgqu-sz     await     svctm     %util
   Average:       dev8-0      1.20      0.00     28.80     24.00      0.01      5.17      5.17      0.62
   Average:      dev8-16      1.20      0.00     28.80     24.00      0.01      8.50      8.50      1.02

All seems well so far, however, if I want to look at historical disk stats I type `sar -d -f /var/log/sa/sa28` for example but I get:-
   # sar -d -f /var/log/sa/sa28
   Requested activities not available in file

The cron job runs `sa2 -A` which should record the disk information.

Is there a bug in sysstat? I can't seem to find anything on the net about it...


O/S Centos 5.2 (updated)
sysstat = sysstat-7.0.2-1.el5



0
Comment
Question by:jools
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 2
8 Comments
 
LVL 7

Accepted Solution

by:
martin_2110 earned 500 total points
ID: 24016349
There is no bug it is turned off by default.
You need to insert  "-d"  to the follwing lines in /usr/lib64/sa/sa1 (or /usr/lib/sa/sa1) on a 32 bit system
        exec ${ENDIR}/sadc -d -F -L 1 1 -
        exec ${ENDIR}/sadc -d -F -L $* -

You also need to empty the current days database file /var/log/sa28 (<- day of the month)
the next time sar runs you should be able to run sar -d
0
 
LVL 19

Author Comment

by:jools
ID: 24018474
According to the man page, -A includes the `d` option....
where did you get it was turned off by default btw?

0
 
LVL 7

Expert Comment

by:martin_2110
ID: 24022789
0
The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

 
LVL 19

Author Comment

by:jools
ID: 24023782
It does not match the man page information;

OPTIONS
       -A     This is equivalent to specifying -bBcdqrRuvwWy -I SUM -I XALL -n ALL -P ALL.

The sa2 command is specified in the cron job with the -A which should include the `d` option.

Running `sar -A 5 5` from the command line produces all the disk output, when it is run from cron under sa2 it is not. The man page for sa2 says in the description that it uses all the flags and options of sar.


0
 
LVL 19

Author Comment

by:jools
ID: 24023828
:-|

oh dear......


I was looking at the wrong line in the cron.d file.... it seems I should have been looking at sa1 which runs every 10 minutes and sa1 is the equivalent of sadc which does, by default, ignore disk stats.

sa2 does summat else and I'm so annoyed I really can be bothered to type `man` again.....

I think I'm getting too old for this stuff...

Thx

J
0
 
LVL 19

Author Comment

by:jools
ID: 24023837
Crontab added for future reference


# run system activity accounting tool every 10 minutes
*/10 * * * * root /usr/lib/sa/sa1 -d 1 1
# generate a daily summary of process accounting at 23:53
53 23 * * * root /usr/lib/sa/sa2 -A

Open in new window

0
 
LVL 19

Author Comment

by:jools
ID: 24023857
upping points cos I can :-)
0
 
LVL 19

Author Closing Comment

by:jools
ID: 31564068
Not exactly my fix but did make me think. Upped points for helpfulness, grade B because...well.... because I'm old and grumpy!
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question