[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

sysstat not recording historical disk stats

Posted on 2009-03-29
8
Medium Priority
?
4,534 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 1500 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
Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

 
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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Suggested Courses

650 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