LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-03-2017, 11:35 AM   #1
loadedmind
Member
 
Registered: Sep 2003
Location: Texas
Distribution: Red Hat/CentOS
Posts: 302
Blog Entries: 4

Rep: Reputation: Disabled
sar disk io output


Hello all. As I'm sure most of you have something similar setup, I'm using the sysstat suite to monitor performance of some machines. I understand that the sar command can isolate particular values for more detailed criteria such as Disk I/O. The goal is to provide Disk I/O in a pretty line graph for management and power users to review in an upcoming meeting. The issue I'm having is while attempting to interpret the resulting graph data within Excel. Here's what I've done thus far:
  1. I've told sysstat to log the max history which is 30 days. Then, I use the following command to provide output of said disk I/O from the first day:
    Code:
    sar -b -f /var/log/sa/sa01
  2. From here, I use sadf to output to Excel-friendly format:
    Code:
    sadf -d /var/log/sa/sa01 -- -b | sed 's/;/,/g' > storage01_diskio_1-3-17.csv
    For the curious, here's what the output looks like, raw:
    Code:
    storage01,599,2017-01-01 06:10:01 UTC,1.39,0.00,1.39,0.00,26.92
    storage01,600,2017-01-01 06:20:01 UTC,1.32,0.00,1.32,0.00,25.02
    storage01,600,2017-01-01 06:30:01 UTC,1.32,0.00,1.32,0.00,24.57
    storage01,600,2017-01-01 06:40:01 UTC,1.51,0.05,1.46,1.63,28.13
    storage01,600,2017-01-01 06:50:01 UTC,1.41,0.00,1.41,0.00,26.20
    storage01,600,2017-01-01 07:00:01 UTC,1.36,0.00,1.36,0.00,25.29
    storage01,600,2017-01-01 07:10:01 UTC,1.37,0.00,1.37,0.00,26.09
    storage01,600,2017-01-01 07:20:01 UTC,1.33,0.01,1.33,0.04,24.67
    storage01,600,2017-01-01 07:30:01 UTC,1.37,0.00,1.37,0.00,25.04
    storage01,600,2017-01-01 07:40:01 UTC,1.42,0.00,1.42,0.00,25.33
    storage01,600,2017-01-01 07:50:01 UTC,1.32,0.00,1.32,0.00,24.48
    storage01,600,2017-01-01 08:00:01 UTC,1.37,0.00,1.37,0.00,25.00
    storage01,600,2017-01-01 08:10:01 UTC,1.39,0.00,1.39,0.00,25.19
    storage01,600,2017-01-01 08:20:01 UTC,1.39,0.00,1.39,0.00,24.84
    storage01,600,2017-01-01 08:30:01 UTC,1.36,0.00,1.36,0.00,25.16
    storage01,600,2017-01-01 08:40:01 UTC,1.41,0.00,1.41,0.00,25.65
    storage01,599,2017-01-01 08:50:01 UTC,1.33,0.00,1.33,0.00,24.62
    storage01,600,2017-01-01 09:00:01 UTC,1.36,0.00,1.36,0.00,24.68
    storage01,600,2017-01-01 09:10:01 UTC,1.52,0.01,1.51,0.09,27.80
    storage01,600,2017-01-01 09:20:01 UTC,1.34,0.01,1.33,0.04,24.44
    storage01,600,2017-01-01 09:30:01 UTC,1.41,0.00,1.41,0.00,25.35
    storage01,600,2017-01-01 09:40:01 UTC,1.37,0.00,1.37,0.00,25.07
    storage01,600,2017-01-01 09:50:01 UTC,1.34,0.00,1.34,0.00,24.19
    storage01,600,2017-01-01 10:00:01 UTC,1.38,0.00,1.38,0.00,24.65
    storage01,600,2017-01-01 10:10:01 UTC,605.99,554.65,51.34,6704.93,20238.52
    storage01,600,2017-01-01 10:20:01 UTC,1.43,0.00,1.43,0.00,25.04
    storage01,600,2017-01-01 10:30:01 UTC,21.78,19.00,2.78,187.34,128.99
    storage01,600,2017-01-01 10:40:01 UTC,41.15,21.98,19.17,175.94,221.15
    storage01,600,2017-01-01 10:50:01 UTC,1.50,0.00,1.50,0.04,26.61
    storage01,600,2017-01-01 11:00:01 UTC,1.48,0.00,1.48,0.00,25.67
    storage01,600,2017-01-01 11:10:01 UTC,1.49,0.00,1.49,0.00,26.84
    storage01,600,2017-01-01 11:20:01 UTC,1.38,0.00,1.38,0.00,24.81
    storage01,600,2017-01-01 11:30:01 UTC,1.43,0.00,1.43,0.00,25.07
    storage01,600,2017-01-01 11:40:01 UTC,1.43,0.00,1.43,0.00,25.25
    storage01,600,2017-01-01 11:50:01 UTC,1.39,0.00,1.39,0.00,25.39
    storage01,600,2017-01-01 12:00:01 UTC,1.40,0.00,1.40,0.00,24.80
    storage01,600,2017-01-01 12:10:01 UTC,1.46,0.00,1.46,0.00,26.41
    storage01,599,2017-01-01 12:20:01 UTC,1.38,0.00,1.38,0.00,25.30
    storage01,600,2017-01-01 12:30:01 UTC,1.43,0.00,1.43,0.00,25.80
    storage01,600,2017-01-01 12:40:01 UTC,1.42,0.00,1.42,0.00,26.21
    storage01,600,2017-01-01 12:50:01 UTC,1.37,0.00,1.37,0.00,24.67
    storage01,600,2017-01-01 13:00:01 UTC,1.42,0.00,1.42,0.00,25.52
    storage01,600,2017-01-01 13:10:01 UTC,1.45,0.00,1.45,0.00,25.95
    storage01,600,2017-01-01 13:20:01 UTC,1.40,0.00,1.40,0.00,25.46
    storage01,600,2017-01-01 13:30:01 UTC,1.39,0.00,1.39,0.00,25.09
    storage01,600,2017-01-01 13:40:01 UTC,1.36,0.00,1.36,0.00,24.73
    storage01,600,2017-01-01 13:50:01 UTC,1.39,0.00,1.39,0.00,25.68
    storage01,600,2017-01-01 14:00:01 UTC,1.37,0.00,1.37,0.00,23.99
    storage01,600,2017-01-01 14:10:01 UTC,1.48,0.00,1.48,0.00,27.28
    storage01,600,2017-01-01 14:20:01 UTC,1.44,0.00,1.44,0.00,25.65
    storage01,600,2017-01-01 14:30:01 UTC,1.44,0.00,1.44,0.00,25.32
    storage01,600,2017-01-01 14:40:01 UTC,1.44,0.00,1.44,0.00,25.64
    storage01,600,2017-01-01 14:50:02 UTC,1.40,0.00,1.40,0.00,24.97
    storage01,599,2017-01-01 15:00:01 UTC,1.50,0.00,1.50,0.00,26.81
    storage01,600,2017-01-01 15:10:01 UTC,1.43,0.00,1.43,0.00,26.32
    storage01,600,2017-01-01 15:20:01 UTC,1.42,0.00,1.42,0.00,25.36
    storage01,600,2017-01-01 15:30:01 UTC,1.44,0.00,1.44,0.00,25.60
    storage01,600,2017-01-01 15:40:01 UTC,1.42,0.00,1.42,0.00,25.11
    storage01,600,2017-01-01 15:50:01 UTC,1.39,0.00,1.39,0.00,24.71
    storage01,600,2017-01-01 16:00:01 UTC,1.39,0.00,1.39,0.00,25.01
    storage01,600,2017-01-01 16:10:01 UTC,1.43,0.00,1.43,0.00,25.93
    storage01,600,2017-01-01 16:20:01 UTC,1.41,0.00,1.41,0.00,25.40
    storage01,600,2017-01-01 16:30:01 UTC,1.39,0.00,1.39,0.00,25.35
    storage01,600,2017-01-01 16:40:01 UTC,1.37,0.00,1.37,0.00,24.69
    storage01,600,2017-01-01 16:50:01 UTC,1.39,0.00,1.39,0.00,25.75
    storage01,600,2017-01-01 17:00:01 UTC,1.37,0.00,1.37,0.00,24.79
    storage01,600,2017-01-01 17:10:02 UTC,1.50,0.00,1.50,0.00,27.30
    storage01,599,2017-01-01 17:20:01 UTC,1.37,0.00,1.37,0.00,24.56
    storage01,600,2017-01-01 17:30:01 UTC,1.39,0.00,1.39,0.00,25.05
    storage01,600,2017-01-01 17:40:01 UTC,1.39,0.00,1.39,0.00,24.97
    storage01,600,2017-01-01 17:50:01 UTC,1.33,0.00,1.33,0.00,24.20
    storage01,600,2017-01-01 18:00:01 UTC,1.39,0.00,1.39,0.00,25.03
    storage01,600,2017-01-01 18:10:01 UTC,1.40,0.00,1.40,0.00,25.63
    storage01,600,2017-01-01 18:20:01 UTC,1.46,0.00,1.46,0.00,25.89
    storage01,600,2017-01-01 18:30:01 UTC,1.39,0.00,1.39,0.00,25.31
    storage01,600,2017-01-01 18:40:01 UTC,1.39,0.00,1.39,0.00,24.83
    storage01,600,2017-01-01 18:50:01 UTC,1.29,0.00,1.29,0.00,23.96
    storage01,600,2017-01-01 19:00:01 UTC,1.33,0.00,1.33,0.00,24.56
    storage01,600,2017-01-01 19:10:01 UTC,1.35,0.00,1.35,0.00,25.29
    storage01,600,2017-01-01 19:20:01 UTC,1.47,0.00,1.47,0.00,25.92
    storage01,600,2017-01-01 19:30:01 UTC,1.37,0.00,1.37,0.00,24.84
    storage01,600,2017-01-01 19:40:01 UTC,1.32,0.00,1.32,0.00,24.12
    storage01,599,2017-01-01 19:50:01 UTC,1.32,0.00,1.32,0.00,24.29
    storage01,600,2017-01-01 20:00:01 UTC,1.33,0.00,1.33,0.00,24.56
    storage01,600,2017-01-01 20:10:01 UTC,1.39,0.00,1.39,0.00,26.01
  3. In Excel, I import the data to graph by copying/pasting the output from the previous command. From here, I click the Data ribbon and choose "Text to Columns".
  4. From the new window that appears, I choose the "Delimited" radio button and click Next
  5. I choose the "Comma" checkbox and click Next
  6. "Column Data Format" should be set to General so I click Finish
  7. I now insert a new line above it all for the following headers:
    Hostname | Interval | Time | TPS | Reads/sec | Writes/sec | bread | bwrit
  8. While still in Excel, I click the Charts ribbon, highlight all data and choose Scatter->Smooth Marked Scatter.
  9. Lastly, I choose Layout 1 from "Chart Quick Layouts"

As I understand it, the X axis contains time in seconds (or is this milliseconds?), but I'm not exactly sure what the Y axis defines. My output shows 0 20 40 ... in intervals of 20 up to 160. Is this also seconds? I realize I can use gnuplot, but management much prefers Excel charts so I'm making do with what I have. Also, if you do this differently, please share your process in case it can be done more efficiently as I'm sure I'm going about this the long way. Thanks for any/all feedback.
 
Old 01-12-2017, 09:48 AM   #2
loadedmind
Member
 
Registered: Sep 2003
Location: Texas
Distribution: Red Hat/CentOS
Posts: 302

Original Poster
Blog Entries: 4

Rep: Reputation: Disabled
Huh... No one, eh?
 
Old 01-12-2017, 10:05 AM   #3
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,914
Blog Entries: 13

Rep: Reputation: 4948Reputation: 4948Reputation: 4948Reputation: 4948Reputation: 4948Reputation: 4948Reputation: 4948Reputation: 4948Reputation: 4948Reputation: 4948Reputation: 4948
Well, been subscribed all along but had nothing to say.

I take CSV data and plot it all day long either manually as you say, and then unfortunately using Windows charting utilities in C# because that's the preferred platform for when we plot archived or real-time data to a graphical window.

What you're doing is very normal. Grab the data and plot it. Excel does this fine. Honestly I've never played with any of the Linux alternatives for plotting.

In our cases, a lot of it is biometric sensor data. The Y-axis scalar ranges matter less than the trends which are shown. I.e. an ECG that doesn't look like an ECG is either something wrong with the signal or the patient. The X-axis is very typically time in seconds.

I use 2D line plots and do not try to put any fancy dots, or labeling on them. Further, when you have a mountain of data, for instance 200 Hz of data, changing the representation of the line to be dotted, does absolutely zip because the points are so close together. This however is not a problem in your case if you choose to do this.

Those are my thoughts.

As far as your resolution, I think those time stamps are 10 minutes apart ... 6:10:01, 6:20:01, ... why do you think differently?
 
Old 01-12-2017, 11:28 AM   #4
loadedmind
Member
 
Registered: Sep 2003
Location: Texas
Distribution: Red Hat/CentOS
Posts: 302

Original Poster
Blog Entries: 4

Rep: Reputation: Disabled
Here's a screenshot to help illustrate. I agree, btw. The raw data suggests 10-minute increments. It's the bottom axis (Y) that I'm questioning.
http://linuxslacker.com
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
sar output. manoj.linux Linux - Enterprise 4 06-01-2016 11:31 AM
sar output LinuGeek Linux - General 1 05-22-2014 09:04 AM
sar output understanding of disk activity thllgo Linux - Server 4 10-10-2011 05:12 PM
sar output fernfrancis Linux - Newbie 3 03-21-2011 10:57 AM
output of SAR yusufs Linux - Newbie 7 11-03-2007 04:10 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:19 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration