Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package sysstat for openSUSE:Factory checked in at 2021-12-22 20:17:46 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/sysstat (Old) and /work/SRC/openSUSE:Factory/.sysstat.new.2520 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "sysstat" Wed Dec 22 20:17:46 2021 rev:98 rq:941780 version:12.4.4 Changes: -------- --- /work/SRC/openSUSE:Factory/sysstat/sysstat.changes 2021-12-02 02:27:23.016165856 +0100 +++ /work/SRC/openSUSE:Factory/.sysstat.new.2520/sysstat.changes 2021-12-22 20:18:07.735848803 +0100 @@ -1,0 +2,15 @@ +Mon Dec 20 23:00:54 UTC 2021 - Dirk M??ller <dmuel...@suse.com> + +- update to 2.14.4: + * iostat: Always display persistent names with option -j. + * iostat: Fix how device mapper names are taken into account when + entered on the command line. + * mpstat: Don't display offline CPU. + * mpstat: Fix values displayed when an offline CPU goes back online. + * mpstat: Fix untrusted loop bound. + * mpstat: Update non regression tests. + * Use `grep -E` instead of deprecated `egrep`. + * Spelling and grammar fixes. + * Update man pages with correct spelling of "JavaScript". + +------------------------------------------------------------------- Old: ---- sysstat-12.4.3.tar.gz New: ---- sysstat-12.4.4.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ sysstat.spec ++++++ --- /var/tmp/diff_new_pack.EuiLbg/_old 2021-12-22 20:18:08.411849119 +0100 +++ /var/tmp/diff_new_pack.EuiLbg/_new 2021-12-22 20:18:08.415849121 +0100 @@ -17,7 +17,7 @@ Name: sysstat -Version: 12.4.3 +Version: 12.4.4 Release: 0 Summary: Sar and Iostat Commands for Linux License: GPL-2.0-or-later ++++++ sysstat-12.4.3.tar.gz -> sysstat-12.4.4.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sysstat-12.4.3/CHANGES new/sysstat-12.4.4/CHANGES --- old/sysstat-12.4.3/CHANGES 2021-02-14 10:21:47.000000000 +0100 +++ new/sysstat-12.4.4/CHANGES 2021-12-05 09:02:24.000000000 +0100 @@ -1,5 +1,18 @@ Changes: +2021/12/05: Version 12.4.4 - Sebastien Godard (sysstat <at> orange.fr) + * iostat: Always display persistent names with option -j. + * iostat: Fix how device mapper names are taken into account when + entered on the command line. + * mpstat: Don't display offline CPU. + * mpstat: Fix values displayed when an offline CPU goes back online. + * mpstat: Fix untrusted loop bound. + * mpstat: Update non regression tests. + * [Ville Skytt??]: Use `grep -E` instead of deprecated `egrep`. + * [Ville Skytt??]: Spelling and grammar fixes. + * [Nathan Naze]: Update man pages with correct spelling of + "JavaScript". + 2021/02/14: Version 12.4.3 - Sebastien Godard (sysstat <at> orange.fr) * sar: Fix return code sent by write_stats() function. * sar/sadc: Dereference nr array pointer in struct activity. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sysstat-12.4.3/Makefile.in new/sysstat-12.4.4/Makefile.in --- old/sysstat-12.4.3/Makefile.in 2021-02-14 10:21:47.000000000 +0100 +++ new/sysstat-12.4.4/Makefile.in 2021-12-05 09:02:24.000000000 +0100 @@ -425,8 +425,8 @@ mkdir -p $(DESTDIR)$(SA_LIB_DIR) mkdir -p $(DESTDIR)$(SA_DIR) ifeq ($(CLEAN_SA_DIR),y) - find $(DESTDIR)$(SA_DIR) -type f | egrep "/sar?[0-9]{2,8}(\.(Z|gz|bz2|xz|lz|lzo))?$$" | xargs rm -f - find $(DESTDIR)$(SA_DIR) -type f | egrep "/sar?[0-9]{2,8}$$" | xargs rm -f + find $(DESTDIR)$(SA_DIR) -type f | grep -E "/sar?[0-9]{2,8}(\.(Z|gz|bz2|xz|lz|lzo))?$$" | xargs rm -f + find $(DESTDIR)$(SA_DIR) -type f | grep -E "/sar?[0-9]{2,8}$$" | xargs rm -f endif mkdir -p $(DESTDIR)$(BIN_DIR) mkdir -p $(DESTDIR)$(DOC_DIR) @@ -661,7 +661,7 @@ TESTDIR="tests" TESTRUN="/bin/sh" -TESTLIST:=$(shell ls $(TESTDIR) | egrep '^[0-9]+$$' | sort -n) +TESTLIST:=$(shell ls $(TESTDIR) | grep -E '^[0-9]+$$' | sort -n) testcomp: tests/ini/inisar diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sysstat-12.4.3/build/cron_interval new/sysstat-12.4.4/build/cron_interval --- old/sysstat-12.4.3/build/cron_interval 2021-02-14 10:21:47.000000000 +0100 +++ new/sysstat-12.4.4/build/cron_interval 2021-12-05 09:02:24.000000000 +0100 @@ -1,7 +1,7 @@ You may enter here the sampling interval (in minutes) that the configuration script will use to customize the crontab. -Defaut value is 10. This means that sadc (the system activity data collector +Default value is 10. This means that sadc (the system activity data collector called by sar) will take a snapshot of the system counters every 10 minutes. Other reasonable values could be 5, 15 or 20 minutes. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sysstat-12.4.3/build/prefix new/sysstat-12.4.4/build/prefix --- old/sysstat-12.4.3/build/prefix 2021-02-14 10:21:47.000000000 +0100 +++ new/sysstat-12.4.4/build/prefix 2021-12-05 09:02:24.000000000 +0100 @@ -1,6 +1,6 @@ This is the base directory used for installation. -System administrators would rather install softwares that are added to +System administrators would rather install software that are added to an already existing system into /usr/local, since /usr is sometimes mounted read-only. /usr/local is the default answer here. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sysstat-12.4.3/common.c new/sysstat-12.4.4/common.c --- old/sysstat-12.4.3/common.c 2021-02-14 10:21:47.000000000 +0100 +++ new/sysstat-12.4.4/common.c 2021-12-05 09:02:24.000000000 +0100 @@ -67,7 +67,10 @@ char sc_sa_comment[MAX_SGR_LEN] = C_LIGHT_YELLOW; char sc_normal[MAX_SGR_LEN] = C_NORMAL; -/* Type of persistent device names used in sar and iostat */ +/* + * Type of persistent device names in lowercase letters + * (e.g. "uuid", "label", "path"...) Used in sar and iostat. + */ char persistent_name_type[MAX_FILE_LEN]; /* diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sysstat-12.4.3/configure new/sysstat-12.4.4/configure --- old/sysstat-12.4.3/configure 2021-02-14 10:21:47.000000000 +0100 +++ new/sysstat-12.4.4/configure 2021-12-05 09:02:24.000000000 +0100 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for sysstat 12.4.3. +# Generated by GNU Autoconf 2.69 for sysstat 12.4.4. # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. @@ -577,8 +577,8 @@ # Identity of this package. PACKAGE_NAME='sysstat' PACKAGE_TARNAME='sysstat' -PACKAGE_VERSION='12.4.3' -PACKAGE_STRING='sysstat 12.4.3' +PACKAGE_VERSION='12.4.4' +PACKAGE_STRING='sysstat 12.4.4' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1326,7 +1326,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures sysstat 12.4.3 to adapt to many kinds of systems. +\`configure' configures sysstat 12.4.4 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1387,7 +1387,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of sysstat 12.4.3:";; + short | recursive ) echo "Configuration of sysstat 12.4.4:";; esac cat <<\_ACEOF @@ -1513,7 +1513,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -sysstat configure 12.4.3 +sysstat configure 12.4.4 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1932,7 +1932,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by sysstat $as_me 12.4.3, which was +It was created by sysstat $as_me 12.4.4, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -6206,7 +6206,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by sysstat $as_me 12.4.3, which was +This file was extended by sysstat $as_me 12.4.4, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -6259,7 +6259,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -sysstat config.status 12.4.3 +sysstat config.status 12.4.4 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sysstat-12.4.3/configure.in new/sysstat-12.4.4/configure.in --- old/sysstat-12.4.3/configure.in 2021-02-14 10:21:47.000000000 +0100 +++ new/sysstat-12.4.4/configure.in 2021-12-05 09:02:24.000000000 +0100 @@ -4,7 +4,7 @@ # Modified by Sebastien Godard (sysstat <at> orange.fr) # Initialization of $PACKAGE_VERSION and $PACKAGE_NAME variables -AC_INIT(sysstat, 12.4.3) +AC_INIT(sysstat, 12.4.4) # Ensure that a recent enough version of Autoconf is being used AC_PREREQ(2.53) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sysstat-12.4.3/contrib/isag/isag new/sysstat-12.4.4/contrib/isag/isag --- old/sysstat-12.4.3/contrib/isag/isag 2021-02-14 10:21:47.000000000 +0100 +++ new/sysstat-12.4.4/contrib/isag/isag 2021-12-05 09:02:24.000000000 +0100 @@ -84,7 +84,7 @@ # Revision 1.9 2001/01/27 19:28:43 root # added secondary Y axes functionality # added -c cfg_file cmdln option -# writting of selected config data to cfg_file +# writing of selected config data to cfg_file # renamed chart lines to names used in sar # parametrized creating of cmd() array # added generic var __M4_TIMELEN__ for proc_line_generic @@ -143,7 +143,7 @@ set ident "/usr/bin/ident" set version "" -# This can be set only if small interactive change in result code was occured +# This can be set only if small interactive change in result code occurred set patchlevel "" if {[catch {set fp [open "| $ident $argv0" "r"]}] == 0} { set n 0 @@ -395,7 +395,7 @@ # SGo 2008-07-06: Update options (options -S added). # SGo 2008-06-15: Update options (options -c and -w have been merged). -# sar switches as names for object-instances (final and curent) +# sar switches as names for object-instances (final and current) set prog_swtch [list b B q r R S u v w W] # maximal and current values for each graph indexed by sar switch i.e. for cpu @@ -683,7 +683,7 @@ menubutton .menu.chart -text "Chart" -menu .menu.chart.m -underline 0 menu .menu.chart.m -tearoff true -# creates for each sar-switch menu item with apropriate command +# creates for each sar-switch menu item with appropriate command foreach l $prog_swtch { .menu.chart.m add command -label $view_n($l) \ -command "new_chart $l" -accelerator $l diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sysstat-12.4.3/contrib/sargraph/sargraph new/sysstat-12.4.4/contrib/sargraph/sargraph --- old/sysstat-12.4.3/contrib/sargraph/sargraph 2021-02-14 10:21:47.000000000 +0100 +++ new/sysstat-12.4.4/contrib/sargraph/sargraph 2021-12-05 09:02:24.000000000 +0100 @@ -404,7 +404,7 @@ SA_FILES=`$FIND "$SA_DIR" -type f -printf '%T@,%p\n' \ - | egrep "$SA_REGEX" | $SORT -n -r | $CUT -d, -f2` + | grep -E "$SA_REGEX" | $SORT -n -r | $CUT -d, -f2` # Main loop diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sysstat-12.4.3/contrib/sargraph/sargraph2 new/sysstat-12.4.4/contrib/sargraph/sargraph2 --- old/sysstat-12.4.3/contrib/sargraph/sargraph2 2021-02-14 10:21:47.000000000 +0100 +++ new/sysstat-12.4.4/contrib/sargraph/sargraph2 2021-12-05 09:02:24.000000000 +0100 @@ -130,7 +130,7 @@ cpu_gnuplot() # %iowait,%user,%nice,%system,%steal { # First make sure that the columns are where we expect them to be - HEADER=`egrep -v ';LINUX-RESTART|;COM' $2 | head -1 | cut -d ';' -f 5-10` + HEADER=`grep -Ev ';LINUX-RESTART|;COM' $2 | head -1 | cut -d ';' -f 5-10` EXPECTED="%user;%nice;%system;%iowait;%steal;%idle" if [ "$HEADER" != "$EXPECTED" ] then @@ -159,14 +159,14 @@ mem_gnuplot() # free,used,buffers,cached / %commit,%swpused { # First make sure that the columns are where we expect them to be - HEADER=`egrep -v ';LINUX-RESTART|;COM' $2 | head -1 | cut -d ';' -f 4-10` + HEADER=`grep -Ev ';LINUX-RESTART|;COM' $2 | head -1 | cut -d ';' -f 4-10` EXPECTED="kbmemfree;kbmemused;%memused;kbbuffers;kbcached;kbcommit;%commit" if [ "$HEADER" != "$EXPECTED" ] then echo "Headers not in right order: $HEADER" 1>&2 exit 1 fi - HEADER=`egrep -v ';LINUX-RESTART|;COM' $3 | head -1 | cut -d ';' -f 4-6` + HEADER=`grep -Ev ';LINUX-RESTART|;COM' $3 | head -1 | cut -d ';' -f 4-6` EXPECTED="kbswpfree;kbswpused;%swpused" if [ "$HEADER" != "$EXPECTED" ] then @@ -201,7 +201,7 @@ io_gnuplot() # %KBr/s,KBw/s / rIOPS,wIOPS { # First make sure that the columns are where we expect them to be - HEADER=`egrep -v ';LINUX-RESTART|;COM' $2 | head -1 | cut -d ';' -f 4-8` + HEADER=`grep -Ev ';LINUX-RESTART|;COM' $2 | head -1 | cut -d ';' -f 4-8` EXPECTED="tps;rtps;wtps;bread/s;bwrtn/s" if [ "$HEADER" != "$EXPECTED" ] then diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sysstat-12.4.3/iconfig new/sysstat-12.4.4/iconfig --- old/sysstat-12.4.3/iconfig 2021-02-14 10:21:47.000000000 +0100 +++ new/sysstat-12.4.4/iconfig 2021-12-05 09:02:24.000000000 +0100 @@ -10,7 +10,7 @@ echo This script enables you to set the parameters value used by ./configure. echo Please enter the value for the parameters listed below. echo Press Return to tell ./configure to use the default value or to try to guess the proper one. -echo "Defaut value for yes/no questions is no (parameter is NOT set)." +echo "Default value for yes/no questions is no (parameter is NOT set)." echo You can enter a ? to display a help message at any time... echo diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sysstat-12.4.3/iostat.c new/sysstat-12.4.4/iostat.c --- old/sysstat-12.4.3/iostat.c 2021-02-14 10:21:47.000000000 +0100 +++ new/sysstat-12.4.4/iostat.c 2021-12-05 09:02:24.000000000 +0100 @@ -32,6 +32,7 @@ #include <sys/types.h> #include <sys/stat.h> #include <sys/utsname.h> +#include <libgen.h> #include "version.h" #include "iostat.h" @@ -126,6 +127,44 @@ /* *************************************************************************** + * Get device mapper name (e.g. "dm-0") from its registered name (e.g. + * "virtualhd-home"). + * + * IN: + * @name Registered name of the device (e.g. "virtualhd-home"). + * + * RETURNS: + * Name of the device mapper name (e.g. "dm-0"). + *************************************************************************** + */ +char *get_dm_name_from_registered_name(char *registered_name) +{ + int n; + char filen[PATH_MAX]; + char target[PATH_MAX]; + + /* + * The registered device name is a symlink pointing at its device mapper name + * in the /dev/mapper directory. + */ + n = snprintf(filen, sizeof(filen), "%s/%s", DEVMAP_DIR, registered_name); + if ((n >= sizeof(filen)) || access(filen, F_OK)) { + return (NULL); + } + + /* Read symlink */ + n = readlink(filen, target, PATH_MAX); + if ((n <= 0) || (n >= PATH_MAX)) + return (NULL); + + target[n] = '\0'; + + /* ... and get device mapper name it points at */ + return basename(target); +} + +/* + *************************************************************************** * SIGALRM signal handler. No need to reset the handler here. * * IN: @@ -187,6 +226,47 @@ /* *************************************************************************** + * Get device major and minor numbers. + * + * IN: + * @filename Name of the device ("sda", "/dev/sdb1"...) + * + * OUT: + * @major Major number of the device. + * @minor Minor number of the device. + * + * RETURNS: + * 0 on success, and -1 otherwise. + *************************************************************************** + */ +int get_major_minor_nr(char filename[], int *major, int *minor) +{ + struct stat statbuf; + char *bang; + char dfile[MAX_PF_NAME]; + + snprintf(dfile, sizeof(dfile), "%s%s", filename[0] == '/' ? "" : SLASH_DEV, filename); + dfile[sizeof(dfile) - 1] = '\0'; + + while ((bang = strchr(dfile, '!'))) { + /* + * Some devices may have had a slash replaced with a bang character (eg. cciss!c0d0...) + * Restore their original names so that they can be found in /dev directory. + */ + *bang = '/'; + } + + if (__stat(dfile, &statbuf) < 0) + return -1; + + *major = __major(statbuf.st_rdev); + *minor = __minor(statbuf.st_rdev); + + return 0; +} + +/* + *************************************************************************** * Check if a device is present in the list, and add it if requested. * Also look for its type (device or partition) and save it. * @@ -196,6 +276,10 @@ * @dtype T_PART_DEV (=2) if the device and all its partitions should * also be read (option -p used), T_GROUP (=3) if it's a group * name, and 0 otherwise. + * @major Major number of the device (set to UKWN_MAJ_NR by caller if + * unknown: In this case, major and minor numbers will be + * determined here). + * @minor Minor number of the device. * * RETURNS: * Pointer on the io_device structure in the list where the device is located @@ -204,10 +288,12 @@ * don't want to add it. *************************************************************************** */ -struct io_device *add_list_device(struct io_device **dlist, char *name, int dtype) +struct io_device *add_list_device(struct io_device **dlist, char *name, int dtype, + int major, int minor) { struct io_device *d, *ds; - int i, rc = 0; + int i, rc = 0, maj_nr, min_nr; + char *dm_name; if (strnlen(name, MAX_NAME_LEN) == MAX_NAME_LEN) /* Device name is too long */ @@ -253,7 +339,23 @@ } memset(d->dev_stats[i], 0, sizeof(struct io_stats)); } - strncpy(d->name, name, MAX_NAME_LEN); + if (DISPLAY_DEVMAP_NAME(flags)) { + /* + * Save device mapper name (e.g. "dm-0") instead of + * its registered name (e.g. "virtualhd-home") + * This is because we won't read stats for a file named "virtualhd-home" but + * for a file named "dm-0" (we will display "virtualhd-home" anyway at the end + * because option -N has been used). + */ + dm_name = get_dm_name_from_registered_name(name); + if (!dm_name) { + dm_name = name; + } + strncpy(d->name, dm_name, sizeof(d->name) - 1); + } + else { + strncpy(d->name, name, sizeof(d->name)); + } d->name[MAX_NAME_LEN - 1] = '\0'; d->exist = TRUE; d->next = ds; @@ -277,50 +379,22 @@ /* This is a partition (T_PART) */ d->dev_tp = T_PART; } - } - - return d; -} - -/* - *************************************************************************** - * Get device major and minor numbers. - * - * IN: - * @filename Name of the device ("sda", "/dev/sdb1"...) - * - * OUT: - * @major Major number of the device. - * @minor Minor number of the device. - * - * RETURNS: - * 0 on success, and -1 otherwise. - *************************************************************************** - */ -int get_major_minor_nr(char filename[], int *major, int *minor) -{ - struct stat statbuf; - char *bang; - char dfile[MAX_PF_NAME]; - - snprintf(dfile, sizeof(dfile), "%s%s", filename[0] == '/' ? "" : SLASH_DEV, filename); - dfile[sizeof(dfile) - 1] = '\0'; - while ((bang = strchr(dfile, '!'))) { - /* - * Some devices may have had a slash replaced with a bang character (eg. cciss!c0d0...) - * Restore their original names so that they can be found in /dev directory. - */ - *bang = '/'; + /* Save major and minor numbers */ + if (major != UKWN_MAJ_NR) { + d->major = major; + d->minor = minor; + } + else { + /* Look for device major and minor numbers */ + if (get_major_minor_nr(d->name, &maj_nr, &min_nr) == 0) { + d->major = maj_nr; + d->minor = min_nr; + } + } } - if (__stat(dfile, &statbuf) < 0) - return -1; - - *major = __major(statbuf.st_rdev); - *minor = __minor(statbuf.st_rdev); - - return 0; + return d; } /* @@ -466,7 +540,6 @@ struct io_stats sdev; struct io_device *d; char dfile[MAX_PF_NAME], filename[MAX_PF_NAME + 512]; - int major, minor; snprintf(dfile, sizeof(dfile), "%s/%s/%s", sysdev, __BLOCK, dname); dfile[sizeof(dfile) - 1] = '\0'; @@ -487,17 +560,9 @@ if (read_sysfs_file_stat_work(filename, &sdev) < 0) continue; - d = add_list_device(&dev_list, drd->d_name, 0); + d = add_list_device(&dev_list, drd->d_name, 0, UKWN_MAJ_NR, 0); if (d != NULL) { *(d->dev_stats[curr]) = sdev; - - if (!d->major) { - /* Get major and minor numbers for given device */ - if (get_major_minor_nr(d->name, &major, &minor) == 0) { - d->major = major; - d->minor = minor; - } - } } } @@ -557,7 +622,6 @@ struct io_stats sdev; struct io_device *d; char dfile[MAX_PF_NAME]; - int major, minor; /* Open __sys/block directory */ if ((dir = __opendir(sysblock)) == NULL) @@ -575,17 +639,9 @@ if (read_sysfs_file_stat_work(dfile, &sdev) < 0) continue; - d = add_list_device(&dev_list, drd->d_name, 0); + d = add_list_device(&dev_list, drd->d_name, 0, UKWN_MAJ_NR, 0); if (d != NULL) { *(d->dev_stats[curr]) = sdev; - - if (!d->major) { - /* Get major and minor numbers for given device */ - if (get_major_minor_nr(d->name, &major, &minor) == 0) { - d->major = major; - d->minor = minor; - } - } } } @@ -643,15 +699,6 @@ int read_sysfs_part_stat_work(int curr, struct io_device *d, char *sysdev) { char dfile[MAX_PF_NAME]; - int major, minor; - - if (!d->major) { - /* Get major and minor numbers for given device */ - if (get_major_minor_nr(d->name, &major, &minor) < 0) - return -1; - d->major = major; - d->minor = minor; - } /* Read stats for device */ snprintf(dfile, sizeof(dfile), "%s/%s/%d:%d/%s", @@ -817,11 +864,9 @@ /* Unknown entry: Ignore it */ continue; - d = add_list_device(&dev_list, dev_name, 0); + d = add_list_device(&dev_list, dev_name, 0, major, minor); if (d != NULL) { *d->dev_stats[curr] = sdev; - d->major = major; - d->minor = minor; } } fclose(fp); @@ -2046,7 +2091,7 @@ } } /* Store device name */ - add_list_device(&dev_list, devname, T_PART_DEV); + add_list_device(&dev_list, devname, T_PART_DEV, 0, 0); } } opt++; @@ -2067,7 +2112,7 @@ * and one for the trailing '\0'. */ snprintf(group_name, MAX_NAME_LEN, " %-.*s", MAX_NAME_LEN - 2, argv[opt++]); - add_list_device(&dev_list, group_name, T_GROUP); + add_list_device(&dev_list, group_name, T_GROUP, 0, 0); } else if (!strcmp(argv[opt], "--human")) { @@ -2256,7 +2301,7 @@ devname = persist_devname; } } - add_list_device(&dev_list, devname, 0); + add_list_device(&dev_list, devname, 0, UKWN_MAJ_NR, 0); } else { flags |= I_D_ALL_DEVICES; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sysstat-12.4.3/iostat.h new/sysstat-12.4.4/iostat.h --- old/sysstat-12.4.3/iostat.h 2021-02-14 10:21:47.000000000 +0100 +++ new/sysstat-12.4.4/iostat.h 2021-12-05 09:02:24.000000000 +0100 @@ -60,6 +60,8 @@ #define T_PART_DEV 2 #define T_GROUP 3 +#define UKWN_MAJ_NR 0 + /* Environment variable */ #define ENV_POSIXLY_CORRECT "POSIXLY_CORRECT" @@ -117,7 +119,7 @@ int dev_tp; /* TRUE if device exists in /proc/diskstats or /sys. Don't apply for groups. */ int exist; - /* major and minor numbers are set only for partitions (T_PART), not whole devices */ + /* major and minor numbers (not set for T_GROUP "devices") */ int major; int minor; struct io_stats *dev_stats[2]; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sysstat-12.4.3/json_stats.c new/sysstat-12.4.4/json_stats.c --- old/sysstat-12.4.3/json_stats.c 2021-02-14 10:21:47.000000000 +0100 +++ new/sysstat-12.4.4/json_stats.c 2021-12-05 09:02:24.000000000 +0100 @@ -1,5 +1,5 @@ /* - * json_stats.c: Funtions used by sadf to display statistics in JSON format. + * json_stats.c: Functions used by sadf to display statistics in JSON format. * (C) 1999-2020 by Sebastien GODARD (sysstat <at> orange.fr) * *************************************************************************** diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sysstat-12.4.3/man/iostat.in new/sysstat-12.4.4/man/iostat.in --- old/sysstat-12.4.3/man/iostat.in 2021-02-14 10:21:47.000000000 +0100 +++ new/sysstat-12.4.4/man/iostat.in 2021-12-05 09:02:24.000000000 +0100 @@ -317,7 +317,7 @@ Useful for viewing LVM2 statistics. .TP .B -o JSON -Display the statistics in JSON (Javascript Object Notation) format. +Display the statistics in JSON (JavaScript Object Notation) format. JSON output field order is undefined, and new fields may be added in the future. .TP diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sysstat-12.4.3/man/mpstat.1 new/sysstat-12.4.4/man/mpstat.1 --- old/sysstat-12.4.3/man/mpstat.1 2021-02-14 10:21:47.000000000 +0100 +++ new/sysstat-12.4.4/man/mpstat.1 2021-12-05 09:02:24.000000000 +0100 @@ -102,7 +102,7 @@ .BR "-u " "(see below)." .TP .B -o JSON -Display the statistics in JSON (Javascript Object Notation) format. +Display the statistics in JSON (JavaScript Object Notation) format. JSON output field order is undefined, and new fields may be added in the future. .TP diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sysstat-12.4.3/man/pidstat.1 new/sysstat-12.4.4/man/pidstat.1 --- old/sysstat-12.4.3/man/pidstat.1 2021-02-14 10:21:47.000000000 +0100 +++ new/sysstat-12.4.4/man/pidstat.1 2021-12-05 09:02:24.000000000 +0100 @@ -356,7 +356,7 @@ requires a resource that is unavailable. .IP nvcswch/s Total number of non voluntary context switches the task made per second. -A involuntary context switch takes place when a task executes +An involuntary context switch takes place when a task executes for the duration of its time slice and then is forced to relinquish the processor. .IP Command diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sysstat-12.4.3/man/sadf.in new/sysstat-12.4.4/man/sadf.in --- old/sysstat-12.4.3/man/sadf.in 2021-02-14 10:21:47.000000000 +0100 +++ new/sysstat-12.4.4/man/sadf.in 2021-12-05 09:02:24.000000000 +0100 @@ -293,7 +293,7 @@ .br .B L=000000:T=000000:W=000000:X=000000 -Capabilities consisting of an hexadecimal digit +Capabilities consisting of a hexadecimal digit .RB "(" "0 " "through " "F" ") are used to specify" the first sixteen colors in the palette (these colors are used to draw the graphs), e.g., 3=ffffff would indicate that the third color in the palette is white (0xffffff). diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sysstat-12.4.3/mpstat.c new/sysstat-12.4.4/mpstat.c --- old/sysstat-12.4.3/mpstat.c 2021-02-14 10:21:47.000000000 +0100 +++ new/sysstat-12.4.4/mpstat.c 2021-12-05 09:02:24.000000000 +0100 @@ -273,6 +273,39 @@ /* *************************************************************************** + * Set interrupt values for current sample to those of previous sample. + * + * IN: + * @st_ic Array for per-CPU interrupts statistics. + * @c Fist CPU to process. + * @last Last CPU to process. + * @ic_nr Number of interrupts (hard or soft) per CPU. + * @curr Position in array where current statistics will be saved. + ************************************************************************** + */ +void fwd_irq_values(struct stats_irqcpu *st_ic[], unsigned int c, + unsigned int last, int ic_nr, int curr) +{ + struct stats_irq *st_irq_i, *st_irq_j; + struct stats_irqcpu *p, *q; + int j; + + while (c < last) { + st_irq_i = st_irq[curr] + c + 1; + st_irq_j = st_irq[!curr] + c + 1; + st_irq_i->irq_nr = st_irq_j->irq_nr; + + for (j = 0; j < ic_nr; j++) { + p = st_ic[curr] + c * ic_nr + j; + q = st_ic[!curr] + c * ic_nr + j; + p->interrupt = q->interrupt; + } + c++; + } +} + +/* + *************************************************************************** * Get node placement (which node each CPU belongs to, and total number of * CPU that each node has). * @@ -541,7 +574,7 @@ scp->cpu_steal + scp->cpu_softirq; /* - * If the CPU is offline then it is omited from /proc/stat: + * If the CPU is offline then it is omitted from /proc/stat: * All the fields couldn't have been read and the sum of them is zero. */ if (tot_jiffies_c == 0) { @@ -1161,10 +1194,12 @@ * @curr_string String displayed at the beginning of current sample stats. * This is the timestamp of the current sample, or "Average" * when displaying average stats. + * @offline_cpu_bitmap + * CPU bitmap for offline CPU. *************************************************************************** */ void write_plain_isumcpu_stats(int dis, unsigned long long itv, int prev, int curr, - char *prev_string, char *curr_string) + char *prev_string, char *curr_string, unsigned char offline_cpu_bitmap[]) { struct stats_cpu *scc, *scp; struct stats_irq *sic, *sip; @@ -1193,17 +1228,10 @@ scp = st_cpu[prev] + cpu; /* Check if we want stats about this CPU */ - if (!(*(cpu_bitmap + (cpu >> 3)) & (1 << (cpu & 0x07)))) + if (!(*(cpu_bitmap + (cpu >> 3)) & (1 << (cpu & 0x07))) || + offline_cpu_bitmap[cpu >> 3] & (1 << (cpu & 0x07))) continue; - if ((scc->cpu_user + scc->cpu_nice + scc->cpu_sys + - scc->cpu_iowait + scc->cpu_idle + scc->cpu_steal + - scc->cpu_hardirq + scc->cpu_softirq) == 0) { - - /* This is an offline CPU */ - continue; - } - printf("%-11s", curr_string); cprintf_in(IS_INT, " %4d", "", cpu - 1); @@ -1235,9 +1263,12 @@ * Stats used as reference may be the previous ones read, or * the very first ones when calculating the average. * @curr Position in array where current statistics will be saved. + * @offline_cpu_bitmap + * CPU bitmap for offline CPU. *************************************************************************** */ -void write_json_isumcpu_stats(int tab, unsigned long long itv, int prev, int curr) +void write_json_isumcpu_stats(int tab, unsigned long long itv, int prev, int curr, + unsigned char offline_cpu_bitmap[]) { struct stats_cpu *scc, *scp; struct stats_irq *sic, *sip; @@ -1263,7 +1294,8 @@ scp = st_cpu[prev] + cpu; /* Check if we want stats about this CPU */ - if (!(*(cpu_bitmap + (cpu >> 3)) & (1 << (cpu & 0x07)))) + if (!(*(cpu_bitmap + (cpu >> 3)) & (1 << (cpu & 0x07))) || + offline_cpu_bitmap[cpu >> 3] & (1 << (cpu & 0x07))) continue; if (next) { @@ -1271,14 +1303,6 @@ } next = TRUE; - if ((scc->cpu_user + scc->cpu_nice + scc->cpu_sys + - scc->cpu_iowait + scc->cpu_idle + scc->cpu_steal + - scc->cpu_hardirq + scc->cpu_softirq) == 0) { - - /* This is an offline CPU */ - continue; - } - /* Recalculate itv for current proc */ pc_itv = get_per_cpu_interval(scc, scp); @@ -1318,20 +1342,24 @@ * @tab Number of tabs to print (JSON format only). * @next TRUE is a previous activity has been displayed (JSON format * only). + * @offline_cpu_bitmap + * CPU bitmap for offline CPU. *************************************************************************** */ void write_isumcpu_stats(int dis, unsigned long long itv, int prev, int curr, - char *prev_string, char *curr_string, int tab, int *next) + char *prev_string, char *curr_string, int tab, int *next, + unsigned char offline_cpu_bitmap[]) { if (DISPLAY_JSON_OUTPUT(flags)) { if (*next) { printf(",\n"); } *next = TRUE; - write_json_isumcpu_stats(tab, itv, prev, curr); + write_json_isumcpu_stats(tab, itv, prev, curr, offline_cpu_bitmap); } else { - write_plain_isumcpu_stats(dis, itv, prev, curr, prev_string, curr_string); + write_plain_isumcpu_stats(dis, itv, prev, curr, prev_string, curr_string, + offline_cpu_bitmap); } } @@ -1354,13 +1382,14 @@ * @curr_string String displayed at the beginning of current sample stats. * This is the timestamp of the current sample, or "Average" * when displaying average stats. + * @offline_cpu_bitmap + * CPU bitmap for offline CPU. *************************************************************************** */ void write_plain_irqcpu_stats(struct stats_irqcpu *st_ic[], int ic_nr, int dis, unsigned long long itv, int prev, int curr, - char *prev_string, char *curr_string) + char *prev_string, char *curr_string, unsigned char offline_cpu_bitmap[]) { - struct stats_cpu *scc; int j = ic_nr, offset, cpu, colwidth[NR_IRQS]; struct stats_irqcpu *p, *q, *p0, *q0; @@ -1418,20 +1447,13 @@ for (cpu = 1; cpu <= cpu_nr; cpu++) { - scc = st_cpu[curr] + cpu; - /* * Check if we want stats about this CPU. * CPU must have been explicitly selected using option -P, - * else we display every CPU. + * else we display every CPU (unless it's offline). */ - if (!(*(cpu_bitmap + (cpu >> 3)) & (1 << (cpu & 0x07))) && USE_OPTION_P(flags)) - continue; - - if ((scc->cpu_user + scc->cpu_nice + scc->cpu_sys + - scc->cpu_iowait + scc->cpu_idle + scc->cpu_steal + - scc->cpu_hardirq + scc->cpu_softirq) == 0) - /* Offline CPU found */ + if ((!(*(cpu_bitmap + (cpu >> 3)) & (1 << (cpu & 0x07))) && USE_OPTION_P(flags)) || + offline_cpu_bitmap[cpu >> 3] & (1 << (cpu & 0x07))) continue; printf("%-11s", curr_string); @@ -1499,12 +1521,14 @@ * the very first ones when calculating the average. * @curr Position in array where current statistics will be saved. * @type Activity (M_D_IRQ_CPU or M_D_SOFTIRQS). + * @offline_cpu_bitmap + * CPU bitmap for offline CPU. *************************************************************************** */ void write_json_irqcpu_stats(int tab, struct stats_irqcpu *st_ic[], int ic_nr, - unsigned long long itv, int prev, int curr, int type) + unsigned long long itv, int prev, int curr, int type, + unsigned char offline_cpu_bitmap[]) { - struct stats_cpu *scc; int j = ic_nr, offset, cpu; struct stats_irqcpu *p, *q, *p0, *q0; int nextcpu = FALSE, nextirq; @@ -1518,20 +1542,13 @@ for (cpu = 1; cpu <= cpu_nr; cpu++) { - scc = st_cpu[curr] + cpu; - /* * Check if we want stats about this CPU. * CPU must have been explicitly selected using option -P, - * else we display every CPU. + * else we display every CPU (unless it's offline). */ - if (!(*(cpu_bitmap + (cpu >> 3)) & (1 << (cpu & 0x07))) && USE_OPTION_P(flags)) - continue; - - if ((scc->cpu_user + scc->cpu_nice + scc->cpu_sys + - scc->cpu_iowait + scc->cpu_idle + scc->cpu_steal + - scc->cpu_hardirq + scc->cpu_softirq) == 0) - /* Offline CPU found */ + if ((!(*(cpu_bitmap + (cpu >> 3)) & (1 << (cpu & 0x07))) && USE_OPTION_P(flags)) || + offline_cpu_bitmap[cpu >> 3] & (1 << (cpu & 0x07))) continue; if (nextcpu) { @@ -1623,23 +1640,26 @@ * @next TRUE is a previous activity has been displayed (JSON format * only). * @type Activity (M_D_IRQ_CPU or M_D_SOFTIRQS). + * @offline_cpu_bitmap + * CPU bitmap for offline CPU. *************************************************************************** */ void write_irqcpu_stats(struct stats_irqcpu *st_ic[], int ic_nr, int dis, unsigned long long itv, int prev, int curr, char *prev_string, char *curr_string, int tab, - int *next, int type) + int *next, int type, unsigned char offline_cpu_bitmap[]) { if (DISPLAY_JSON_OUTPUT(flags)) { if (*next) { printf(",\n"); } *next = TRUE; - write_json_irqcpu_stats(tab, st_ic, ic_nr, itv, prev, curr, type); + write_json_irqcpu_stats(tab, st_ic, ic_nr, itv, prev, curr, type, + offline_cpu_bitmap); } else { write_plain_irqcpu_stats(st_ic, ic_nr, dis, itv, prev, curr, - prev_string, curr_string); + prev_string, curr_string, offline_cpu_bitmap); } } @@ -1701,17 +1721,19 @@ /* Print total number of interrupts per processor */ if (DISPLAY_IRQ_SUM(actflags)) { write_isumcpu_stats(dis, itv, prev, curr, prev_string, curr_string, - tab, &next); + tab, &next, offline_cpu_bitmap); } /* Display each interrupt value for each CPU */ if (DISPLAY_IRQ_CPU(actflags)) { write_irqcpu_stats(st_irqcpu, irqcpu_nr, dis, itv, prev, curr, - prev_string, curr_string, tab, &next, M_D_IRQ_CPU); + prev_string, curr_string, tab, &next, M_D_IRQ_CPU, + offline_cpu_bitmap); } if (DISPLAY_SOFTIRQS(actflags)) { write_irqcpu_stats(st_softirqcpu, softirqcpu_nr, dis, itv, prev, curr, - prev_string, curr_string, tab, &next, M_D_SOFTIRQS); + prev_string, curr_string, tab, &next, M_D_SOFTIRQS, + offline_cpu_bitmap); } if (DISPLAY_JSON_OUTPUT(flags)) { @@ -1790,16 +1812,10 @@ struct stats_irqcpu *p; char *line = NULL, *li; unsigned long irq = 0; - unsigned int cpu; + unsigned int cpu, c = 0; int cpu_index[cpu_nr], index = 0, len; char *cp, *next; - /* Reset total number of interrupts received by each CPU */ - for (cpu = 0; cpu < cpu_nr; cpu++) { - st_irq_i = st_irq[curr] + cpu + 1; - st_irq_i->irq_nr = 0; - } - if ((fp = fopen(file, "r")) != NULL) { SREALLOC(line, char, INTERRUPTS_LINE + 11 * cpu_nr); @@ -1811,13 +1827,32 @@ next = line; while (((cp = strstr(next, "CPU")) != NULL) && (index < cpu_nr)) { cpu = strtol(cp + 3, &next, 10); + if (cpu >= cpu_nr) + break; cpu_index[index++] = cpu; + + /* + * Reset total number of interrupts received by a CPU + * only for online CPU. Only needed for st_irq structures. + */ + st_irq_i = st_irq[curr] + cpu + 1; + st_irq_i->irq_nr = 0; + + /* + * For offline CPU, pick up previous values so that when the + * CPU goes back online, values won't jump from zero. + */ + fwd_irq_values(st_ic, c, cpu, ic_nr, curr); + c = cpu + 1; } if (index) /* Header line found */ break; } + /* Process possible offline CPU at the end of the list */ + fwd_irq_values(st_ic, c, cpu_nr, ic_nr, curr); + /* Parse each line of interrupts statistics data */ while ((fgets(line, INTERRUPTS_LINE + 11 * cpu_nr, fp) != NULL) && (irq < ic_nr)) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sysstat-12.4.3/nls/sysstat.pot new/sysstat-12.4.4/nls/sysstat.pot --- old/sysstat-12.4.3/nls/sysstat.pot 2021-02-14 10:21:47.000000000 +0100 +++ new/sysstat-12.4.4/nls/sysstat.pot 2021-12-05 09:02:24.000000000 +0100 @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: sysstat <at> orange.fr\n" -"POT-Creation-Date: 2021-02-14 10:13+0100\n" +"POT-Creation-Date: 2021-12-05 08:55+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <l...@li.org>\n" @@ -17,7 +17,7 @@ "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" -#: cifsiostat.c:75 iostat.c:88 mpstat.c:134 sar.c:107 tapestat.c:104 +#: cifsiostat.c:75 iostat.c:89 mpstat.c:134 sar.c:107 tapestat.c:104 #, c-format msgid "Usage: %s [ options ] [ <interval> [ <count> ] ]\n" msgstr "" @@ -38,7 +38,7 @@ "[ -h ] [ -k | -m ] [ -t ] [ -V ]\n" msgstr "" -#: common.c:80 +#: common.c:83 #, c-format msgid "sysstat version %s\n" msgstr "" @@ -54,7 +54,7 @@ msgid "Cannot handle so many processors!\n" msgstr "" -#: iostat.c:91 +#: iostat.c:92 #, c-format msgid "" "Options are:\n" @@ -66,7 +66,7 @@ "[ <device> [...] | ALL ] [ --debuginfo ]\n" msgstr "" -#: iostat.c:98 +#: iostat.c:99 #, c-format msgid "" "Options are:\n" @@ -78,7 +78,7 @@ "[ <device> [...] | ALL ]\n" msgstr "" -#: iostat.c:2126 sa_common.c:2263 +#: iostat.c:2171 sa_common.c:2263 #, c-format msgid "Invalid type of persistent device name\n" msgstr "" @@ -92,7 +92,7 @@ "[ --dec={ 0 | 1 | 2 } ] [ -o JSON ] [ -P { <cpu_list> | ALL } ]\n" msgstr "" -#: mpstat.c:1736 pidstat.c:2288 sar.c:382 +#: mpstat.c:1758 pidstat.c:2288 sar.c:382 msgid "Average:" msgstr "" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sysstat-12.4.3/pcp_def_metrics.c new/sysstat-12.4.4/pcp_def_metrics.c --- old/sysstat-12.4.3/pcp_def_metrics.c 2021-02-14 10:21:47.000000000 +0100 +++ new/sysstat-12.4.4/pcp_def_metrics.c 2021-12-05 09:02:24.000000000 +0100 @@ -1,5 +1,5 @@ /* - * pcp_def_metrics.c: Funtions used by sadf to define PCP metrics + * pcp_def_metrics.c: Functions used by sadf to define PCP metrics * (C) 2019-2020 by Sebastien GODARD (sysstat <at> orange.fr) * *************************************************************************** diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sysstat-12.4.3/pcp_stats.c new/sysstat-12.4.4/pcp_stats.c --- old/sysstat-12.4.3/pcp_stats.c 2021-02-14 10:21:47.000000000 +0100 +++ new/sysstat-12.4.4/pcp_stats.c 2021-12-05 09:02:24.000000000 +0100 @@ -1,5 +1,5 @@ /* - * pcp_stats.c: Funtions used by sadf to create PCP archive files. + * pcp_stats.c: Functions used by sadf to create PCP archive files. * (C) 2019-2020 by Sebastien GODARD (sysstat <at> orange.fr) * *************************************************************************** diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sysstat-12.4.3/rndr_stats.c new/sysstat-12.4.4/rndr_stats.c --- old/sysstat-12.4.3/rndr_stats.c 2021-02-14 10:21:47.000000000 +0100 +++ new/sysstat-12.4.4/rndr_stats.c 2021-12-05 09:02:24.000000000 +0100 @@ -1,5 +1,5 @@ /* - * rndr_stats.c: Funtions used by sadf to display statistics in selected format. + * rndr_stats.c: Functions used by sadf to display statistics in selected format. * (C) 1999-2020 by Sebastien GODARD (sysstat <at> orange.fr) * *************************************************************************** diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sysstat-12.4.3/sa2.in new/sysstat-12.4.4/sa2.in --- old/sysstat-12.4.3/sa2.in 2021-02-14 10:21:47.000000000 +0100 +++ new/sysstat-12.4.4/sa2.in 2021-12-05 09:02:24.000000000 +0100 @@ -67,13 +67,13 @@ SAFILES_REGEX='/sar?[0-9]{2,8}(\.(Z|gz|bz2|xz|lz|lzo))?$' find "${SA_DIR}" -type f -mtime +${HISTORY} \ - | egrep "${SAFILES_REGEX}" \ + | grep -E "${SAFILES_REGEX}" \ | xargs rm -f UNCOMPRESSED_SAFILES_REGEX='/sar?[0-9]{2,8}$' find "${SA_DIR}" -type f -mtime +${COMPRESSAFTER} \ - | egrep "${UNCOMPRESSED_SAFILES_REGEX}" \ + | grep -E "${UNCOMPRESSED_SAFILES_REGEX}" \ | xargs -r "${ZIP}" > /dev/null exit 0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sysstat-12.4.3/sadc.c new/sysstat-12.4.4/sadc.c --- old/sysstat-12.4.3/sadc.c 2021-02-14 10:21:47.000000000 +0100 +++ new/sysstat-12.4.4/sadc.c 2021-12-05 09:02:24.000000000 +0100 @@ -110,7 +110,7 @@ * * IN: * @group_id Group identification number. - * @opt_f Optionnal flag to set. + * @opt_f Optional flag to set. *************************************************************************** */ void collect_group_activities(unsigned int group_id, unsigned int opt_f) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sysstat-12.4.3/sadf.c new/sysstat-12.4.4/sadf.c --- old/sysstat-12.4.3/sadf.c 2021-02-14 10:21:47.000000000 +0100 +++ new/sysstat-12.4.4/sadf.c 2021-12-05 09:02:24.000000000 +0100 @@ -655,7 +655,7 @@ if (reset_cd) { /* * See note in sar.c. - * NB: Reseting cross_day is needed only if datafile + * NB: Resetting cross_day is needed only if datafile * may be rewinded (eg. in db or ppc output formats). */ cross_day = 0; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sysstat-12.4.3/sadf_misc.c new/sysstat-12.4.4/sadf_misc.c --- old/sysstat-12.4.3/sadf_misc.c 2021-02-14 10:21:47.000000000 +0100 +++ new/sysstat-12.4.4/sadf_misc.c 2021-12-05 09:02:24.000000000 +0100 @@ -1,5 +1,5 @@ /* - * sadf_misc.c: Funtions used by sadf to display special records + * sadf_misc.c: Functions used by sadf to display special records * (C) 2011-2020 by Sebastien GODARD (sysstat <at> orange.fr) * *************************************************************************** diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sysstat-12.4.3/svg_stats.c new/sysstat-12.4.4/svg_stats.c --- old/sysstat-12.4.3/svg_stats.c 2021-02-14 10:21:47.000000000 +0100 +++ new/sysstat-12.4.4/svg_stats.c 2021-12-05 09:02:24.000000000 +0100 @@ -1,5 +1,5 @@ /* - * svg_stats.c: Funtions used by sadf to display statistics in SVG format. + * svg_stats.c: Functions used by sadf to display statistics in SVG format. * (C) 2016-2020 by Sebastien GODARD (sysstat <at> orange.fr) * *************************************************************************** @@ -86,8 +86,8 @@ * the fields in the statistics structure. * * OUT: - * @spmin Array containg the possible new min values for current activity. - * @spmax Array containg the possible new max values for current activity. + * @spmin Array containing the possible new min values for current activity. + * @spmax Array containing the possible new max values for current activity. *************************************************************************** */ void save_extrema(unsigned int types_nr[], void *cs, void *ps, unsigned long long itv, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sysstat-12.4.3/sysstat-12.4.3.lsm new/sysstat-12.4.4/sysstat-12.4.3.lsm --- old/sysstat-12.4.3/sysstat-12.4.3.lsm 2021-02-14 10:21:47.000000000 +0100 +++ new/sysstat-12.4.4/sysstat-12.4.3.lsm 1970-01-01 01:00:00.000000000 +0100 @@ -1,35 +0,0 @@ -Begin4 -Title: sysstat - the sar, sadf, mpstat, iostat, tapestat, pidstat and cifsiostat commands for Linux -Version: 12.4.3 -Entered-date: 2021-02-14 -Description: The sysstat package contains the sar, sadf, mpstat, iostat, tapestat, - pidstat, cifsiostat and sa tools for Linux. - The sar command collects and reports system activity - information. - The information collected by sar can be saved in a file - in a binary format for future inspection. - The statistics reported by sar concern I/O transfer rates, - paging activity, process-related activities, interrupts, - network activity, memory and swap space utilization, CPU - utilization, kernel activities and TTY statistics, among - others. Both UP and SMP machines are fully supported. - The sadf command is used to display data collected by sar in various - formats (XML, database-friendly, etc.) and to draw graphs (SVG). - The mpstat command reports global and per-processor statistics. - The iostat command reports CPU utilization and I/O statistics - for disks. - The tapestat command reports statistics for tape drives connected - to the system. - The pidstat command reports statistics for Linux tasks (processes). - The cifsiostat command reports I/O statistics for CIFS filesystems. - NB: Send bugs, patches, suggestions and/or questions to - (sysstat [at] orange.fr). - URL: http://pagesperso-orange.fr/sebastien.godard/ -Keywords: system administration, system monitoring, sar, sadf, iostat, mpstat, tapestat, pidstat, system accounting, performance, tuning -Author: syss...@nospam.orange.fr (Sebastien Godard) -Maintained-by: syss...@nospam.orange.fr (Sebastien Godard) -Primary-site: http://pagesperso-orange.fr/sebastien.godard/ - 792kiB sysstat-12.4.3.tar.xz -Alternate-site: -Copying-policy: GPL -End diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sysstat-12.4.3/sysstat-12.4.3.spec new/sysstat-12.4.4/sysstat-12.4.3.spec --- old/sysstat-12.4.3/sysstat-12.4.3.spec 2021-02-14 10:21:47.000000000 +0100 +++ new/sysstat-12.4.4/sysstat-12.4.3.spec 1970-01-01 01:00:00.000000000 +0100 @@ -1,83 +0,0 @@ -Summary: SAR, SADF, MPSTAT, IOSTAT, TAPESTAT, PIDSTAT and CIFSIOSTAT for Linux -Name: sysstat -Version: 12.4.3 -Release: 1 -License: GPL -Group: Applications/System -Source0: %{name}-%{version}.tar.gz -URL: http://pagesperso-orange.fr/sebastien.godard/ -Packager: Sebastien Godard <sysstat _at_ orange.fr> -BuildRoot: %{_tmppath}/%{name}-%{version}-root-%(id -u -n) -Requires: gettext - -%description -The sysstat package contains the sar, sadf, mpstat, iostat, tapestat, -pidstat, cifsiostat and sa tools for Linux. -The sar command collects and reports system activity information. -The information collected by sar can be saved in a file in a binary -format for future inspection. The statistics reported by sar concern -I/O transfer rates, paging activity, process-related activities, -interrupts, network activity, memory and swap space utilization, CPU -utilization, kernel activities and TTY statistics, among others. Both -UP and SMP machines are fully supported. -The sadf command may be used to display data collected by sar in -various formats (CSV, XML, etc.) and to draw graphs (SVG). -The iostat command reports CPU utilization and I/O statistics for disks. -The tapestat command reports statistics for tapes connected to the system. -The mpstat command reports global and per-processor statistics. -The pidstat command reports statistics for Linux tasks (processes). -The cifsiostat command reports I/O statistics for CIFS filesystems. - -%define debug_package %{nil} - -%prep -%setup - -%build -# To include cron installation, add options --enable-install-cron and --enable-copy-only -./configure --prefix=%{_prefix} \ - --disable-file-attr \ - sa_lib_dir=%{_libdir}/sa \ - --mandir=%{_mandir} \ - DESTDIR=$RPM_BUILD_ROOT -make - -%install -rm -rf $RPM_BUILD_ROOT -install -d $RPM_BUILD_ROOT/var/log/sa - -make install - -mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d -install -m 755 sysstat $RPM_BUILD_ROOT/etc/rc.d/init.d/sysstat -mkdir -p $RPM_BUILD_ROOT/etc/sysconfig -install -m 644 sysstat.sysconfig $RPM_BUILD_ROOT/etc/sysconfig/sysstat -install -m 644 sysstat.ioconf $RPM_BUILD_ROOT/etc/sysconfig/sysstat.ioconf -mkdir -p $RPM_BUILD_ROOT/etc/cron.d -install -m 644 cron/sysstat.crond.sample $RPM_BUILD_ROOT/etc/cron.d/sysstat -mkdir -p $RPM_BUILD_ROOT/etc/rc2.d -cd $RPM_BUILD_ROOT/etc/rc2.d && ln -sf ../init.d/sysstat S01sysstat -mkdir -p $RPM_BUILD_ROOT/etc/rc3.d -cd $RPM_BUILD_ROOT/etc/rc3.d && ln -sf ../init.d/sysstat S01sysstat -mkdir -p $RPM_BUILD_ROOT/etc/rc5.d -cd $RPM_BUILD_ROOT/etc/rc5.d && ln -sf ../init.d/sysstat S01sysstat - -%clean -rm -rf $RPM_BUILD_ROOT - -%files -%defattr(644,root,root,755) -%doc %{_datadir}/doc/sysstat-%{version}/* -%attr(755,root,root) %{_bindir}/* -%attr(755,root,root) %{_libdir}/sa/* -%attr(644,root,root) %{_mandir}/man*/* -%attr(644,root,root) %{_datadir}/locale/*/LC_MESSAGES/sysstat.mo -%attr(755,root,root) %dir /var/log/sa -%attr(755,root,root) /etc/rc.d/init.d/sysstat -%attr(644,root,root) /etc/sysconfig/sysstat -%attr(644,root,root) /etc/sysconfig/sysstat.ioconf -/etc/rc2.d/S01sysstat -/etc/rc3.d/S01sysstat -/etc/rc5.d/S01sysstat -%config(noreplace) %attr(0644,root,root) /etc/cron.d/sysstat - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sysstat-12.4.3/sysstat-12.4.4.lsm new/sysstat-12.4.4/sysstat-12.4.4.lsm --- old/sysstat-12.4.3/sysstat-12.4.4.lsm 1970-01-01 01:00:00.000000000 +0100 +++ new/sysstat-12.4.4/sysstat-12.4.4.lsm 2021-12-05 09:02:24.000000000 +0100 @@ -0,0 +1,35 @@ +Begin4 +Title: sysstat - the sar, sadf, mpstat, iostat, tapestat, pidstat and cifsiostat commands for Linux +Version: 12.4.4 +Entered-date: 2021-12-05 +Description: The sysstat package contains the sar, sadf, mpstat, iostat, tapestat, + pidstat, cifsiostat and sa tools for Linux. + The sar command collects and reports system activity + information. + The information collected by sar can be saved in a file + in a binary format for future inspection. + The statistics reported by sar concern I/O transfer rates, + paging activity, process-related activities, interrupts, + network activity, memory and swap space utilization, CPU + utilization, kernel activities and TTY statistics, among + others. Both UP and SMP machines are fully supported. + The sadf command is used to display data collected by sar in various + formats (XML, database-friendly, etc.) and to draw graphs (SVG). + The mpstat command reports global and per-processor statistics. + The iostat command reports CPU utilization and I/O statistics + for disks. + The tapestat command reports statistics for tape drives connected + to the system. + The pidstat command reports statistics for Linux tasks (processes). + The cifsiostat command reports I/O statistics for CIFS filesystems. + NB: Send bugs, patches, suggestions and/or questions to + (sysstat [at] orange.fr). + URL: http://pagesperso-orange.fr/sebastien.godard/ +Keywords: system administration, system monitoring, sar, sadf, iostat, mpstat, tapestat, pidstat, system accounting, performance, tuning +Author: syss...@nospam.orange.fr (Sebastien Godard) +Maintained-by: syss...@nospam.orange.fr (Sebastien Godard) +Primary-site: http://pagesperso-orange.fr/sebastien.godard/ + 793kiB sysstat-12.4.4.tar.xz +Alternate-site: +Copying-policy: GPL +End diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sysstat-12.4.3/sysstat-12.4.4.spec new/sysstat-12.4.4/sysstat-12.4.4.spec --- old/sysstat-12.4.3/sysstat-12.4.4.spec 1970-01-01 01:00:00.000000000 +0100 +++ new/sysstat-12.4.4/sysstat-12.4.4.spec 2021-12-05 09:02:24.000000000 +0100 @@ -0,0 +1,83 @@ +Summary: SAR, SADF, MPSTAT, IOSTAT, TAPESTAT, PIDSTAT and CIFSIOSTAT for Linux +Name: sysstat +Version: 12.4.4 +Release: 1 +License: GPL +Group: Applications/System +Source0: %{name}-%{version}.tar.gz +URL: http://pagesperso-orange.fr/sebastien.godard/ +Packager: Sebastien Godard <sysstat _at_ orange.fr> +BuildRoot: %{_tmppath}/%{name}-%{version}-root-%(id -u -n) +Requires: gettext + +%description +The sysstat package contains the sar, sadf, mpstat, iostat, tapestat, +pidstat, cifsiostat and sa tools for Linux. +The sar command collects and reports system activity information. +The information collected by sar can be saved in a file in a binary +format for future inspection. The statistics reported by sar concern +I/O transfer rates, paging activity, process-related activities, +interrupts, network activity, memory and swap space utilization, CPU +utilization, kernel activities and TTY statistics, among others. Both +UP and SMP machines are fully supported. +The sadf command may be used to display data collected by sar in +various formats (CSV, XML, etc.) and to draw graphs (SVG). +The iostat command reports CPU utilization and I/O statistics for disks. +The tapestat command reports statistics for tapes connected to the system. +The mpstat command reports global and per-processor statistics. +The pidstat command reports statistics for Linux tasks (processes). +The cifsiostat command reports I/O statistics for CIFS filesystems. + +%define debug_package %{nil} + +%prep +%setup + +%build +# To include cron installation, add options --enable-install-cron and --enable-copy-only +./configure --prefix=%{_prefix} \ + --disable-file-attr \ + sa_lib_dir=%{_libdir}/sa \ + --mandir=%{_mandir} \ + DESTDIR=$RPM_BUILD_ROOT +make + +%install +rm -rf $RPM_BUILD_ROOT +install -d $RPM_BUILD_ROOT/var/log/sa + +make install + +mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d +install -m 755 sysstat $RPM_BUILD_ROOT/etc/rc.d/init.d/sysstat +mkdir -p $RPM_BUILD_ROOT/etc/sysconfig +install -m 644 sysstat.sysconfig $RPM_BUILD_ROOT/etc/sysconfig/sysstat +install -m 644 sysstat.ioconf $RPM_BUILD_ROOT/etc/sysconfig/sysstat.ioconf +mkdir -p $RPM_BUILD_ROOT/etc/cron.d +install -m 644 cron/sysstat.crond.sample $RPM_BUILD_ROOT/etc/cron.d/sysstat +mkdir -p $RPM_BUILD_ROOT/etc/rc2.d +cd $RPM_BUILD_ROOT/etc/rc2.d && ln -sf ../init.d/sysstat S01sysstat +mkdir -p $RPM_BUILD_ROOT/etc/rc3.d +cd $RPM_BUILD_ROOT/etc/rc3.d && ln -sf ../init.d/sysstat S01sysstat +mkdir -p $RPM_BUILD_ROOT/etc/rc5.d +cd $RPM_BUILD_ROOT/etc/rc5.d && ln -sf ../init.d/sysstat S01sysstat + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%defattr(644,root,root,755) +%doc %{_datadir}/doc/sysstat-%{version}/* +%attr(755,root,root) %{_bindir}/* +%attr(755,root,root) %{_libdir}/sa/* +%attr(644,root,root) %{_mandir}/man*/* +%attr(644,root,root) %{_datadir}/locale/*/LC_MESSAGES/sysstat.mo +%attr(755,root,root) %dir /var/log/sa +%attr(755,root,root) /etc/rc.d/init.d/sysstat +%attr(644,root,root) /etc/sysconfig/sysstat +%attr(644,root,root) /etc/sysconfig/sysstat.ioconf +/etc/rc2.d/S01sysstat +/etc/rc3.d/S01sysstat +/etc/rc5.d/S01sysstat +%config(noreplace) %attr(0644,root,root) /etc/cron.d/sysstat + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sysstat-12.4.3/tests/expected.mpstat-A new/sysstat-12.4.4/tests/expected.mpstat-A --- old/sysstat-12.4.3/tests/expected.mpstat-A 2021-02-14 10:21:47.000000000 +0100 +++ new/sysstat-12.4.4/tests/expected.mpstat-A 2021-12-05 09:02:24.000000000 +0100 @@ -70,7 +70,6 @@ 00:00:02 3 0.00 00:00:02 4 92.96 00:00:02 5 75.35 -00:00:02 6 0.00 00:00:02 7 34.86 00:00:01 CPU 0/s 8/s 9/s 16/s 17/s 18/s 19/s 23/s 24/s 25/s 26/s 27/s 28/s 29/s 30/s 31/s 32/s 33/s 34/s 35/s 36/s NMI/s LOC/s SPU/s PMI/s IWI/s RTR/s RES/s CAL/s TLB/s TRM/s THR/s DFR/s MCE/s MCP/s HYP/s HRE/s HVS/s ERR/s MIS/s PIN/s NPI/s PIW/s @@ -80,7 +79,6 @@ 00:00:02 3 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 10.21 0.00 0.00 0.00 0.10 1010.24 0.00 0.10 0.00 0.00 0.16 0.38 0.32 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 00:00:02 4 0.00 0.00 0.00 0.00 0.00 0.00 23.34 23.88 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 4783.96 0.00 0.00 0.00 0.00 4.61 5.09 13.48 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 00:00:02 5 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.03 2852.85 0.00 0.03 0.00 0.00 3.36 12.64 24.20 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 -00:00:02 6 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 137.10 0.00 0.00 0.00 6864.76 0.00 0.00 0.00 0.00 4.29 7.75 20.52 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 00:00:02 7 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 1132.78 0.00 0.00 0.00 0.00 2.37 3.68 10.69 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 00:00:01 CPU HI/s TIMER/s NET_TX/s NET_RX/s BLOCK/s IRQ_POLL/s TASKLET/s SCHED/s HRTIMER/s RCU/s @@ -90,7 +88,6 @@ 00:00:02 3 0.00 23.50 0.13 0.83 0.00 0.00 0.00 13.25 0.00 14.79 00:00:02 4 6.47 29.00 0.00 0.00 0.42 0.00 21.96 19.49 0.00 15.62 00:00:02 5 0.00 36.14 0.00 0.00 0.99 0.00 0.00 18.21 0.00 20.01 -00:00:02 6 0.00 33.07 0.00 0.00 0.00 0.00 0.00 15.72 0.00 18.25 00:00:02 7 0.00 16.77 0.00 0.00 0.00 0.00 0.00 8.51 0.00 9.57 Average: CPU %usr %nice %sys %iowait %irq %soft %steal %guest %gnice %idle diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sysstat-12.4.3/xml_stats.c new/sysstat-12.4.4/xml_stats.c --- old/sysstat-12.4.3/xml_stats.c 2021-02-14 10:21:47.000000000 +0100 +++ new/sysstat-12.4.4/xml_stats.c 2021-12-05 09:02:24.000000000 +0100 @@ -1,5 +1,5 @@ /* - * xml_stats.c: Funtions used by sadf to display statistics in XML. + * xml_stats.c: Functions used by sadf to display statistics in XML. * (C) 1999-2020 by Sebastien GODARD (sysstat <at> orange.fr) * ***************************************************************************