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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
01-03-2017, 11:35 AM
|
#1
|
Member
Registered: Sep 2003
Location: Texas
Distribution: Red Hat/CentOS
Posts: 302
Rep:
|
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:
- 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
- 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
- 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".
- From the new window that appears, I choose the "Delimited" radio button and click Next
- I choose the "Comma" checkbox and click Next
- "Column Data Format" should be set to General so I click Finish
- I now insert a new line above it all for the following headers:
Hostname | Interval | Time | TPS | Reads/sec | Writes/sec | bread | bwrit
- While still in Excel, I click the Charts ribbon, highlight all data and choose Scatter->Smooth Marked Scatter.
- 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.
|
|
|
01-12-2017, 09:48 AM
|
#2
|
Member
Registered: Sep 2003
Location: Texas
Distribution: Red Hat/CentOS
Posts: 302
Original Poster
Rep:
|
Huh... No one, eh?
|
|
|
01-12-2017, 10:05 AM
|
#3
|
Moderator
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,914
|
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?
|
|
|
01-12-2017, 11:28 AM
|
#4
|
Member
Registered: Sep 2003
Location: Texas
Distribution: Red Hat/CentOS
Posts: 302
Original Poster
Rep:
|
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
|
|
|
All times are GMT -5. The time now is 10:19 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|