Sebastien GODARD [Mon, 11 May 2020 13:43:15 +0000 (15:43 +0200)]
sa1: Insert a comment in daily datafile on system suspend/resume
Add a new option ("--sleep") to sa1 so that a comment can be inserted in
current daily datafile on system suspend/resume.
This comment can then be displayed using sar's option -C.
E.g.:
$ sar -C
Linux 5.6.10-300.fc32.x86_64 (localhost.localdomain) 05/11/2020 _x86_64_ (8 CPU)
02:53:05 PM LINUX RESTART (8 CPU)
02:55:01 PM CPU %user %nice %system %iowait %steal %idle
03:00:01 PM all 1.66 0.00 1.27 0.17 0.00 96.89
03:10:01 PM all 1.30 0.00 1.38 0.20 0.00 97.12
03:12:22 PM COM LINUX SLEEP MODE (pre suspend)
03:14:55 PM COM LINUX SLEEP MODE (post suspend)
03:15:31 PM all 2.79 0.00 3.46 4.35 0.00 89.40
03:20:01 PM all 0.66 0.00 0.82 0.13 0.00 98.39
Average: all 3.50 0.00 3.53 0.78 0.00 92.19
"sa1 --sleep" will be called by sysstat.sleep script installed in
$systemdsleepdir directory if systemd is available.
Sebastien GODARD [Mon, 11 May 2020 08:04:17 +0000 (10:04 +0200)]
sa2: Wait for a random delay before running
Add a new option ("delay_range=") to configure script to tell sa2 script
to wait for a random delay in the indicated range before running.
This delay (expressed in seconds) is aimed at preventing a massive I/O
burst at the same time on VM sharing the same storage area.
Sebastien GODARD [Sun, 10 May 2020 08:57:53 +0000 (10:57 +0200)]
configure: Add new option "--enable-use-crond"
Add a new option to configuration script to tell it to use the standard
cron daemon (and the SysV standard files in /etc/rc.d/) even if systemd
is installed.
I have added this option because systemd seems currently broken on my
F32 distro.
sysstat version 12.3.3 final packaging.
lsm and spec files updated.
Changelog added.
Year of (C) message updated.
Exciting new features in this version include:
* sar/sadc collect and display Pressure-Stall Information statistics.
These metrics have been added during the 4.20 development cycle of the
Linux kernel. They can be displayed with "sar -q {CPU | LOAD | MEM}".
* iostat has gained support devices managed by drivers in userspace like
spdk (see #257). New flags (-f / +f) have been added so that the user
can specify an alternate location for statistics files.
This version also includes various bug fixes.
Enjoy!
GCC versions 9 and later complain more agressively, e.g.:
common.c: In function ‘get_wwnid_from_pretty’:
common.c:396:4: warning: ‘strncpy’ offset [275, 4095] from the object at ‘drd’ is out of the bounds of referenced subobject ‘d_name’ with type ‘char[256]’ at offset 19 [-Warray-bounds]
396 | strncpy(wwn_name, drd->d_name, sizeof(wwn_name));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/dirent.h:61,
from common.c:32:
/usr/include/bits/dirent.h:33:10: note: subobject ‘d_name’ declared here
33 | char d_name[256]; /* We must not include limits.h! */
| ^~~~~~
or:
common.c: In function ‘get_persistent_name_path’:
common.c:876:37: warning: ‘snprintf’ output may be truncated before the last format character [-Wformat-truncation=]
876 | snprintf(path, sizeof(path), "%s/%s",
| ^
common.c:876:2: note: ‘snprintf’ output 2 or more bytes (assuming 4097) into a destination of size 4096
876 | snprintf(path, sizeof(path), "%s/%s",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
877 | get_persistent_type_dir(persistent_name_type), name);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Add new flag to iostat that can be used to specify an alternate
directory for devices statistics.
Example:
iostat -f /altdir [...]
-> Use <altdir> directory to read devices statistics.
iostat +f /altdir [...]
-> Use standard kernel files *and* <altdir> to read devices statistics.
<altdir> is a directory containing files with statistics for devices
managed in userspace.
<altdir> may contain:
- a diskstats file whose format is compliant with that located in /proc.
- statistics for individual devices contained in files whose format is
compliant with that of files located in /sys.
In particular, the following files located in <altdir> may be used by
iostat:
<altdir>/block/<device>/stat
<altdir>/block/<device>/<partition>/stat
<partition> files must have an entry in <altdir>/dev/block/ directory,
e.g.:
<altdir>/dev/block/[major]:[minor] --> ../../block/<device>/<partition>
Notes:
1) iostat uses the /proc/diskstats file to read statistics only when
"-p all" has been entered on the command line (read statistics for all
the devices and their partitions).
2) iostat uses the /sys/block/<device>/stat files to read the statistics
for a device (e.g. "iostat sda") and possibly all its partitions
(e.g. "iostat -p sda").
3) iostat uses the link in /sys/dev/block/[major]:[minor] to know where
the stat file is located for a partition that has been entered on the
command line (e.g. "iostat sda3"). The partition must exist in /dev to
get its major and minor numbers.
Add a new option to be used with "sadf -c" (datafile conversion).
This option enables the user to specify the number of ticks per second
for the machine where the datafile to be converted was created.
E.g.:
sadf -c old_datafile -O hz=250 > new_datafile
sar: Don't display "Inconsistent input data" when no activities are
collected by sadc
When no activities are collected by sadc, sadc writes an error message
("Requested activities not available").
sar used to display a second error message in addition to the previous
one ("Inconsistent input data"). Remove this one.
Check that /proc/pressure directory exists for PSI statistics to be
collected.
Add all the necessary code that will be reusable to check if an activity
can be collected by sadc.
sadf: PSI: Change metrics names and make them percent values
Change PSI metrics names (e.g. s_acpu10 -> %scpu-10) to make clear that
they are percent values.
Also change metrics using the total number of microseconds spent stalled
on ressources to also be a percent value calculated over the past time
interval (e.g. s_tcpu/s -> %scpu).
sysstat version 12.3.2 final packaging.
lsm and spec files updated.
Changelog added.
pidstat and cifsiostat commands have been largely rewritten in this
version. In particular they now use a linked list with dynamic
allocation for all the items being monitored. Memory footprint should be
reduced. Last, several bugs have been fixed in pidstat.
Now use a linked list and dynamic allocatin to save tasks being
monitored.
Also fix several bugs that were lurking in previous pidstat version,
like threads that were displayed as attached to the wrong thread leader
if their real leader was not displayed because it was not an active
task.
Sebastien GODARD [Sat, 21 Mar 2020 09:22:35 +0000 (10:22 +0100)]
pidstat: Remove extra space at end of command name
When pidstat was used with option "-l" to display the command name and
all its arguments, a space was added at the end after all the arguments.
Remove it as it is unneeded and it may prevent the user from displaying
lines based on a pattern located at the end of line
(e.g. pidstat -l -C "pattern$" ...)
Sebastien GODARD [Fri, 27 Dec 2019 12:58:17 +0000 (13:58 +0100)]
sysstat-12.3.1
sysstat version 12.3.1 final packaging.
lsm and spec files updated.
Changelog added.
This version includes new interesting features such as:
* the possibility to display system topology (logical core, socket and
NUMA node numbers) with mpstat,
* statistics for flush I/O operations with iostat,
* and the support for SMB2 version of statistics file for the cifsiostat
command.
It also fixes some bugs concerning iostat and sadf. Enjoy!
Sebastien GODARD [Sun, 15 Dec 2019 17:38:49 +0000 (18:38 +0100)]
Fix #243: Heap overflow in logic2_display_loop()
Make sure that all tests from check_file_actlst() function are done on a
data file, even if this file has activities with unknown formats.
"sadf -H" and, e.g., "sadf -Hx" should as a consequence behave the same.