]> granicus.if.org Git - sysstat/log
sysstat
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
10 years agoImprove documentation for HISTORY variable
Sebastien GODARD [Sun, 1 Jun 2014 08:27:03 +0000 (10:27 +0200)]
Improve documentation for HISTORY variable

This patch updates the sysstat(5) manual page to better explain how
sysstat applies HISTORY variables's value.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
10 years agopidstat: Update manual page
Sebastien GODARD [Sat, 24 May 2014 07:23:48 +0000 (09:23 +0200)]
pidstat: Update manual page

Update pidstat manual page to document new option -G.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
10 years agopidstat: Add an option to filter processes by name
Sebastien GODARD [Fri, 23 May 2014 12:37:29 +0000 (14:37 +0200)]
pidstat: Add an option to filter processes by name

Add "-G <process_name>" option to display only processes whose
name matches <process_name> regular expression.
While -C option filters both process and thread names, -G option
filters only process names, and displays all threads of matching
processes.

Signed-off-by: Cedric Marie <cedric.marie@openmailbox.org>
Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
10 years agoRevert "Prevent sar from appending data to data from the preceding month"
Sebastien GODARD [Fri, 23 May 2014 09:41:54 +0000 (11:41 +0200)]
Revert "Prevent sar from appending data to data from the preceding month"

This reverts commit b07b592990fe8f140044930676dafe92377f6eae.
Lowering HISTORY limit may potentially affects existing client scripts.

10 years agoRevert "Lower HISTORY limit to 25 for scripts to create multiple directories"
Sebastien GODARD [Fri, 23 May 2014 09:37:35 +0000 (11:37 +0200)]
Revert "Lower HISTORY limit to 25 for scripts to create multiple directories"

This reverts commit f41438cb6c4e1fe9e265bcf39797a027b3493b16.
Lowering HISTORY limit may potentially affects existing client scripts.

10 years agopidstat: Update variables type to be consistent with recent kernels
Sebastien GODARD [Wed, 21 May 2014 19:37:50 +0000 (21:37 +0200)]
pidstat: Update variables type to be consistent with recent kernels

Many counters used in /proc files have changed from long int to
long long int. So update the variables type used by pidstat accordingly.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
10 years agoLower HISTORY limit to 25 for scripts to create multiple directories
Sebastien GODARD [Wed, 21 May 2014 19:17:20 +0000 (21:17 +0200)]
Lower HISTORY limit to 25 for scripts to create multiple directories

This patch lowers HISTORY value limit from 28 to 25. When HISTORY value
is greater than 25 then sa1 script creates a month-by-month directory
structure in /var/log/sa to save datafiles.
This value guarantees that we will always have a full history and that
no files will be overwritten unintentionally.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
10 years agopidstat: Update manual page
Sebastien GODARD [Sat, 17 May 2014 14:20:57 +0000 (16:20 +0200)]
pidstat: Update manual page

Update pidstat manual page to document the new fields displayed with
option -w.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
10 years agopidstat: Add scheduling priority and policy information
Sebastien GODARD [Sat, 17 May 2014 14:17:07 +0000 (16:17 +0200)]
pidstat: Add scheduling priority and policy information

Display task scheduling priority and policy along with task switching
activity (-w option).

Signed-off-by: Cedric Marie <cedric.marie@openmailbox.org>
Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
10 years agoDon't install crontabs when using systemd timer units
Sebastien GODARD [Fri, 16 May 2014 20:16:37 +0000 (22:16 +0200)]
Don't install crontabs when using systemd timer units

systemd now has timer units that can replace cron jobs.
Such units are installed by sysstat if requested to do so on machines
supporting systemd. In this case a crontab should no longer be
installed else a redundant line of statistics appear at every interval
of time.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
10 years agoPrevent sar from appending data to data from the preceding month
Sebastien GODARD [Wed, 14 May 2014 19:50:54 +0000 (21:50 +0200)]
Prevent sar from appending data to data from the preceding month

Previously, the sar utility set the maximum number of days to be logged
in one month too high. Consequently, data from a month were appended to
data from the preceding month. With this update, the maximum number of
days has been set to 25, and data from a month now correctly replaces
data from the preceding month.

From Red Hat Bugzilla #578929 (Jeff Bastian):

*** BEGIN ***
Although RHEL 4 was modified to set the max history for sar to 26 days,
this value is still too long.

Given that
  1. February only has 28 days, and
  2. that 'find ... -mtime +26' finds files that were modified 27
     or more days ago, and
  3. find ignores fractional days and thus has rounding errors, and
  4. the DST changes take place within sar's $HISTORY window
     (as of 2007, the second Sunday in March[1], or March 14, 2010
     this year)
then /usr/lib/sa/sa2 is only deleting files that are 28 days
or older (not 27).

As a result, sar data from March 15 to March 28 was getting appended
to the data from February instead of replacing it.  You can see the
files
from March 15 to 28 are 2x the size of normal files.
   # ls -al
   ...
   -rw-r--r--  1 root root  813552 Mar 12 23:50 sa12
   -rw-r--r--  1 root root  813552 Mar 13 23:50 sa13
   -rw-r--r--  1 root root  779664 Mar 14 23:50 sa14
   -rw-r--r--  1 root root 1626864 Mar 15 23:50 sa15
   -rw-r--r--  1 root root 1626864 Mar 16 23:50 sa16
   -rw-r--r--  1 root root 1626864 Mar 17 23:50 sa17
   ...
   -rw-r--r--  1 root root 1626864 Mar 26 23:50 sa26
   -rw-r--r--  1 root root 1626864 Mar 27 23:50 sa27
   -rw-r--r--  1 root root 1626864 Mar 28 23:50 sa28
   -rw-r--r--  1 root root  813552 Mar 29 23:50 sa29
   -rw-r--r--  1 root root  339120 Mar 30 09:50 sa30
   ...

The max needs to be 25 days to account for DST now.

Attached is a demo script to show how 'find ... -mtime +26 ...' fails to
find files that are 27 days old when dealing with the DST time change on
March 14, 2010.

It touches a series of files, sa10 to sa20, with timestamps from
February 10 to February 20 at 23:53.  It then sets the date to March 15
and finds files that are older than 26 days.  (And finally restores the
date.)

Stopping ntpd:                                             [  OK  ]
Stopping crond:                                            [  OK  ]
Mon Mar 15 23:53:00 EDT 2010
-rw-r--r-- 1 root root 0 Feb 15 23:53 /root/timestamp/sa15
-rw-r--r-- 1 root root 0 Feb 14 23:53 /root/timestamp/sa14
-rw-r--r-- 1 root root 0 Feb 13 23:53 /root/timestamp/sa13
-rw-r--r-- 1 root root 0 Feb 12 23:53 /root/timestamp/sa12
-rw-r--r-- 1 root root 0 Feb 11 23:53 /root/timestamp/sa11
-rw-r--r-- 1 root root 0 Feb 10 23:53 /root/timestamp/sa10
Thu Apr  1 12:35:12 EDT 2010
Starting crond:                                            [  OK  ]
Starting ntpd:                                             [  OK  ]

You can see that youngest file it found was from February 15 which is 28
days old on March 15.  It does not find sa16 which is 27 days (in our
thinking) even though we specified +26.  This is due to the rounding
errors from find ignoring fractional parts of days.
*** END ***

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
10 years agoUpdate sysstat FAQ
Sebastien GODARD [Thu, 8 May 2014 15:07:46 +0000 (17:07 +0200)]
Update sysstat FAQ

Add a new entry to sysstat FAQ to explain how to collect only specific
activities with sadc.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
10 years agoSmall fix with sadc's option -S
Sebastien GODARD [Thu, 8 May 2014 15:00:54 +0000 (17:00 +0200)]
Small fix with sadc's option -S

sadc was unable to read a list of comma separated values following
option -S. This is now fixed.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
10 years agoMake sysstat init script source the functions library
Sebastien GODARD [Thu, 8 May 2014 13:38:52 +0000 (15:38 +0200)]
Make sysstat init script source the functions library

Make sysstat init script source the functions library.
This is needed to conform to the LSB Core Specifications and
severeal other tools depend on it.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
10 years agoFix possible buffer overflow
Sebastien GODARD [Sat, 12 Apr 2014 14:46:39 +0000 (16:46 +0200)]
Fix possible buffer overflow

From dcb314:

[rd_stats.c:835]: (warning) scanf without field width limits can crash
with huge input data.

So changed "n = fscanf(fp, "%s", duplex);" with
"n = fscanf(fp, "%31s", duplex);".

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
10 years agoRemove supernumerary spaces and tabulations in source files
Sebastien GODARD [Sat, 22 Mar 2014 16:04:30 +0000 (17:04 +0100)]
Remove supernumerary spaces and tabulations in source files

Remove white spaces and tabulations at end of lines.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
10 years agoStarting sysstat 11.0.0
Sebastien GODARD [Mon, 17 Mar 2014 20:13:47 +0000 (21:13 +0100)]
Starting sysstat 11.0.0

Update sysstat version number in configure script.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
10 years agosysstat 10.3.1 v10.3.1
Sebastien GODARD [Mon, 17 Mar 2014 20:07:36 +0000 (21:07 +0100)]
sysstat 10.3.1

sysstat version 10.3.1 final packaging.
lsm and spec files updated.
Changelog added.
.gitignore file updated.
Various files cleaned (FIXME removed, etc.)

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
10 years agoNLS: Sync'd with Translation Project
Sebastien GODARD [Mon, 17 Mar 2014 20:01:15 +0000 (21:01 +0100)]
NLS: Sync'd with Translation Project

Sync'd with Translation Project: Various translations updated (cs, de,
eo, fi, fr, id, nb, nl, pl, ru, sk, sr, uk, vi).

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
10 years agoDisplay number of activities saved in file's header
Sebastien GODARD [Sat, 15 Mar 2014 07:39:54 +0000 (08:39 +0100)]
Display number of activities saved in file's header

Update sadf so that it can display the total number of activities and
the number of volatile activities in file.
These numbers can be displayed with sadf -H.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
10 years agoRename sa_nr_act field to sa_act_nr
Sebastien GODARD [Fri, 14 Mar 2014 17:24:14 +0000 (18:24 +0100)]
Rename sa_nr_act field to sa_act_nr

Cosmetic change: Field sa_nr_act in file_header structure has been
renamed to sa_act_nr to be consistent with other fields names.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
10 years agosar: Take into account a change of CPU number in sar datafile (6)
Sebastien GODARD [Fri, 14 Mar 2014 17:14:24 +0000 (18:14 +0100)]
sar: Take into account a change of CPU number in sar datafile (6)

Update sadf so that it can read the new datafile format.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
10 years agosar: Take into account a change of CPU number insar datafile (5)
Sebastien GODARD [Fri, 14 Mar 2014 10:08:00 +0000 (11:08 +0100)]
sar: Take into account a change of CPU number insar datafile (5)

The goal of the next few patches to come is to make it possible for
other activities than A_CPU (displayed by sar -u) to take into account a
change of CPU count in sar data files. These activities must be directly
related to CPU: At the present time these are A_PWR_CPUFREQ (displayed
by sar -m CPU) and A_PWR_WGHFREQ (displayed by sar -m FREQ).
With previous work done, a change from, say 6 to 8 CPU is taken into
account by sar -u:

$ sar -P ALL -f data
Linux 3.9.10-100 (home)  02/08/2014  _x86_64_      (6 CPU)

03:09:53 PM  CPU  %user     %nice   %system   %iowait    %steal   %idle
03:09:54 PM  all   2.53      0.00      0.68      0.00      0.00   96.79
03:09:54 PM    0   2.04      0.00      1.02      0.00      0.00   96.94
03:09:54 PM    1   3.00      0.00      1.00      0.00      0.00   96.00
03:09:54 PM    2   2.02      0.00      1.01      0.00      0.00   96.97
03:09:54 PM    3   4.04      0.00      1.01      0.00      0.00   94.95
03:09:54 PM    4   3.00      0.00      0.00      0.00      0.00   97.00
03:09:54 PM    5   2.02      0.00      0.00      0.00      0.00   97.98

[...]

03:31:33 PM       LINUX RESTART (8 CPU)

04:06:55 PM  CPU  %user     %nice   %system   %iowait    %steal   %idle
04:06:56 PM  all   0.38     16.62      0.38      0.00      0.00   82.62
04:06:56 PM    0   0.00     37.00      0.00      0.00      0.00   63.00
04:06:56 PM    1   0.00     77.78      1.01      0.00      0.00   21.21
04:06:56 PM    2   0.98     13.73      0.98      0.00      0.00   84.31
04:06:56 PM    3   0.00      5.05      1.01      0.00      0.00   93.94
04:06:56 PM    4   0.00      0.00      0.00      0.00      0.00  100.00
04:06:56 PM    5   0.00      0.00      0.00      0.00      0.00  100.00
04:06:56 PM    6   1.00      0.00      0.00      0.00      0.00   99.00
04:06:56 PM    7   0.00      0.00      0.00      0.00      0.00  100.00

<SNIP>

But sar -m CPU still only displays stats for the first 6 CPU:

$ sar -P ALL -m CPU -f data
Linux 3.9.10-100 (home)  02/08/2014  _x86_64_    (6 CPU)

03:09:53 PM     CPU       MHz
03:09:54 PM     all   3358.02
03:09:54 PM       0   3358.02
03:09:54 PM       1   3358.02
03:09:54 PM       2   3358.02
03:09:54 PM       3   3358.02
03:09:54 PM       4   3358.02
03:09:54 PM       5   3358.02

[...]

03:31:33 PM       LINUX RESTART (8 CPU)

04:06:55 PM     CPU       MHz
04:06:56 PM     all   2200.33
04:06:56 PM       0   1600.00
04:06:56 PM       1   3401.00
04:06:56 PM       2   1600.00
04:06:56 PM       3   3401.00
04:06:56 PM       4   1600.00
04:06:56 PM       5   1600.00

<SNIP>

This is what we want to change here.

So this current patch:

1) Changes the format of sar data file (this doesn't hurt since 10.3.1
has already changed it. Done again here just in case someone had cloned
from 10.3.1 though this version has not been officially released).

2) Adds a new field in data file's header (sa_vol_act_nr), giving the
number of activities in file taking into account a change of CPU count.
(Such activities, like A_CPU or A_PWR_CPUFREQ are called "volatile
activities" here).

3) When a restart mark is inserted, sadc also writes a few additional
data giving the new number of CPU for each volatile activity in file.
Of course sar has also been updated to read those data and take into
account a change of CPU count for all volatile activities to display.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
10 years agoCatch 'xz' compressed files as well
Peter Portante [Mon, 10 Mar 2014 15:33:25 +0000 (11:33 -0400)]
Catch 'xz' compressed files as well

10 years agoMerge branch 'master' of https://github.com/zdzichu/sysstat
Sebastien GODARD [Sun, 2 Mar 2014 14:03:13 +0000 (15:03 +0100)]
Merge branch 'master' of https://github.com/zdzichu/sysstat

Merge new features added by Tomasz Torcz.

10 years agoadd systemd timer units replacing cronjobs
Tomasz Torcz [Sat, 1 Mar 2014 12:58:03 +0000 (13:58 +0100)]
add systemd timer units replacing cronjobs

Systemd timer units, while preserving functionality of cronjobs,
provide some additional features:
- dependency on cron can be dropped
- timer units next expiration is clearly visible in "systemctl list-timers"
- unit customization rules provide cleaner way for administrator to modify
  default parameters, enable, disable and override individual timers

10 years agoFix output of sadf -j with file-utc-time present
Mike Kazantsev [Mon, 17 Feb 2014 20:01:26 +0000 (02:01 +0600)]
Fix output of sadf -j with file-utc-time present

Commit aea4561 added "file-utc-time" parameter output (if present in the
datafile), but didn't add comma before it in "sadf -j" output, making it
unparseable. Fix that.

10 years agoBe more user-friendly when trying to access a non existent data file
Sebastien GODARD [Sun, 9 Feb 2014 13:21:24 +0000 (14:21 +0100)]
Be more user-friendly when trying to access a non existent data file

When sar and sadf try to access a non existent standard daily data file,
tell the user to check if data collecting is enabled.
By doing so, the user goes to the docs looking for how to enable the
data collection, rather than looking for help on why the software seems
to be broken.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
10 years agoUpdate FAQ
Sebastien GODARD [Sat, 8 Feb 2014 14:38:07 +0000 (15:38 +0100)]
Update FAQ

Update FAQ and tell that data can now be appended to a datafile even if
the number of processors of the machine has changed.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
10 years agoMake sadf -H display last CPU count in file
Sebastien GODARD [Sat, 8 Feb 2014 14:35:00 +0000 (15:35 +0100)]
Make sadf -H display last CPU count in file

sadf -H now displays the last CPU count recorded in the data file. This
is the value of the last_cpu_nr field saved in file's header, giving the
number of processors the machine had when the last sample of statistics
was appended to the file.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
10 years agoUpdate DTD and XSD documents
Sebastien GODARD [Sat, 8 Feb 2014 13:11:39 +0000 (14:11 +0100)]
Update DTD and XSD documents

Take into account new cpu_count mark in DTD and XSD documents.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
10 years agoChange file_magic structure contents
Sebastien GODARD [Fri, 7 Feb 2014 20:42:27 +0000 (21:42 +0100)]
Change file_magic structure contents

Move header_size field to the end of the structure, so that other
programs can still tell it is a sysstat sar data file, even though
the format has changed.

Also, to avoid causing format changes, add padding to the file_magic
structure so that when they grow in size other tools can still
handle the existing data.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
10 years agoCosmetic rewrite of open_ofile() function
Sebastien GODARD [Thu, 6 Feb 2014 20:22:41 +0000 (21:22 +0100)]
Cosmetic rewrite of open_ofile() function

Remove one indentation level for every line in open_ofile() function in
sadc.c.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
10 years agosar: Take into account a change of CPU number in sar datafile (4)
Sebastien GODARD [Wed, 5 Feb 2014 14:56:26 +0000 (15:56 +0100)]
sar: Take into account a change of CPU number in sar datafile (4)

Update sadf so that it can read the new datafiles format.
sadf now displays the CPU count in the restart messages.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
10 years agosar: Take into account a change of CPU number in sar datafile (3)
Sebastien GODARD [Sat, 1 Feb 2014 20:42:51 +0000 (21:42 +0100)]
sar: Take into account a change of CPU number in sar datafile (3)

Update sar so that it now reads the number of CPU associated with a
RESTART record. Reallocate CPU structures accordingly, and display the
number of CPU with the restart mark.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
10 years agosar: Take into account a change of CPU number in sar datafile (2)
Sebastien GODARD [Sat, 1 Feb 2014 16:37:56 +0000 (17:37 +0100)]
sar: Take into account a change of CPU number in sar datafile (2)

sadc now accepts a change of CPU count when inserting a restart mark. In
this case, sadc sets the new value in file's header (last_cpu_nr field)
then rewrites it.
The new number of CPU is also written after the restart mark record in
file.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
10 years agosar: Take into account a change of CPU number in sar datafile (1)
Sebastien GODARD [Sun, 26 Jan 2014 16:28:15 +0000 (17:28 +0100)]
sar: Take into account a change of CPU number in sar datafile (1)

On virtual machine, after CPU change (e.g. power off machine ->
add 1 cpu -> power on machine), sar command doesn't display
previous data (from today) from the current saXX file.

This is the first patch aimed at making sar able to take into account
a change of CPU count in its datafiles.

This patch adds a new field into file's header data (last_cpu_nr)
which gives the number of CPU the machine had when the last sample of
data was appended to the file.
Sar data file format is no longer compatible with that from previous
sysstat versions. To be able to add other fields to file's header
in the future without making it incompatible again, also add a
field (header_size) to file's magic data giving the size of file's
header.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
10 years agoRename nfsiostat command to nfsiostat-sysstat
Sebastien GODARD [Sun, 26 Jan 2014 08:17:03 +0000 (09:17 +0100)]
Rename nfsiostat command to nfsiostat-sysstat

nfsiostat was added to the sysstat package in 2010, but such a command
has already existed in the nfs-utils package since 2008.
So to avoid confusion, rename nfsiostat to nfsiostat-sysstat and
indicate it is now obsolete.
The nfsiostat command from the sysstat package will be removed in a
future version since we don't need two similar commands.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
10 years agoStarting sysstat 10.3.1
Sebastien GODARD [Fri, 24 Jan 2014 20:31:17 +0000 (21:31 +0100)]
Starting sysstat 10.3.1

Update sysstat version number in configure script.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
10 years agosysstat 10.2.1 v10.2.1
Sebastien GODARD [Sun, 19 Jan 2014 10:19:26 +0000 (11:19 +0100)]
sysstat 10.2.1

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

Signed-off-by: Sebastien GODARD <sysstat@orange.fr.fake>
10 years agoNLS: Sync'd with Translation Project
Sebastien GODARD [Sat, 18 Jan 2014 15:27:19 +0000 (16:27 +0100)]
NLS: Sync'd with Translation Project

Sync'd with Translation Project: Euskadi (Basque) translation updated.

Signed-off-by: Sebastien GODARD <sysstat@orange.fr.fake>
10 years agoRemove hardcoded size values
Sebastien GODARD [Fri, 17 Jan 2014 20:46:38 +0000 (21:46 +0100)]
Remove hardcoded size values

Use sizeof() macro instead of hardcoded size values in various parts of
the code.

Signed-off-by: Sebastien GODARD <sysstat@orange.fr.fake>
10 years agoCosmetic fixes
Sebastien GODARD [Thu, 16 Jan 2014 20:32:01 +0000 (21:32 +0100)]
Cosmetic fixes

The title says it all...

Signed-off-by: Sebastien GODARD <sysstat@orange.fr.fake>
10 years agoAdd option --enable-copy-only to configure script
Sebastien GODARD [Wed, 15 Jan 2014 21:31:33 +0000 (22:31 +0100)]
Add option --enable-copy-only to configure script

Add a new option (--enable-configure-only) to configure script. This
option makes sure that files are only copied when installing sysstat and
that nothing else (like activating a service for distro using systemd)
is done. This may be useful when creating sysstat package.

Signed-off-by: Sebastien GODARD <sysstat@orange.fr.fake>
10 years agoUpdate DTD and XSD documents
Sebastien GODARD [Mon, 13 Jan 2014 21:19:19 +0000 (22:19 +0100)]
Update DTD and XSD documents

Update DTD and XSD documents to take into account the creation time of
the datafile displayed by sadf -x.

Signed-off-by: Sebastien GODARD <sysstat@orange.fr.fake>
10 years agosadf now displays file creation time
Sebastien GODARD [Mon, 13 Jan 2014 21:07:02 +0000 (22:07 +0100)]
sadf now displays file creation time

sadf -H, sadf -x and sadf -j now display the creation time of the
datafile. This time was available in the header of the datafile.
Time is displayed in UTC.

Signed-off-by: Sebastien GODARD <sysstat@orange.fr.fake>
10 years agoTake $DESTDIR variable into account when installing sysstat service used by systemd.
Sebastien GODARD [Sun, 12 Jan 2014 07:10:51 +0000 (08:10 +0100)]
Take $DESTDIR variable into account when installing sysstat service used by systemd.

Previous code for installing sysstat using systemd needed rw permissions
to the root directory. Yet some users and distributions want to install
files into $(DESTDIR) before actually installing into the root directory.
So take $DESTDIR variable into account.

Signed-off-by: Sebastien GODARD <sysstat@orange.fr.fake>
10 years agopidstat: Updated manual page
Sebastien GODARD [Mon, 11 Nov 2013 14:52:03 +0000 (15:52 +0100)]
pidstat: Updated manual page

Update pidstat manual page to document the new metric added to "pidstat
-d" (block I/O delays).

Signed-off-by: Sebastien GODARD <sysstat@orange.fr.fake>
10 years agopidstat: Add block I/O delays metric
Sebastien GODARD [Mon, 11 Nov 2013 14:49:32 +0000 (15:49 +0100)]
pidstat: Add block I/O delays metric

Add a new metric (block I/O delays, measured in clock ticks) to output
displayed by pidstat -d.

Signed-off-by: Sebastien GODARD <sysstat@orange.fr.fake>
10 years agoStarting sysstat 10.2.1
Sebastien GODARD [Sun, 3 Nov 2013 12:48:50 +0000 (13:48 +0100)]
Starting sysstat 10.2.1

Update sysstat version number in configure script.

Signed-off-by: Sebastien GODARD <sysstat@orange.fr.fake>
10 years agosysstat 10.2.0 v10.2.0
Sebastien GODARD [Sun, 3 Nov 2013 12:43:46 +0000 (13:43 +0100)]
sysstat 10.2.0

sysstat version 10.2.0 final packaging.
lsm, spec and CREDITs files updated.
Changelog added.
Typo and cosmetic fixes.

Signed-off-by: Sebastien GODARD <sysstat@orange.fr.fake>
10 years agoNLS : Sync'd with Translation Project
Sebastien GODARD [Sat, 2 Nov 2013 15:28:57 +0000 (16:28 +0100)]
NLS : Sync'd with Translation Project

Sync'd with Translation Project: Various  translations updated.

Signed-off-by: Sebastien GODARD <sysstat@orange.fr.fake>
10 years agoRework online/offline procedure check
Sebastien GODARD [Sun, 27 Oct 2013 14:35:08 +0000 (15:35 +0100)]
Rework online/offline procedure check

Rework patch from troosh: No need to add ".present" field to stats_cpu
structure. Online CPUs can be displayed with mpstat option "-P ON".

Signed-off-by: Sebastien GODARD <sysstat@orange.fr.fake>
10 years agoRework procedures used to count processors on the machine
Sebastien GODARD [Sun, 27 Oct 2013 14:10:12 +0000 (15:10 +0100)]
Rework procedures used to count processors on the machine

Rework patch from troosh: No need to duplicate code used to
count the number of processors available on the machine.
Use a flag (@highest) instead.

Signed-off-by: Sebastien GODARD <sysstat@orange.fr.fake>
10 years agoPrint total number of CPUs in header
Alexander Troosh [Wed, 9 Oct 2013 14:57:11 +0000 (18:57 +0400)]
Print total number of CPUs in header

10 years agoSkipping missing CPU and to interrupt statistics
Alexander Troosh [Wed, 9 Oct 2013 14:22:38 +0000 (18:22 +0400)]
Skipping missing CPU and to interrupt statistics

10 years agoHide CPUs in offline
Alexander Troosh [Tue, 8 Oct 2013 15:55:31 +0000 (19:55 +0400)]
Hide CPUs in offline

10 years agoFind the maximum number of the CPU, not the total number of CPUs in online
Alexander Troosh [Tue, 8 Oct 2013 15:55:07 +0000 (19:55 +0400)]
Find the maximum number of the CPU, not the total number of CPUs in online

10 years agopidstat: Display stats since boot time for a list of given processes
Sebastien GODARD [Wed, 2 Oct 2013 07:55:38 +0000 (09:55 +0200)]
pidstat: Display stats since boot time for a list of given processes

pidstat displays statistics since system startup when the interval and
count parameters are not set on the command line (eg. entering "pidstat
-d" will display I/O statistics for all processes that have had I/O
activity since boot time). But pidstat couldn't display those stats when
some PID numbers were entered on the command line (eg. "pidstat -d -p
1234" to display I/O stats since system startup for process 1234).
This patch makes it possible now.

Signed-off-by: Sebastien GODARD <sysstat@orange.fr.fake>
10 years agoRearrange options displayed by sar -h
Sebastien GODARD [Sun, 29 Sep 2013 13:21:22 +0000 (15:21 +0200)]
Rearrange options displayed by sar -h

Rearrange options displayed by sar in its short help message
(sar -h): The upper case option should be displayed before its lower
case counterpart to be consistent with options order displayed by sar
usage message or displayed in sar manual page.

Signed-off-by: Sebastien GODARD <sysstat@orange.fr.fake>
10 years agopidstat displays -1 for unknown I/O statistics
Sebastien GODARD [Sat, 28 Sep 2013 14:07:41 +0000 (16:07 +0200)]
pidstat displays -1 for unknown I/O statistics

pidstat -d now displays -1 for I/O statistics values when the
file containing the statistics data for the corresponding process cannot
be read (permission denied or file non existent).

Signed-off-by: Sebastien GODARD <sysstat@orange.fr.fake>
10 years agopidstat stack utilization statistics were not always properly refreshed
Sebastien GODARD [Fri, 27 Sep 2013 13:31:38 +0000 (15:31 +0200)]
pidstat stack utilization statistics were not always properly refreshed

Stack utilization statistics displayed by "pidstat -s" were sometimes
not displayed for some processes although values had changed.
This was because stack stats were displayed together with memory stats,
but pidstat was looking only for a variation in memory counters values
to decide whether to display the corresponding process or not.
So now process memory and stack statistics independently.

Signed-off-by: Sebastien GODARD <sysstat@orange.fr.fake>
10 years agopidstat: Documentation update
Sebastien GODARD [Fri, 27 Sep 2013 12:28:21 +0000 (14:28 +0200)]
pidstat: Documentation update

Give information about new option -v in pidstat manual page.

Signed-off-by: Sebastien GODARD <sysstat@orange.fr.fake>
10 years agopidstat: Add new option -v
Sebastien GODARD [Fri, 27 Sep 2013 12:24:39 +0000 (14:24 +0200)]
pidstat: Add new option -v

Add option -v to pidstat. This option enables the user to display the
number of threads and the number of file descriptors associated with
each task.

Signed-off-by: Sebastien GODARD <sysstat@orange.fr.fake>
10 years agompstat/pidstat exit immediately when SIGINT caught during 1st interval
Sebastien GODARD [Fri, 20 Sep 2013 13:09:25 +0000 (15:09 +0200)]
mpstat/pidstat exit immediately when SIGINT caught during 1st interval

The mpstat and pidstat commands display their average statistics when
they are interrupted by the user with control-C (SIGINT signal).
But when the signal was caught during the first interval of time (ie.
before any statistics had been displayed), trying to display some
average values is irrelevant. So make them exit immediately in this
case.

10 years agoAdd "prealloc" variable to configure script
Sebastien GODARD [Sat, 14 Sep 2013 13:59:58 +0000 (15:59 +0200)]
Add "prealloc" variable to configure script

sar (or sadc) allocates empty records in the data files it creates so
that it can save statistics for devices (disks, network interfaces,
etc.) that may be added to the system after the file was created.
The drawback is that data files take more space on disk than actually
strictly necessary.
Using the "prealloc" variable with configure (before compiling sysstat),
the user can tell how much space he wants to allocate.
This variable will determine the size of data files created by sar/sadc.
The default value is 1, meaning that some empty records will be
allocated.
A value of 0 means that data files will be the smallest possible.

10 years agoAdd XZ compressed target to Makefile
Sebastien GODARD [Sat, 14 Sep 2013 07:34:06 +0000 (09:34 +0200)]
Add XZ compressed target to Makefile

Add xdist target to Makefile: This will make a tarball compressed with
the xz compression program.