]> granicus.if.org Git - sysstat/log
sysstat
9 years agocorrect header so its always "filesystems"
Steve Kay [Fri, 27 Mar 2015 22:55:47 +0000 (15:55 -0700)]
correct header so its always "filesystems"

9 years agojson output with support for -F MOUNT
Steve Kay [Fri, 27 Mar 2015 22:44:35 +0000 (15:44 -0700)]
json output with support for -F MOUNT

9 years agoRewrite code parsing sar's option -F
Sebastien GODARD [Fri, 27 Mar 2015 15:58:45 +0000 (16:58 +0100)]
Rewrite code parsing sar's option -F

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
9 years agoUse proper length for mountp string
Sebastien GODARD [Fri, 27 Mar 2015 15:52:27 +0000 (16:52 +0100)]
Use proper length for mountp string

We read 256 chars for the mountpoint name to (try to) be sure to get it
all, and so ths statvfs() function won't fail in read_filesystem()
function.
Yet only MAX_FS_LEN chars should be saved in stats_filesystem structure.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
9 years agoMerge branch 'jaunix-show-mounts'
Sebastien GODARD [Fri, 27 Mar 2015 15:37:59 +0000 (16:37 +0100)]
Merge branch 'jaunix-show-mounts'

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
9 years agoUpdate configure script
Sebastien GODARD [Tue, 24 Mar 2015 21:07:10 +0000 (22:07 +0100)]
Update configure script

Make configure script consistent with configure.in.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
9 years agoFix issue #48 for good: sar skips long filesystem names
Sebastien GODARD [Tue, 24 Mar 2015 20:38:07 +0000 (21:38 +0100)]
Fix issue #48 for good: sar skips long filesystem names

How the number of filesystems is counted should be consistent with
commit a82d6ab.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
9 years agoMerge branch 'show-mounts' of https://github.com/jaunix/sysstat into jaunix-show...
Sebastien GODARD [Tue, 24 Mar 2015 20:08:12 +0000 (21:08 +0100)]
Merge branch 'show-mounts' of https://github.com/jaunix/sysstat into jaunix-show-mounts

Add option to show mountpoint names instead of filesystem device, via
sar -F MOUNT.

9 years agoFix issue #48: sar skips long filesystem names
Sebastien GODARD [Fri, 20 Mar 2015 17:23:11 +0000 (18:23 +0100)]
Fix issue #48: sar skips long filesystem names

If a filesystem had more than MAX_FS_LEN characters in length, sar
didn't display it.
This patch fixes the problem.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
9 years agoIncrease maximum fs name length to 128
Sebastien GODARD [Fri, 20 Mar 2015 16:10:16 +0000 (17:10 +0100)]
Increase maximum fs name length to 128

Previous value was 72 and was considered a bit too small.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
9 years agoSmall fix in sar help message
Sebastien GODARD [Fri, 20 Mar 2015 13:27:21 +0000 (14:27 +0100)]
Small fix in sar help message

A line was not properly indented in help message displayed by sar -h.
Reported by @stevekay.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
9 years agoCall chkconfig only if $(COPY_ONLY) is set to no
Sebastien GODARD [Thu, 19 Mar 2015 20:22:55 +0000 (21:22 +0100)]
Call chkconfig only if $(COPY_ONLY) is set to no

Call chkconfig (or create corresponding links) only if
$(COPY_ONLY) variable is set to no.
The chkconfig command doesn't take into account the $(DESTDIR) variable
contents, trying to create links outside the $(DESTDIR) tree, which can
be considered as a way to activate sysstat service.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
9 years agoFix installation on systems w/o chkconfig command
Sebastien GODARD [Mon, 16 Mar 2015 20:24:59 +0000 (21:24 +0100)]
Fix installation on systems w/o chkconfig command

On systems without chkconfig command, the variable CHKCONFIG is empty.
Its contents should be enclosed in double quotes to be properly tested.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
9 years agoAdditional fixes for system w/o systemd
Sebastien GODARD [Mon, 16 Mar 2015 20:14:34 +0000 (21:14 +0100)]
Additional fixes for system w/o systemd

For systems without systemd, some variables may get expanded into empty
strings, eg.:

if [ -z "$(SYSTEMD_UNIT_DIR)" -o ! -d $(DESTDIR)$(SYSTEMD_UNIT_DIR) ]...

may be expanded into:

if [ -z "" -o ! -d  ]...

when DESTDIR is also unset. This causes an error when executed:

/bin/sh: line 0: [: argument expected

The solution is to enclose these variables in double quotes.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
9 years agoMerge branch 'jaunix-mpstat'
Sebastien GODARD [Sun, 15 Mar 2015 16:21:28 +0000 (17:21 +0100)]
Merge branch 'jaunix-mpstat'

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
9 years agoAdd option to display mountpoint names instead of filesystem names.
Steve Kay [Fri, 13 Mar 2015 22:24:10 +0000 (15:24 -0700)]
Add option to display mountpoint names instead of filesystem names.

9 years agoColumn widths : revise style to match existing code, use snprintf, calculate widths...
Steve Kay [Fri, 13 Mar 2015 08:57:28 +0000 (01:57 -0700)]
Column widths : revise style to match existing code, use snprintf, calculate widths once.

9 years agofix mpstat SCPU alignment output
Steve Kay [Thu, 12 Mar 2015 23:09:02 +0000 (16:09 -0700)]
fix mpstat SCPU alignment output

9 years agopidstat: Don't stop if gtime and cgtime fields are unavailable
Sebastien GODARD [Thu, 12 Mar 2015 20:39:58 +0000 (21:39 +0100)]
pidstat: Don't stop if gtime and cgtime fields are unavailable

With some old 2.6 kernels, fields "gtime" and "cgtime" (which are
expected to be read from /proc/#/stat file) may not be present.
pidstat used to stop should this case happens.
Fix this since these fields are not mandatory for pidstat to display its
statistics.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
9 years agosysstat init script may sometimes be called rc.sysstat
Sebastien GODARD [Sun, 8 Mar 2015 15:41:16 +0000 (16:41 +0100)]
sysstat init script may sometimes be called rc.sysstat

In some distros sysstat init script is called rc.sysstat.
So use that name with chkconfig and when uninstalling, remove links with
names like S??rc.sysstat and K??rc.sysstat.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
9 years agoEscape parentheses in Makefile
Sebastien GODARD [Sun, 8 Mar 2015 14:28:20 +0000 (15:28 +0100)]
Escape parentheses in Makefile

"make install" crashes when --enable-install-cron has been used at
configuration stage:

if [ ( -z "/usr/lib/systemd/system" -o ! -d /usr/lib/systemd/system ) -a
! -d /etc/cron.d ]; then \
        if [ ! -d /etc/cron.hourly -o ! -d /etc/cron.daily ]; then \
                su root -c "crontab -l > /tmp/crontab-root.save"; \
                /bin/cp -a /tmp/crontab-root.save ./crontab-root.`date
'+%Y%m%d.%H%M%S'`.save; \
                echo "USER'S PREVIOUS CRONTAB SAVED IN CURRENT DIRECTORY
(USING .save SUFFIX)."; \
                su root -c "crontab cron/crontab"; \
        fi \
fi
/bin/sh: -c: line 0: syntax error near unexpected token `-z'
/bin/sh: -c: line 0: `if [ ( -z "/usr/lib/systemd/system" -o ! -d
/usr/lib/systemd/system ) -a ! -d /etc/cron.d ]; then \'
make: *** [install_all] Error 1

This is because parentheses need to be escaped in Makefile.in.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
9 years agoMerge branch 'master' of https://github.com/pschiffe/sysstat
Sebastien GODARD [Tue, 3 Mar 2015 17:07:11 +0000 (18:07 +0100)]
Merge branch 'master' of https://github.com/pschiffe/sysstat

9 years agoDon't look in weird places for programs during configuration
Peter Schiffer [Mon, 2 Mar 2015 20:47:58 +0000 (21:47 +0100)]
Don't look in weird places for programs during configuration

Also, don't pretend that programs exist if they don't (don't use
[value-if-not-found] for some programs).

9 years agopermit hh:mm:ss as well as hh:mm
Steve Kay [Mon, 2 Mar 2015 20:11:42 +0000 (12:11 -0800)]
permit hh:mm:ss as well as hh:mm

9 years agoFixed installation of systemd/cron files on systems w/o systemd
Peter Schiffer [Mon, 2 Mar 2015 16:40:11 +0000 (17:40 +0100)]
Fixed installation of systemd/cron files on systems w/o systemd

9 years agoCreate appropriate directories in DESTDIR if missing
Peter Schiffer [Mon, 2 Mar 2015 14:47:02 +0000 (15:47 +0100)]
Create appropriate directories in DESTDIR if missing

During systemd services / cron files installation to the DESTDIR, some
directories might not exist there, even though they exist outside the DESTDIR.

This is issue because Makefile relies on existence of those directories and
decides what gets installed according to this existence.

This patch creates appropriate directories in DESTDIR if those directories exist
outside of the DESTDIR.

9 years agoReplace spaces with tabs in Makefile.in
Peter Schiffer [Mon, 2 Mar 2015 13:21:41 +0000 (14:21 +0100)]
Replace spaces with tabs in Makefile.in

9 years agoTypo fixed
Sebastien GODARD [Sun, 15 Feb 2015 14:01:46 +0000 (15:01 +0100)]
Typo fixed

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
9 years agoUpdate sysstat(5) manual page
Sebastien GODARD [Sun, 15 Feb 2015 13:52:16 +0000 (14:52 +0100)]
Update sysstat(5) manual page

Be more precise when HISTORY variable is used with system activity data
files named saYYYYMMDD.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
9 years agoSmall fix in FAQ
Sebastien GODARD [Sun, 15 Feb 2015 13:50:15 +0000 (14:50 +0100)]
Small fix in FAQ

Add shell prompt at the beginning of the command line.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
9 years agoStarting sysstat 11.1.4
Sebastien GODARD [Fri, 13 Feb 2015 14:28:39 +0000 (15:28 +0100)]
Starting sysstat 11.1.4

Update version number in configure script.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
9 years agosysstat 11.1.3 v11.1.3
Sebastien GODARD [Fri, 13 Feb 2015 14:22:04 +0000 (15:22 +0100)]
sysstat 11.1.3

sysstat version 11.1.3 final packaging.
Changelog added.
lsm file and configure script updated.

NOTE: A stable version (11.0.3) also exists and will be available for
download from my web site:

http://pagesperso-orange.fr/sebastien.godard/

The stable version includes only the bug fixes added in sysstat 11.1.3
but not the new features.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
9 years agoUpdated 64 bit OS detection in configure
Peter Schiffer [Thu, 12 Feb 2015 09:52:25 +0000 (10:52 +0100)]
Updated 64 bit OS detection in configure

If command "getconf LONG_BIT" fails, fallback to the looking for the "lm" flag
in the /proc/cpuinfo file.

9 years agoPortable way to detect 64 bit OS in configure script
Peter Schiffer [Wed, 11 Feb 2015 18:21:12 +0000 (19:21 +0100)]
Portable way to detect 64 bit OS in configure script

Different architectures have different format of /proc/cpuinfo and also, only
i386 and x86_64 archs support cpu flags. Using "getconf LONG_BIT" command it's
possible to detect 64 bit OS on multiple different architectures. This patch was
successfully tested on i386, x86_64, s390x, ppc64 and aarch64 archs.

9 years agoUpdate sysstat's FAQ
Sebastien GODARD [Sun, 1 Feb 2015 10:57:27 +0000 (11:57 +0100)]
Update sysstat's FAQ

Tell the user about "sadf -c", a command which can be used to convert an
old system activity binary data file to the up-to-date format.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
9 years agoReplace "Summary" with "Summary:"
Sebastien GODARD [Tue, 27 Jan 2015 12:48:33 +0000 (13:48 +0100)]
Replace "Summary" with "Summary:"

To be consistent with "Average:" displayed by sar.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
9 years agoBetter handling of get_activity_position() return value
Sebastien GODARD [Tue, 27 Jan 2015 11:23:50 +0000 (12:23 +0100)]
Better handling of get_activity_position() return value

Function get_activity_position() can return -1 on error, ie. when
corresponding activity hasn't been found in array.
This return code was sometimes not tested because we knew that the
activity existed. So we directly used the return code as array index.
Strengthen things now: If such an activity is not found then display an
internal error message and exit.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
9 years agoClean code
Sebastien GODARD [Sun, 25 Jan 2015 14:35:00 +0000 (15:35 +0100)]
Clean code

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
9 years agoMerge branch 'pschiffe-coverity'
Sebastien GODARD [Sun, 25 Jan 2015 14:24:13 +0000 (15:24 +0100)]
Merge branch 'pschiffe-coverity'

9 years agoMerge branch 'coverity' of https://github.com/pschiffe/sysstat into pschiffe-coverity
Sebastien GODARD [Sun, 25 Jan 2015 14:21:01 +0000 (15:21 +0100)]
Merge branch 'coverity' of https://github.com/pschiffe/sysstat into pschiffe-coverity

9 years agoUpdate sadc manual page
Sebastien GODARD [Sat, 24 Jan 2015 13:53:30 +0000 (14:53 +0100)]
Update sadc manual page

Update sadc manual page to indicate that a list of comma separated
keywords can be entered following option -S (eg. -S DISK,POWER,IPV6).

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
9 years agoClean "configure" script
Sebastien GODARD [Sat, 24 Jan 2015 13:43:36 +0000 (14:43 +0100)]
Clean "configure" script

Remove unneeded comments.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
9 years agoAdd new sadc_options variable to configure script
Sebastien GODARD [Fri, 23 Jan 2015 20:33:52 +0000 (21:33 +0100)]
Add new sadc_options variable to configure script

Add a new variable (sadc_options) used by the configure script.
This option enables the user to enter parameters that will be passed to
sadc in the sa1 script. This can typically be used to select optional
activities that should be collected by sadc.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
9 years agoFixes from static analysis
Peter Schiffer [Wed, 21 Jan 2015 18:43:09 +0000 (19:43 +0100)]
Fixes from static analysis

This patch fixes multiple issues found by static analysis.

9 years agoUpdate sysstat spec file
Sebastien GODARD [Wed, 21 Jan 2015 10:02:46 +0000 (11:02 +0100)]
Update sysstat spec file

RPM spec file for sysstat package has been updated:
1) Now use --disable-file-attr option with configure to allow a non
privileged user to build the package,
2) Remove %attr directive which cannot be applied on symlinks listed in
%files section.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
9 years agoEdit comments
Sebastien GODARD [Wed, 21 Jan 2015 09:45:38 +0000 (10:45 +0100)]
Edit comments

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
9 years agoOption --enable-copy-only should not activate a crontab
Sebastien GODARD [Wed, 21 Jan 2015 09:33:21 +0000 (10:33 +0100)]
Option --enable-copy-only should not activate a crontab

Make sure that no crontabs are activated when option --enable-copy-only
is used with ./configure.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
9 years agoRename --disable-man-group option to --disable-file-attr
Sebastien GODARD [Mon, 19 Jan 2015 20:40:33 +0000 (21:40 +0100)]
Rename --disable-man-group option to --disable-file-attr

This option was originally intended to prevent the configuration process
from setting the group ID for manual pages that were installed.
It is now also used to tell the build process to not set the user and
group of the /var/log/sa directory when it is created.
This option may be useful when creating an RPM package with a non
privileged user.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
9 years agoPrefer xz compression program when compressing sa data files
Peter Schiffer [Thu, 15 Jan 2015 19:23:58 +0000 (20:23 +0100)]
Prefer xz compression program when compressing sa data files

Now, when the sa2 script fully supports xz files, let's use them by default when
compressing sa data files as it's more efficient than bzip2.

9 years agoClean code
Sebastien GODARD [Sat, 22 Nov 2014 15:15:51 +0000 (16:15 +0100)]
Clean code

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
9 years agoUpdate sar manual page.
Sebastien GODARD [Mon, 17 Nov 2014 20:25:50 +0000 (21:25 +0100)]
Update sar manual page.

Update sar manual page to describe new metrics added to memory
statistics displayed by sar -r.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
9 years agoFix wrong size used in upgrade_magic_section() function.
Sebastien GODARD [Sun, 16 Nov 2014 15:44:32 +0000 (16:44 +0100)]
Fix wrong size used in upgrade_magic_section() function.

Buffer was accessed out of bounds: file_magic.pad

   memset(file_magic->pad, 0, 64);

but

   unsigned char pad[63];

Reported by @dcb314.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
9 years agosadc/sar: New /proc/meminfo fields to memory statistics
Sebastien GODARD [Sun, 16 Nov 2014 15:06:31 +0000 (16:06 +0100)]
sadc/sar: New /proc/meminfo fields to memory statistics

Five new fields have been added to memory statistics displayed by sar.
These new fields are part of A_MEMORY activity and will be displayed
using option "-r ALL" with sar.
No layout format incompatible change with this patch: The datafile
created by this version of sar can still be read by a previous version
of sar (though the new fields won't be displayed of course as they are
unknown by this old version).
Various outputs from sadf (JSON, XML, etc.) have been updated to take
into account these new metrics.

Originally suggested by Peter Portante (@portante).

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
9 years agoFix description of %util in iostat and sar manual pages
Sebastien GODARD [Sat, 8 Nov 2014 14:52:45 +0000 (15:52 +0100)]
Fix description of %util in iostat and sar manual pages

Description of %util in iostat manual page was not accurate, because it
is not percentage of CPU time, but percentage of elapsed time during
which I/O requesrt were issued to the device.
Also make sar manual page consistent with that of iostat.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
9 years agosadc: Fix possible race condition in signal handler code
Sebastien GODARD [Sun, 2 Nov 2014 17:02:06 +0000 (18:02 +0100)]
sadc: Fix possible race condition in signal handler code

Commit 1b52f939 tried to stop sending SIGINT to init process.
But there may be very small time window between parent ID
validation and sending kill signal to parent. If sar dies
during this window (though the chance is very small) we end up
sending signal to init.

This patch fixes above issue.

Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Signed-off-by: Sripathi Kodi <sripathik@in.ibm.com>
Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
9 years agoStarting sysstat 11.1.3
Sebastien GODARD [Sun, 19 Oct 2014 14:03:19 +0000 (16:03 +0200)]
Starting sysstat 11.1.3

Update sysstat version number in configure script.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
9 years agosysstat 11.1.2 v11.1.2
Sebastien GODARD [Sun, 19 Oct 2014 13:53:48 +0000 (15:53 +0200)]
sysstat 11.1.2

sysstat version 11.1.2 final packaging.
lsm and spec files updated.
Changelog added.

NOTE: A stable version (11.0.2) also exists and will be available for
download from my web site:

http://pagesperso-orange.fr/sebastien.godard/

The stable version includes only the bug fixes added in sysstat 11.1.2
but not the new features.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
9 years agoNLS: Sync'd with Translation Project
Sebastien GODARD [Sun, 19 Oct 2014 13:43:41 +0000 (15:43 +0200)]
NLS: Sync'd with Translation Project

Sync'd with Translation Project. Polish translation updated.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
9 years agosadc: Don't send signal if parent process is already dead
Sebastien GODARD [Sat, 18 Oct 2014 13:35:43 +0000 (15:35 +0200)]
sadc: Don't send signal if parent process is already dead

If sar (parent of sadc) dies before sadc completes its job
then init will become sadc parent. Now if we pass SIGINT to
sadc, it will pass that to init process and result in system
reboot.

This patch check parent process before sending signal.

Test case:
  Run sar_test script in shell prompt and press ctrl+C twice.

  cat sar_test
    while true; do /usr/local/bin/sar -n DEV 1 3; sleep 3; done

Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
9 years agoAdd irqstat command
Sebastien GODARD [Sat, 18 Oct 2014 13:03:07 +0000 (15:03 +0200)]
Add irqstat command

Add new "irqstat" command (contributed by Lance Shelton from
SanDisk/Fusion-io). This command monitors /proc/interrupts and is
designed for NUMA systems with many processors.
irqstat is currently a Python script that you can find in the contrib
directory.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
9 years agoAdd irqtop command
Sebastien GODARD [Sun, 12 Oct 2014 13:07:26 +0000 (15:07 +0200)]
Add irqtop command

Add new "irqtop" command (contributed par Robert Elliott from HP).
This command monitors differences in /proc/interrupts and
/proc/softirqs per CPU, along with CPU statistics.
irqtop is currently a Perl script that you can find in the contrib
directory.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
9 years agosadc: Don't count items several times
Sebastien GODARD [Wed, 1 Oct 2014 09:55:25 +0000 (11:55 +0200)]
sadc: Don't count items several times

This patch makes sure that sadc doesn't count items several times.

Items here means CPU, network interfaces, etc.
sadc needs to count these items to allocate its structures for each
selected activity. But there are different activities based on the same
items (eg. A_CPU, A_PWR_CPUFREQ and A_PWR_WGHFREQ are all related to CPU
activities, or A_NET_DEV and A_NET_EDEV are related to network
interfaces). And so, when different activities based on the same
items were selected, the number of these items was counted several
times, which is inefficient.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
9 years agopidstat: Now handle processes with spaces in their name properly
Sebastien GODARD [Sat, 20 Sep 2014 13:39:58 +0000 (15:39 +0200)]
pidstat: Now handle processes with spaces in their name properly

pidstat had a bug which made it unable to handle processes with spaces
in their name, eg:

$ cat /proc/5768/stat
5768 (Plex New Transc) S 1264 1252 1252 0 -1 1077960704 17317 0 18 0
9260 137 0 0 15 -5 8 0 1430749 186589184 16704 18446744073709551615 1 1
0 0 0 0 0 0 8404998 18446744073709551615 0 0 17 1 0 0 22 0 0 0 0 0 0 0 0
0 0

This patch fixes the problem.

Reported by Chris Grindstaff (@cgrinds).

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
9 years agocifsiostat/nfsiostat: Fix output on single core CPU
Sebastien GODARD [Wed, 17 Sep 2014 19:16:18 +0000 (21:16 +0200)]
cifsiostat/nfsiostat: Fix output on single core CPU

Uninitialized variable led to wrong numbers being displayed by
cifsiostat and nfsiostat on single core CPU. On multi core machines
reported numbers are correct.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
10 years agoTell the user when an endian format mismatch is detected
Sebastien GODARD [Thu, 4 Sep 2014 12:47:32 +0000 (14:47 +0200)]
Tell the user when an endian format mismatch is detected

sar and sadf now tell the user when they cannot read a file because its
endian format doesn't match that of the host.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
10 years agoFix incomplete sadf output when end time crosses 24H boundary
Sebastien GODARD [Thu, 4 Sep 2014 11:53:31 +0000 (13:53 +0200)]
Fix incomplete sadf output when end time crosses 24H boundary

Same patch as commit 19b5020 applied to sadf.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
10 years agoFix incomplete sar output when end time crosses 24H boundary
Sebastien GODARD [Thu, 4 Sep 2014 11:12:58 +0000 (13:12 +0200)]
Fix incomplete sar output when end time crosses 24H boundary

sar output was incomplete when used with a file containing data
from two consecutive days and end time crossed 24 hour boundary.
A typical invocation like:

sar -A -s 21:50:00 -e 01:30:00 -f /path/to/datafile

resulted in CPU statistics being displayed only.

This patch fixes the problem and all selected activities are now
displayed.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
10 years agoStarting sysstat 11.1.2
Sebastien GODARD [Sat, 30 Aug 2014 14:42:15 +0000 (16:42 +0200)]
Starting sysstat 11.1.2

Update sysstat version number in configure script.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
10 years agosysstat 11.1.1 v11.1.1
Sebastien GODARD [Sat, 30 Aug 2014 14:30:01 +0000 (16:30 +0200)]
sysstat 11.1.1

sysstat version 11.1.1 final packaging.
lsm and spec files updated.
Changelog added.
Fixed a wrong comment in sa.h file.

NOTE: A stable version (11.0.1) also exists and will be available for
download from my web site:

http://pagesperso-orange.fr/sebastien.godard/

The stable version includes only the bug fixes added in sysstat 11.1.1
but not the new features.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
10 years agoNLS: Sync'd with Translation Project
Sebastien GODARD [Sat, 30 Aug 2014 14:12:11 +0000 (16:12 +0200)]
NLS: Sync'd with Translation Project

Sync'd with Translation Project. Various translations updated.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
10 years agoUpdate README file
Sebastien GODARD [Wed, 20 Aug 2014 07:38:29 +0000 (09:38 +0200)]
Update README file

Give instructions about sysstat's GitHub repository.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
10 years agoUpdate sadf -H output
Sebastien GODARD [Sat, 16 Aug 2014 14:01:45 +0000 (16:01 +0200)]
Update sadf -H output

Update sadf -H output to:
1) display the date the file was created
2) tell whether this is a genuine sa datafile (ie. not converted from an
old datafile) or not.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
10 years agoUpdate sadf manual page
Sebastien GODARD [Sat, 16 Aug 2014 13:37:17 +0000 (15:37 +0200)]
Update sadf manual page

Update sadf manual page to document new option -c.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
10 years agoTest the return value of fgets/fscanf calls
Sebastien GODARD [Fri, 15 Aug 2014 13:09:24 +0000 (15:09 +0200)]
Test the return value of fgets/fscanf calls

Fix a few fgets/fscanf calls which do not test the return value and
cause gcc warnings.

Patch provided by Ivana Varekova.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
10 years agoOption -c added to sadf: Upgrade an old sa datafile
Sebastien GODARD [Fri, 11 Jul 2014 07:56:06 +0000 (09:56 +0200)]
Option -c added to sadf: Upgrade an old sa datafile

This patch adds option -c to sadf. This option enables the user to
upgrade ("convert") an old system activity datafile (version 9.1.6 and
later) to the up-to-date format (11.1.1 as of today).
Enter "sadf -c old_datafile >new_datafile".

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
10 years agoDefine unknown scheduling policies
Sebastien GODARD [Fri, 4 Jul 2014 08:09:11 +0000 (10:09 +0200)]
Define unknown scheduling policies

Scheduling policies are defined in <linux/sched.h>. But old kernels lack
some policies added in more recent ones. So define them in pidstat.h if
they are unknown in <linux/sched.h>.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
10 years agoUpdate sadf manual page
Sebastien GODARD [Thu, 3 Jul 2014 19:42:51 +0000 (21:42 +0200)]
Update sadf manual page

Document sadf's new option -[0-9]+.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
10 years agoAdded option -[0-9]+ to sadf to show data of that days ago
Sebastien GODARD [Thu, 3 Jul 2014 19:28:35 +0000 (21:28 +0200)]
Added option -[0-9]+ to sadf to show data of that days ago

Make sadf consistent with sar. It's now possible to select the standard
system activity data file of, say 3 days ago, using a syntax like
"sadf -3".

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
10 years agosar: Stricter syntax check
Sebastien GODARD [Wed, 2 Jul 2014 19:43:16 +0000 (21:43 +0200)]
sar: Stricter syntax check

"sar -1 -f" output was different than "sar -f -1" one.
So now enforce options check more aggressively: You cannot enter a day
offset (eg. -1) together with option -f (which tells here to use the
standard sa datafile).

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
10 years agoRemove unneeded include file
Sebastien GODARD [Wed, 2 Jul 2014 19:19:06 +0000 (21:19 +0200)]
Remove unneeded include file

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
10 years agoRemove old ll_s_value() function
Sebastien GODARD [Mon, 30 Jun 2014 19:55:50 +0000 (21:55 +0200)]
Remove old ll_s_value() function

This function is no longer used: Workaround is now outdated, and a new
workaround is not needed either since the counters used with this
function cannot go backward. So remove it.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
10 years agoMerge branch 'workaround-mpstat-overflow' of https://github.com/kosaki/sysstat
Sebastien GODARD [Mon, 30 Jun 2014 19:18:38 +0000 (21:18 +0200)]
Merge branch 'workaround-mpstat-overflow' of https://github.com/kosaki/sysstat

Added comments for ll_sp_value() function.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
10 years agoUpdate Makefile to follow symlinks when creating the tarballs
Sebastien GODARD [Thu, 26 Jun 2014 12:11:50 +0000 (14:11 +0200)]
Update Makefile to follow symlinks when creating the tarballs

Use --dereference option with tar so that symlinks are followed when
creating the tarballs (needed for stable and development branches of
sysstat).

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
10 years agoworkaround for /proc/stat go backward
KOSAKI Motohiro [Tue, 24 Jun 2014 02:17:36 +0000 (22:17 -0400)]
workaround for /proc/stat go backward

Since dyn-tick feature was introduced (at kernel 2.6.21),
/proc/stat is unreliable and unstable. Stopped cpu can't provide
reliable stat. kernel try to provide a maximum guess. But it is
not 100% accurate.

Unfortunately, the fields are unsigned. So, stepping backward
can make overflow and some command (e.g. mpstat) show very big
number.

This patch provide a workaround.

Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@gmail.com>
10 years agoremove historical workaround for 32bit /proc/stat
KOSAKI Motohiro [Mon, 23 Jun 2014 23:43:50 +0000 (19:43 -0400)]
remove historical workaround for 32bit /proc/stat

/proc/stat was converted to 64bit at kernel 2.6.5 (at 2004). 10 years later,
a workaround for 32bit /proc/stat become completely outdated. It's time to die.
This patch removes the workaround.

For the record, you can see the kernel commit that changed /proc/stat to 64bit
in the following URL.
http://git.kernel.org/cgit/linux/kernel/git/tglx/history.git/commit/?id=0281d847f3a903ab9d0799c5103416d4893fcb34

Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@gmail.com>
10 years agoUse statvfs() instead of statfs() system call
Sebastien GODARD [Sun, 22 Jun 2014 14:09:18 +0000 (16:09 +0200)]
Use statvfs() instead of statfs() system call

Use statvfs() system call instead of statfs() to get filesystems
statistics with sar since:
1) statfs() has been deprecated by the LSB (useful only to get fs
type which is not needed here),
2) statvfs() better handles large file sizes.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
10 years agoStarting sysstat 11.1.1
Sebastien GODARD [Mon, 16 Jun 2014 19:38:07 +0000 (21:38 +0200)]
Starting sysstat 11.1.1

Update sysstat version number in configure script.

Note: 11.1.1 will be a development version, including all the new
features added to sysstat.
Each development version will be associated with a stable version,
including only fixes. So don't worry, there will also actually be a
version 11.0.1, and a version 11.0.2 etc. available for download from my
web site.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
10 years agosysstat 11.0.0 v11.0.0
Sebastien GODARD [Mon, 16 Jun 2014 19:32:04 +0000 (21:32 +0200)]
sysstat 11.0.0

sysstat version 11.0.0 final packaging.
lsm and spec files updated.
Changelog added.
Various files cleaned.
CREDITS file updated.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
10 years agoNLS: Sync'd with Translation Project
Sebastien GODARD [Mon, 16 Jun 2014 19:28:46 +0000 (21:28 +0200)]
NLS: Sync'd with Translation Project

Sync'd with Translation Project. Various translations updated.
Galician and Hungarian translations added.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
10 years agoVarious cosmetic fixes in manual pages.
Sebastien GODARD [Sun, 15 Jun 2014 15:15:39 +0000 (17:15 +0200)]
Various cosmetic fixes in manual pages.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
10 years agoUpdate sysstat manual page
Sebastien GODARD [Sun, 15 Jun 2014 13:10:41 +0000 (15:10 +0200)]
Update sysstat manual page

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
10 years agopidstat: Update manual page
Sebastien GODARD [Wed, 11 Jun 2014 19:25:41 +0000 (21:25 +0200)]
pidstat: Update manual page

Document the pidstat's new option -R in manual page.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
10 years agopidstat: Add option -R to display priority and policy information
Sebastien GODARD [Wed, 11 Jun 2014 19:17:45 +0000 (21:17 +0200)]
pidstat: Add option -R to display priority and policy information

Processes' scheduling priority and policy information are no longer
displayed with context switches stats. Create a dedicated report
instead, which can be displayed using pidstat's new option -R.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
10 years agosa2: Remove test on ZIP variable
Sebastien GODARD [Mon, 9 Jun 2014 19:23:01 +0000 (21:23 +0200)]
sa2: Remove test on ZIP variable

You have to be in the same directory to check if program exists and is
executable. Moreover the replacement value was wrong (I must have been
tired when I committed this :-( )

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
10 years agoUpdate documentation
Sebastien GODARD [Sun, 8 Jun 2014 16:14:36 +0000 (18:14 +0200)]
Update documentation

Update the FAQ and various manual pages to document recent changes (new
variables added to sysstat parameters file, new naming convention for
standard system activity daily data and report files, etc.)

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
10 years agoAdd new ZIP variable to sysstat parameters file
Sebastien GODARD [Sun, 8 Jun 2014 16:10:30 +0000 (18:10 +0200)]
Add new ZIP variable to sysstat parameters file

Add the new ZIP variable to sysstat parameters file.
This variable contains the program used to compress data and reports
files.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
10 years agoNo longer use a month-by-month directory structure when HISTORY is
Sebastien GODARD [Sun, 8 Jun 2014 15:52:06 +0000 (17:52 +0200)]
No longer use a month-by-month directory structure when HISTORY is
greater than 28

This patch updates sa1 and sa2 shell scripts in order to no longer use
the tree of directories that used to be created in the /var/log/sa
directory when HISTORY was greater than 28.
Now, when HISTORY is greater than 28, sadc is called with option -D to
create data files named saYYYYMMDD. All these files are located in the
same directory.
This patch also updates the sysstat parameters file to add a new
variable: SA_DIR, which gives the directory where sa and sar files are
saved.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
10 years agoAccept new naming convention for standard daily data files
Sebastien GODARD [Wed, 4 Jun 2014 14:51:33 +0000 (16:51 +0200)]
Accept new naming convention for standard daily data files

sadc/sar/sadf: The standard daily data files may now be named saYYYYMMDD
instead of saDD, where YYYY stands for the current year, MM for the
current month, and DD for the current day.
Option -D has been added to sadc to tell it to use saYYYYMMDD instead of
saDD. This switch works only if no filename is explicitly given on the
command line with sadc.
The same option -D has been added to sar. It also tells it to use
saYYYYMMDD instead of saDD. This switch works only if no filename is
explicitly given on the command line *and* in conjunction with option
-o (ie. when sar is used to write data to files).
If you use sar to read data from a file without specifying this file's
name on the command line (eg. you enter just "sar") then sar will look
for the most recent of saDD and saYYYYMMDD and use it. sadf will do the
same.
If you use sar to write data to files (using its option -o) then it will
always use saDD data file unless option -D is used (in which case
saYYYYMMDD will be used). This makes it consistent with sadc behavior
(and I think it is safer not to let sar decide which file to write to).

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
10 years agoRead processor number as an unsigned int
Sebastien GODARD [Sun, 1 Jun 2014 09:11:20 +0000 (11:11 +0200)]
Read processor number as an unsigned int

Small fix to be consistent with recent kernels: Read the processor
number in /proc/cpuinfo as an unsigned int instead of an int.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
10 years agoTake into account alternate locations for sa data files
Sebastien GODARD [Sun, 1 Jun 2014 09:02:43 +0000 (11:02 +0200)]
Take into account alternate locations for sa data files

sadc, sar and sadf have been updated to take into account alternate
directory locations for sa daily data files (normally saved in
/var/log/sa directory).
When a directory (instead of a plain file) is used with sadc, sadf and
sar (with its options -f and -o) then it is now considered as the
location where the standard saDD data files are saved.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>