Sebastien GODARD [Fri, 18 Mar 2016 13:41:07 +0000 (14:41 +0100)]
SVG: Add SVG output for CPU statistics
Each CPU (including CPU "all") has a bar graph, with each metric being
cumulative.
At the present time, %idle is not displayed because I think the graph is
much more readable without it. But an SVG option to display it will
possibly be added in the future.
Sebastien GODARD [Sat, 12 Mar 2016 10:27:30 +0000 (11:27 +0100)]
sar: Fix possible compatibility issues between sysstat versions
Fix an issue that made sar unable to read statistics for network
and disk devices from a datafile created by a more recent version of
sysstat when the size of the structures used to save those statistics
was greater than that of the current version.
This may be the case when eg. new fields are appended to network or disk
structures.
Sebastien GODARD [Sat, 12 Mar 2016 09:54:22 +0000 (10:54 +0100)]
SVG: Remove decimals in Y graduations for bar graphs
Bar graphs are used to display metrics expressed as percentage values.
Graduations on the Y axis are fixed values (0, 25, 50, 75 and 100) that
don't need to be decimal numbers (0.00, 25.00, ...)
Commit f5d9bce dealt with network interfaces that can be dynamically
registered or unregistered in /proc/net/dev. But it assumed that network
interfaces appear always at the same position in the /proc/net/dev file.
As this is not necessarily the case, this patch makes sure that we
update the right graph corresponding to the same network interface.
Sebastien GODARD [Fri, 11 Mar 2016 16:54:57 +0000 (17:54 +0100)]
Fix possible confusion among network interfaces
Some wrong statistics could have been displayed when a new network
interface was dynamically registered and appeared in the middle of
the list of existing interfaces in /proc/net/dev.
This patch fixes this problem (that hardly ever happens), and
removes some redundant lines of code.
Sebastien GODARD [Fri, 11 Mar 2016 09:34:22 +0000 (10:34 +0100)]
SVG: Add graph for %ifutil metrics
Add a graph for the last metrics from network activity (%ifutil).
This a new type of graph (bar graph, whereas previous graphs were line
graphs) which will be used for all metrics expressed as percentage
values.
Network interfaces may be dynamically registered or unregistered.
That is to say they can appear in the /proc/net/dev file when
the corresponding device is connected, and also disappear when
the device is removed.
This patch tries to handle this so that graphs are drawn for
the interfaces which are connected on the fly. Graphs are drawn only
when the device is actually connected, which means that they may be
discontinuous if the device is connected, then disconnected, then
reconnected again, just like when a system restart occurrs.
At the present time, this patch assumes that the devices are always at
the same position in /proc/net/dev, which is not necessarily the case.
This will be fixed later.
SVG: Draw txkB/s and rxkB/s network metrics to scale
The metrics are expressed in kB/s whereas the corresponding counters are
saved in B/s. So recalculate min and max values in kB/s before drawing
graphs.
Sebastien GODARD [Wed, 24 Feb 2016 10:47:07 +0000 (11:47 +0100)]
SVG: Explicitly pass structures to be compared
The structures which will be scanned to check for min/max values need to
be explicitly passed to save_extrema() function. Indeed, for activities
with several items (eg. network statistics), we will need to scan each
item structure independently.
Sebastien GODARD [Mon, 22 Feb 2016 17:26:34 +0000 (18:26 +0100)]
SVG: Init newly allocated strings
Graph definition is made of successive SVG "path" commands concatenated
together. Make sure that the strings allocated to receive these definitions
are initialized before being used.
Sebastien GODARD [Fri, 19 Feb 2016 09:37:05 +0000 (10:37 +0100)]
SVG: Add SVG output for task creation and system switching activity.
Update sadf's SVG ouptput to create graphs for task creation and system
switching activity (this corresponds to the output of sar -w).
This is just a proof of concept.
Try it with "sadf -g /your/sa/datafile -- -w > out.html" and open
the resulting HTML file in your web browser.
Sebastien GODARD [Mon, 15 Feb 2016 16:36:48 +0000 (17:36 +0100)]
Add new FO_NO_TRUE_TIME flag
Define a new flag indicating that the timestamp cannot be displayed in
the original local time of the data file creator.
This flag will be used by the SVG output format, which also means that
the user won't be able to use sadf's option -t with this format.
read_next_sample() function didn't fill the timestamp for special
records (COMMENT or RESTART ones) that had to be ignored.
So add a new flag (SET_TIMESTAMPS) to tell read_next_sample() function
to set the timestamps for special records when this is needed.
Sebastien GODARD [Tue, 26 Jan 2016 21:43:23 +0000 (22:43 +0100)]
JSON: Don't display fchosts tag when no stats exist
The JSON print function can be called for A_NET_FC (Fibre Channel)
activity even if no statistics exist. This is because this activity has
the AO_CLOSE_MARKUP flag used to close the "network" section of the
output. Anyway, in this case (when no stats exist), it should only do
that (close the network section) et not display the "fchost" tag.
Sebastien GODARD [Mon, 25 Jan 2016 07:24:17 +0000 (08:24 +0100)]
Move JSON specific code to its corresponding function
A bit of code was specific to JSON output. So move this code to the
f_timestamp function used by JSON output format, so that the main code
remains generic.
Sebastien GODARD [Fri, 22 Jan 2016 12:57:42 +0000 (13:57 +0100)]
Move format specific code to its corresponding function
Incrementing tab variable was specific to XML output. So move this code
to the f_timestamp function used by XML output format, so that thee main
code remains generic.
Sebastien GODARD [Sat, 26 Dec 2015 09:03:26 +0000 (10:03 +0100)]
Starting sysstat 11.3.1
Update sysstat number in configure script.
This version is the first one of the new 11.3 development series,
including all the new features in addition to the bugfixes included
in the 11.2 stable series.
Sebastien GODARD [Fri, 18 Dec 2015 08:23:22 +0000 (09:23 +0100)]
sadf: Fix bug preventing sadf from converting an old format datafile
Version 11.1.5 added a check on file_magic.header_size present in the
header of a data file.
An error message should not be displayed if this check is not successful
when sadf is used to convert the data file (sadf -c) or used to display
its header contents (sadf -H).
Sebastien GODARD [Sat, 12 Dec 2015 10:36:54 +0000 (11:36 +0100)]
sar: Check for items upper limit before reading a datafile
Commit 7ebfd7e added a check for items upper limit used by sadc before
appending data to a file.
This commit adds the same kind of check used by sar before reading a
data file.