]> granicus.if.org Git - sysstat/log
sysstat
11 years agoFilesystems statistics (part 6): XML output format
Sebastien GODARD [Sat, 18 May 2013 20:04:27 +0000 (22:04 +0200)]
Filesystems statistics (part 6): XML output format

This patch adds XML output format for filesystems statistics. This
format can be displayed with sadf option -x.
DTD and XML Schema (xsd) documents have also been updated.

11 years agoFilesystems statistics (part 5): JSON output format
Sebastien GODARD [Sun, 12 May 2013 14:07:55 +0000 (16:07 +0200)]
Filesystems statistics (part 5): JSON output format

This patch adds JSON output format for filesystems statistics. This
format can be displayed with sadf option -j.

11 years agoFilesystems statistics (part 4): ppc and db output formats
Sebastien GODARD [Sun, 12 May 2013 13:17:01 +0000 (15:17 +0200)]
Filesystems statistics (part 4): ppc and db output formats

This patch adds ppc and database (CSV) output formats for filesystems
statistics. These formats can be displayed with sadf options -p and -d.

Also add a new flag (PT_USERND) to the render() function so that
a statistic value can be rounded to the nearest integer value.

11 years agoVarious cosmetic code changes
Sebastien GODARD [Fri, 10 May 2013 20:04:16 +0000 (22:04 +0200)]
Various cosmetic code changes

Nothing interesting here, except that things have to be cleaned
sometimes...

11 years agoFilesystems statistics for sar (part 3): Display statistics
seb [Mon, 6 May 2013 19:55:04 +0000 (21:55 +0200)]
Filesystems statistics for sar (part 3): Display statistics

This patch makes sar display filesystems statistics collected by sadc.
No average statistics are calculated here (filesystems can be unmounted,
then mounted again, making average values meaningless). Instead, sar displays again
the list of filesystems.

11 years agoReplace "Mb" with "MB" in filesystems statistics header line
seb [Sun, 5 May 2013 15:55:51 +0000 (17:55 +0200)]
Replace "Mb" with "MB" in filesystems statistics header line

"Mb" could be confused with MBits. So use "MB" to indicate that
filesystem usage is actually expressed in MBytes (MiB in fact).

11 years agoFilesystems statistics for sar (part 2): Read statistics
seb [Sun, 5 May 2013 15:42:03 +0000 (17:42 +0200)]
Filesystems statistics for sar (part 2): Read statistics

This patch reads statistics for mounted filesystems except for
pseudo-filesystems which are ignored.
It also determines the number of filesystems for which stats will be
read.
Oh, and it adds another field to the stats_filesystem structure so that
filesystem name can be saved ;-)

11 years agoRemove unused constants from header files
seb [Wed, 1 May 2013 12:22:08 +0000 (14:22 +0200)]
Remove unused constants from header files

Several constants defined in header files were no longer used.
So remove them.
Note that S_F_PER_PROC constant (used in sar code to indicate that
option -P has been entered on the commnd line) has also been deleted.
We can know that option -P has been used if the CPU bitmap has at
least one bit set.

11 years agoAdded filesystems statistics to sar (part 1): Basic definitions and structures
seb [Mon, 29 Apr 2013 20:04:43 +0000 (22:04 +0200)]
Added filesystems statistics to sar (part 1): Basic definitions and structures

A new option (-F) has been added to sar. This option tells sar to display
filesystems statistics.
This first patch adds the corresponding structures, constants and the new
functions prototypes.
sar's help and usage messages have also been updated.

11 years agoAllow for more options to be grouped together.
seb [Sat, 27 Apr 2013 08:08:23 +0000 (10:08 +0200)]
Allow for more options to be grouped together.

Sysstat command options can now be 'collapsed' (grouped) when
not followed by an argument. So it's now possible for example
to enter 'iostat -px 2 5' since no device name is given to
option -p.
This also concerns pidstat option -U: You can now enter for example
'pidstat -wU' to display switching activity for tasks together with
their user name.

11 years agoTypos fixed. README file updated.
seb [Sat, 27 Apr 2013 06:55:20 +0000 (08:55 +0200)]
Typos fixed. README file updated.

Fixed some typos in code comments. Also updated README file where some
information were outdated.

11 years agoCosmetic fix in pidstat manual page.
seb [Thu, 25 Apr 2013 11:04:17 +0000 (13:04 +0200)]
Cosmetic fix in pidstat manual page.

Starting 10.1.6 version.
Cosmetic fix in pidstat manual page ("username" in synopsis section wasn't underlined).

11 years ago10.1.5 final packaging. v10.1.5
seb [Sat, 23 Mar 2013 16:33:18 +0000 (17:33 +0100)]
10.1.5 final packaging.

Updated CHANGES, lsm and spec files.
Code squeezed.

11 years agoNLS updated.
seb [Sat, 23 Mar 2013 16:15:54 +0000 (17:15 +0100)]
NLS updated.

Sync'd with translation project.

11 years agoCosmetic fixes in pidstat manual page.
seb [Sun, 17 Mar 2013 15:19:25 +0000 (16:19 +0100)]
Cosmetic fixes in pidstat manual page.

Replace "the real user name of the task" with "the name of the real
user owning the task" in pidstat manual page.

11 years agompstat now takes into account every interrupt per processor
seb [Sat, 16 Mar 2013 20:00:37 +0000 (21:00 +0100)]
mpstat now takes into account every interrupt per processor
so that their number adds up to the number displayed for CPU "all".

mpstat used to sum only numerical interrupts (those with names like
"0", "1", etc. and not "LOC", ...). But the number of interrupts
per processor (displayed by mpstat -I SUM -P ALL) doesn't add up
to what is displayed for "all". To fix this, take into account all
interrupts per processor in /proc/interrupts file.

Message from Shergill, Gurinder <gurinder.shergill@hp.com> 13/03/2013:

I am seeing something odd with mpstat. It shows 0 for all the CPUs except 0 even though there are interrupts going to other CPUs and the number doesn't add up to what is displayed for "all". I can confirm that there is very high level of I/O activity on the system (resulting in about 200k intr/s). I have tried multiple system and seen the same behavior. I have also tried multiple different kernels (3.7.10, 3.8.2, also the distro kernel with RHEL 6.3 & 6.4).

Finally, I downloaded the latest sources for sysstat and built them on one of my systems, but even with that I get the same behavior.

11 years agoFixed a bug where systemd unit file couldn't be installed
seb [Wed, 13 Mar 2013 14:36:56 +0000 (15:36 +0100)]
Fixed a bug where systemd unit file couldn't be installed
because PKG_PROG_PKG_CONFIG macro wasn't expanded in configure
script.

Mail from Peter Schiffer <pschiffe@redhat.com> 08/03/2013:

I'm writing you regarding a little problem I've noticed when running
./configure script:

./configure: line 3923: PKG_PROG_PKG_CONFIG: command not found
checking for systemctl... /bin/systemctl
./configure: line 3975: --variable=systemdsystemunitdir: command not found

According to Google, you might be missing pkg-config program in your
path while generating configure script from configure.in file.
Because of this, systemd unit file won't be installed while doing make
install.

11 years agoFixed a small inconsistency in pidstat usage message.
seb [Sun, 10 Mar 2013 14:46:58 +0000 (15:46 +0100)]
Fixed a small inconsistency in pidstat usage message.

Benno Schulenberg (from the Translation Project) reported that
pidstat synopsis should be "-U [ <username> ]" instead of "-U [ username ]"

11 years ago10.1.4 final packaging. v10.1.4
seb [Fri, 8 Mar 2013 08:27:39 +0000 (09:27 +0100)]
10.1.4 final packaging.

Updated CHANGES, spec and lsm files.

11 years agoNLS updated.
seb [Fri, 8 Mar 2013 07:46:55 +0000 (08:46 +0100)]
NLS updated.

Sync'd with translation project.

11 years agopidstat's option -U updated.
seb [Sun, 3 Mar 2013 14:46:28 +0000 (15:46 +0100)]
pidstat's option -U updated.

pidstat's option -U can now be followed by a user name.
In this case, only tasks belonging to the specified user are
displayed by iostat.
pidstat manual page updated.

11 years agoNow use sigaction() instead of signal() for signals handling.
seb [Sat, 2 Mar 2013 14:30:01 +0000 (15:30 +0100)]
Now use sigaction() instead of signal() for signals handling.

signal() manual page explicitly says to avoid using it for
signal handling, because of portability problems among other.
So use now sigaction() for that.

11 years agopidstat can now display the username of the tasks being monitored.
seb [Sat, 2 Mar 2013 13:34:54 +0000 (14:34 +0100)]
pidstat can now display the username of the tasks being monitored.

A new option (-U) has been added to pidstat: This option is used
to display the real user name of the tasks being monitored instead
of the UID. pidstat manual page has been updated.

11 years agopidstat now displays task's UID.
seb [Fri, 1 Mar 2013 14:26:53 +0000 (15:26 +0100)]
pidstat now displays task's UID.

pidstat now displays the real user ID of every task being monitored.
Its manual page has also been updated.

11 years agoFAQ updated.
seb [Fri, 1 Mar 2013 13:34:35 +0000 (14:34 +0100)]
FAQ updated.

Fixed some typos. Also some examples were no longer valid: Fixed them.

11 years agompstat and sar now stop and displays its average stats when it receives
seb [Sat, 23 Feb 2013 15:38:10 +0000 (16:38 +0100)]
mpstat and sar now stop and displays its average stats when it receives
SIGINT (crtl/c).

mpstat and sar/sadc now catch SIGINT (ctrl/c) and display their average
statistics when received.

11 years agopidstat now stops and displays its average
seb [Fri, 22 Feb 2013 13:54:27 +0000 (14:54 +0100)]
pidstat now stops and displays its average
stats when it receives SIGINT (crtl/c).

pidstat now catches SIGINT and displays average statistics
when received.

11 years ago10.1.3 final packaging. v10.1.3
seb [Sun, 23 Dec 2012 10:47:40 +0000 (11:47 +0100)]
10.1.3 final packaging.

Sync'd with Translation Project. Updated lsm and spec files.

11 years agoRemoved several unused definitions in header files.
seb [Thu, 20 Dec 2012 20:54:11 +0000 (21:54 +0100)]
Removed several unused definitions in header files.

Some constants in header files were no longer used. So remove them.

11 years agoIncreased NR_CPUS and NR_IRQS values.
seb [Thu, 20 Dec 2012 20:44:48 +0000 (21:44 +0100)]
Increased NR_CPUS and NR_IRQS values.

Increased NR_CPUS to a minimum value of 2048, and NR_IRQS to 1024.
Mail from Peter Schiffer <pschiffe@redhat.com> 19/12/2012:

we hit NR_CPUS limit on system with 1280 cpus:

Cannot handle so many processors!
Invalid data format

I'm sending you proposed patch for this problem. I also increased NR_IRQS. Let me know what you think.

11 years agoChanged IPv6 counters (used by sar -n {IP6 | EIP6 }) to
seb [Mon, 10 Dec 2012 21:02:12 +0000 (22:02 +0100)]
Changed IPv6 counters (used by sar -n {IP6 | EIP6 }) to
unsigned long long to keep in sync with current kernels.

Keep in sync with recent kernels (3.7rc8 used here): Now use
unsigned long long for SNMP IPv6 statistics.
WARNING: This breaks compatibility with older sar data
files format for IPv6 statistics.

11 years agoChanged IPv4 counters (used by sar -n {IP | EIP }) to
seb [Mon, 10 Dec 2012 20:49:12 +0000 (21:49 +0100)]
Changed IPv4 counters (used by sar -n {IP | EIP }) to
unsigned long long to keep in sync with current kernels.

Keep in sync with recent kernels (3.7rc8 used here): Now use
unsigned long long for SNMP IPv4 statistics.
WARNING: This breaks compatibility with older sar data
files format for IPv4 statistics.

11 years agoChanged network counters (used by sar -n {DEV | EDEV }) to
seb [Mon, 10 Dec 2012 20:27:46 +0000 (21:27 +0100)]
Changed network counters (used by sar -n {DEV | EDEV }) to
unsigned long long to keep in sync with current kernels.

Keep in sync with recent kernels (3.7rc8 used here): Now use
unsigned long long for network statistics.
WARNING: This breaks compatibility with older sar data
files format for network statistics.

Mail from Matthew Hall (matthew.hall@ecsc.co.uk) 15/12/2011:

I've spotted an issue with sadc when values in /proc/net/dev are greater
than 4294967295, in that in rd_stats.h all values in
stats_net_dev/stats_net_edev are unsigned long, but it *seems* that for
a while at least (earliest reference I can see is to 2002 [1]), that
values for (rx|tx)_(bytes|packets) are unsigned long long (this is the
format ifconfig from net-tools uses).

I've attached a sample of my /proc/net/dev (for reference) and a patch
for the 9.0.6.1 version of sysstat (also applies against 10.0.2 with
minor fuzz from patch) which converts lu to llu for these counters.

I've not looked much further into it, since this solves my particular
problem, but I expect it's not the 'correct' solution as I can see in
/usr/include/linux/if_link.h that rx_bytes is a '__u32' for x86, and
'__u64' for x86_64 - so it's probably not portable across different
architectures. There's likely some more work to be done to have
different format structs of stats_net_dev depending on arch.

11 years agoRemove heading spaces in softirq names displayed by mpstat for easier reading.
seb [Sat, 8 Dec 2012 20:54:11 +0000 (21:54 +0100)]
Remove heading spaces in softirq names displayed by mpstat for easier reading.

Output from mpstat -I SCPU was sometimes difficult to read because
of softirq names which are sometimes too long. So remove heading spaces
for easier reading.
Before:
09:46:05 PM  CPU           HI/s        TIMER/s       NET_TX/s       NET_RX/s        BLOCK/s BLOCK_IOPOLL/s      TASKLET/s        SCHED/s      HRTIMER/s          RCU/s
09:46:05 PM    0       0.00     783.63       0.17       9.09       4.52       0.00       3.25     154.86       0.02      66.59
After:
09:57:02 PM  CPU       HI/s    TIMER/s   NET_TX/s   NET_RX/s    BLOCK/s BLOCK_IOPOLL/s  TASKLET/s    SCHED/s  HRTIMER/s      RCU/s
09:57:02 PM    0       0.00     752.30       0.17       7.79       3.80       0.00       2.86     168.52       0.01      64.77

11 years agoCosmetic fixes in configure script.
seb [Fri, 30 Nov 2012 21:32:30 +0000 (22:32 +0100)]
Cosmetic fixes in configure script.

Trying to grep for some expressions in configure.in script was
not done properly, resulting in "...: Command not found" message
(hidden since stdout and stderr were redirected to /dev/null).
So change:
if (`grep some_expr some_file /dev/null 2>&1); then...
with:
grep some_expr some_file /dev/null 2>&1
if test $? = 0; then...

11 years agoNow install sadc in $prefix/lib64 directory on 64 bit machines
seb [Fri, 30 Nov 2012 21:09:48 +0000 (22:09 +0100)]
Now install sadc in $prefix/lib64 directory on 64 bit machines
even if $prefix/lib also exists.

$prefix/lib no longer takes precedence on $prefix/lib64 directory
if this latter exists on 64 bit machines.
CPU is 64 bit if it has the lm (long mode) flag in /proc/cpuinfo.

Mail from Wayne Lin <wlin@mvista.com> 14/11/2012:
Subject: why 64 bit sa1 sa2 sadc are in /usr/lib and not in /usr/lib64?

We like the sysstat package, we are just curious why by default when built
on 64 bit system and targeting 64 bit system, the /sa and its content
sa1, sa2, sadc are being put in /usr/lib and not /usr/lib64?
Should we just use sa_lib_dir to configure the redirect?

11 years agoFIxed a bug where sadc didn't collect all its activities when it
seb [Fri, 30 Nov 2012 20:06:57 +0000 (21:06 +0100)]
FIxed a bug where sadc didn't collect all its activities when it
had to overwrite an old sysstat data file with some
unknown activity formats.

How to reproduce: Create a data file with sadc from version 9.1.6:
sadc data 1 2
Check that you have all activities (and network ones in particular),
for example using sar from 10.1.2 version:
sar -n DEV -f data
Try to append data with sadc from 10.1.2:
sadc -F data 1 3
Only a few (or no) activities have been collected and saved in data file.
This is because one activity is unknown so sar overwrites the file. But in
the meantime, activities have been reset (open_ofile() function).

Mail from John Lau <johnlcf@gmail.com> 16/11/2012:

Subject: Sadc create corrupt sa file even with -F option
(See corresponding mail)

11 years agoOption -y added to iostat.
seb [Tue, 27 Nov 2012 20:23:03 +0000 (21:23 +0100)]
Option -y added to iostat.

This option tells iostat to not display its first report with statistics
since system boot.
Courtesy Peter Schiffer from RedHat.

Mail from Peter Schiffer 20/11/2012 (pschiffe@redhat.com):

I want to talk to you about one feature of iostat command. When you ran
iostat without any arguments, it prints statistics since boot. This is
OK, and, for example, mpstat is doing the same. However, when you run
let's say iostat 1 5, the first report displays statistics since boot.
This can be a problem in numerous situations. Well, I am not sure when
this behavior is beneficial and usually this first report is removed by
some kind of post-processing. When compared to mpstat, the first report
is skipped and it waits to the next report. And I think this is the
default behavior for all other sysstat tools.

Now, I was wondering about how to make it better. I don't think that it
would be wise to change default behavior - that could break things.
But I was thinking more about some new option which would make iostat
skip the first since boot report.

What do you think about it?

11 years agoFixed DTD document.
seb [Mon, 19 Nov 2012 20:48:40 +0000 (21:48 +0100)]
Fixed DTD document.

When computer has run all day without restart, XML output file
from sadf -x contains no boot elements.
So change DTD document accordingly (from <!ELEMENT restarts (boot+)>
to <!ELEMENT restarts (boot*)>).
XSD document is not updated, but its version number changes to remain
consistent with that of DTD document.

Bug reported by Peter Schiffer <pschiffe@redhat.com> 13/11/2012.

11 years agoStarting new version: 10.1.3
seb [Mon, 19 Nov 2012 20:41:40 +0000 (21:41 +0100)]
Starting new version: 10.1.3

11 years ago10.1.2 final packaging. v10.1.2
seb [Wed, 3 Oct 2012 19:34:45 +0000 (21:34 +0200)]
10.1.2 final packaging.

Updated spec and lsm files. CHANGES file updated.

11 years agoNLS updated.
root [Wed, 3 Oct 2012 19:14:12 +0000 (21:14 +0200)]
NLS updated.

Sync'd with translation project.

11 years agoFixed a fatal error when compiled with -Werror=format-security.
seb [Sun, 30 Sep 2012 14:12:54 +0000 (16:12 +0200)]
Fixed a fatal error when compiled with -Werror=format-security.

This change is a workaround a fatal error that we get when compiling
sysstat with -Werror=format-securit.

Mail from Guillaume Rousse (guillomovitch@gmail.com) 30/07/2012:

Voici un patch que j'ai retrouvé dans le package mageia de sysstat, qui corrige une erreur d'utilisation de printf (fatale avec les options -Wformat -Werror=format-security).
[...]

(Following patch doesn't work properly).

11 years agoXML DTD document name is now tagged with a version number.
seb [Sun, 30 Sep 2012 13:28:30 +0000 (15:28 +0200)]
XML DTD document name is now tagged with a version number.

DTD document name now includes a version number.
XML output displayed by sadf -x points at the DTD document
which applies to this specific version.

Mail from Frank Ch Eigler (fche@redhat.com) 26/09/2012:

From some brief testing, it appears as though sadf's xml output format
has changed a few times over time, but the same xml dtd URL is being
emitted: http://pagesperso-orange.fr/sebastien.godard/sysstat.dtd If
indeed the dtd has changed over time, wouldn't it be wise to keep
newer versions tagged with a version number in the URLs, so that
URL-based xml validation would succeed well into the future?

11 years agoNew field added to sar -r output: kbdirty.
seb [Sun, 30 Sep 2012 13:17:12 +0000 (15:17 +0200)]
New field added to sar -r output: kbdirty.

sar -r now tracks the amount of dirty memory (memory waiting to
get written back to disk).
DTD and XSD documents updated.
Sar manual page updated.

Mail from Michael Blakeley (mike@blakeley.com) 28/09/2012:

I've been thinking about patching the sa collectors to track the "Dirty" metric from /proc/meminfo, and sar to report on it. This would be useful for applications where latency is important: having historical data on dirty writeback pages can help trace the kind of problems that can be addressed by tuning vm.dirty_bytes and friends.

In the 10.1 code I see that a few functions and structs already make use of meminfo. What's your philosophy on this? Should dirty-kB be a new struct, or perhaps merge with the existing meminfo_huge struct?

Similarly for reporting, should I focus on a new option ("-D" perhaps?) or try to piggyback on an existing one?

11 years agoNew field added to mpstat: %gnice.
seb [Tue, 25 Sep 2012 13:13:18 +0000 (15:13 +0200)]
New field added to mpstat: %gnice.

This is the time spent by the CPU running a niced guest.
mpstat manual page updated.

11 years agoAdded support for nice guest mode to sar.
seb [Tue, 25 Sep 2012 12:40:18 +0000 (14:40 +0200)]
Added support for nice guest mode to sar.

New field added to sar -u: %gnice (time spent
running a niced guest).
sar manual page updated.
DTD and XSD documents updated.
sadf various output (XML, CSV, etc.) updated.

12 years agoCosmetic change in sadf -H output.
seb [Thu, 6 Sep 2012 19:07:44 +0000 (21:07 +0200)]
Cosmetic change in sadf -H output.

Replaced "file created using sa/sadc from sysstat version..." with
"file created by sa/sadc from sysstat version...".

12 years agosystemd support added.
seb [Mon, 3 Sep 2012 19:23:20 +0000 (21:23 +0200)]
systemd support added.

Sysstat service unit file has been added to replace init script
for systems with systemd support.

Mail from Peter Schiffer <pschiffe@redhat.com> 24/08/2012:

I am sending you a patch which adds support for systemd to sysstat. With this patch, configure script detects whether the system uses systemd, and if yes, it installs the unit file and enables the sysstat service. Then, init script is not used.

Systemd is default since Fedora 15, and many more distributions are slowly converting to it. For more information about it, see it's home page [1], man pages about unit files and integration into autotools can be found at [2 - 6]. General information about systemd can be found at [7].

What do you think?

12 years agoSysstat init script updated to make it more conforming to LSB.
seb [Mon, 3 Sep 2012 14:26:33 +0000 (16:26 +0200)]
Sysstat init script updated to make it more conforming to LSB.

Sysstat init script updated:
* instead of temp file, use /var/run/sysstat.pid file
* check user privileges on start and stop (even though stop does nothing)
* status command works "correctly" (of course it will always return 3 - service is not running, but for the love of the standards..)

Mail from Peter Schiffer (pschiffe@redhat.com) 08/08/2012:

I was looking into sysstats init script, and here are few things I found out:

* init scripts are usually run with root privileges (at least on system start). But then: mktemp command is run under root (line 24 in init script), and if @SU_C_OWNER@ is set and sa1 script fails, then @SU_C_OWNER@ won't have privileges to remove the temp file. example:

$ sudo mktemp /tmp/sysstat-XXXXXX
/tmp/sysstat-PcSXFW
$ rm -f /tmp/sysstat-PcSXFW
rm: cannot remove `/tmp/sysstat-PcSXFW': Operation not permitted

Also, in this case, condition on line 31 is useless.

* it looks like, that comment starting on line 28 is no true (or, at least, anymore). I did a little test (which is attached). In one script, there is command "exit 17", and another script is calling the first via exec. Now, just run:

$ whoami
schiffer
$ su schiffer -c ./sc
Password:
$ echo $?
17

So, you can see two things: the exit code is not lost, and even I call "su user -c" on myself, I need to enter my password. The latter can be confusing if @SU_C_OWNER@ is not me, etc..

So.. what I am trying to show:

* command "service sysstat start" should only be called with root privileges
* we can use exit code of command run under "su foo -c ..."
(...)

Now, the init script should be more conforming to LSB (according to the [1]). I'm also attaching output of our internal LSB init script test.

12 years agosar and sadf manual pages updated. Typo fixed in CHANGES file.
Sebastien [Fri, 27 Jul 2012 19:23:59 +0000 (21:23 +0200)]
sar and sadf manual pages updated. Typo fixed in CHANGES file.

Indication that option -t could also control timestamps
output was missing for various format (-j, -x, -p etc.) in
sadf manual page.

Option -h appeared twice in sar manual page.

Changelog for version 10.1.1 incorrectly stated that the new option -t
had been added to sadc.

12 years agoSTarting version 10.1.2
Sebastien [Fri, 27 Jul 2012 19:18:42 +0000 (21:18 +0200)]
STarting version 10.1.2

12 years agoVersion 10.1.1 final packaging. v10.1.1
Sebastien [Tue, 24 Jul 2012 20:00:58 +0000 (22:00 +0200)]
Version 10.1.1 final packaging.

Updated spec and lsm files. Updated CHANGES file.

12 years agoNLS updated.
Sebastien [Tue, 24 Jul 2012 19:41:50 +0000 (21:41 +0200)]
NLS updated.

Sync'd with Translation Project.

12 years agoTODO file deleted.
Sebastien [Mon, 23 Jul 2012 19:17:44 +0000 (21:17 +0200)]
TODO file deleted.

No real interest to keep this file, which was no longer kept up to date.

12 years agosadf: New option -t added.
Sebastien [Sun, 22 Jul 2012 12:58:10 +0000 (14:58 +0200)]
sadf: New option -t added.

First, this patch renames sadf option '-T' into '-U', and
sadf option '-t' into '-T'.
It then adds a new option: -t. This option tells sadc to display
the timestamps in the local time of the data file creator
instead of UTC. The same option already exists for sar.
The FAQ is also updated: Tell that options -s and -e are always
expressed in local time.

12 years agoSome sadf options have been renamed.
Sebastien [Fri, 20 Jul 2012 19:44:43 +0000 (21:44 +0200)]
Some sadf options have been renamed.

sadf option -T has been renamed into -U, and option -t has been
renamed into -T. This was made compulsory to add a new option -t
consistent with that of sar.

12 years agoPart of sadf -H was written to stderr instead of stdout.
Sebastien [Fri, 20 Jul 2012 19:17:18 +0000 (21:17 +0200)]
Part of sadf -H was written to stderr instead of stdout.

A part of sadf -H output ("File created using...") was written to
stderr instead of stdout. This is now fixed.

12 years agoMake sysstat disk counters consistent with those from latest kernel (3.5).
Sebastien [Thu, 19 Jul 2012 19:18:06 +0000 (21:18 +0200)]
Make sysstat disk counters consistent with those from latest kernel (3.5).

Changed the type of some disk counters to keep in sync with latest 3.5
kernel.
This breaks the compatibility with older sar data files format for disk
activity.

Mail from Peter Schiffer (pschiffe@redhat.com) 15/02/2012:

I am sending you next patch. I've updated reading /proc/diskstats and
/sys/block/<disk>/stat files in iostat.c and rd_stats.c source files
according to latest kernel (3.2.6).

Problem was, that in case of very high I/O operations, sar -d and iostat
outputted overflowed values:

sar -d output:
09:20:01 PM       DEV       tps  rd_sec/s  wr_sec/s  avgrq-sz  avgqu-sz
await     svctm     %util
09:50:01 PM      sdb1   2986.02      0.05  34704.99     11.62   3355.91
1137.22      0.28     84.49
09:55:01 PM      sdb1   3284.08      0.21  32884.03     10.01   4556.98
1386.29      0.27     88.31
10:00:01 PM      sdb1   3260.33      0.19  31497.61      9.66
61474802782539.38
18855397092136.58      0.27     87.60
10:05:01 PM      sdb1   3373.57      0.08  32028.26      9.49   6069.53
1799.10      0.27     89.86

What do you think about the patch?

12 years agoVarious cosmetic changes in manual pages and usage messages displayed by sysstat...
Sebastien [Fri, 13 Jul 2012 19:43:59 +0000 (21:43 +0200)]
Various cosmetic changes in manual pages and usage messages displayed by sysstat commands.

Mail from Peter Schiffer (pschiffe@redhat.com) 04/07/2012:

I am sending you 2 patches. They are minor modifications to the
documentation:

In man-usage.patch I tried to unify usage output of programs and man
pages synopsis, so all the usages of utilities are similar. Also, it
fixes one bug in iostat man page where Network Filesystem report was
mentioned and problem in sar man page where some options in synopsis
weren't bold.

In man-asciibetical-order.patch I tried to unify order of option
descriptions in man pages, I used asciibetical order (uppercase before
lowercase) - again, so all man pages can be similar.

These are rather cosmetic changes than fixes, however I think unity is
important for better user experience.

12 years agoPersistent device names support added to sar and iostat (option -j)
Sebastien [Wed, 11 Jul 2012 19:31:14 +0000 (21:31 +0200)]
Persistent device names support added to sar and iostat (option -j)

Option -j added to sar and iostat to add support for persistent device
names.

Mail from Peter Schiffer (pschiffe@redhat.com) 22/06/2012:

I need to implement another feature for sysstat and I would like to hear
your opinion.

Pretty device names, such as sda, vda, ... are not persistent and in
some specific situations kernel can assign different names for the same
device between reboots. To prevent this confusion, persistent device
names exists. Those names are in /dev/disk/by-xxx folders... You are
probably aware of this..

So, currently, sar -d -p and iostat are displaying the pretty device
names. I would like to add new option, which would take one argument
specifying the type of persistent name, and then, sar -d -p and iostat
would display the device names in that persistent name, e.g.:

$ iostat -some_option label
...
Device:            tps   Blk_read/s   Blk_wrtn/s   Blk_read Blk_wrtn
my-root              11.62       276.70       198.97    2938654 2113160
main-home             16.62        73.21       109.78     777506 1165856

It would work like this: I wouldn't bound the type of name, rather I
would check whether the specified type inserted by user exists like
folder: /dev/disk/by-label (in that particular example). If yes, I would
resolve links in that folder until I found the device I was looking for
and display that name.. It should be straightforward.

My questions are: how would you name the option? And where would you put
the common code for sar and iostat? Also, do you have any comments or
ideas?

12 years agosar: Use /sys/dev/block/major:minor links to determine devices real name.
Sebastien [Sun, 1 Jul 2012 19:29:44 +0000 (21:29 +0200)]
sar: Use /sys/dev/block/major:minor links to determine devices real name.

Now use /sys/dev/block/major:minor links to determine devices real name.
This is used as the first option now, before using sysstat.ioconf
configuration file.

Mail from Peter Schiffer (pschiffe@redhat.com) 20/06/2012:

I am sending you a patch which is looking into
/sys/dev/block/major:minor link to determine the device name. This
should work for any device, but I let it as the last option when
determining devname. What do you think?

12 years agoAdded option -[0-9]* to sar to show data of that days ago.
Sebastien [Sat, 30 Jun 2012 20:32:38 +0000 (22:32 +0200)]
Added option -[0-9]* to sar to show data of that days ago.

Mail from Don <do1@yandex.ru> 22/06/2012:

Hello Sysstat author(s),

Please add option `-[0-9]+' like `-1', `-2', etc. to sar tool, to show
data of that days ago. That would be handy and useful for everybody.

Example implementation in bash:

function sar() {
        case "$1" in -[0-9]*) local OPT="-f /var/log/sa/sa`date +%d
--date=${1#-}' day ago'`"; shift;; esac
        command sar $OPT "$@"
}

Limitation of this implementation is that -1 option should be first, but
if you implement this type of options in main code you can avoid it and
also many people will benefit. It will easier than to rememebr proper
date and type `-f /var/log/sa/saXX'.

Best regards,
Don.

12 years agompstat code cleaned.
Sebastien [Sat, 30 Jun 2012 19:38:04 +0000 (21:38 +0200)]
mpstat code cleaned.

A variable (scp) was set but unused in one of mpstat's function.
So remove it.

12 years agoStarting sysstat version 10.1.1
Sebastien [Mon, 25 Jun 2012 11:50:30 +0000 (13:50 +0200)]
Starting sysstat version 10.1.1

Updated CHANGES and configure files to match sysstat version 10.1.1.

12 years agoFinal packaging: 10.0.5 v10.0.5
Sebastien Godard [Tue, 15 May 2012 18:51:53 +0000 (20:51 +0200)]
Final packaging: 10.0.5

Updated lsm, spec and CHANGES files. Final packaging.

12 years agoNLS updated. Croatian translation added.
Sebastien Godard [Mon, 14 May 2012 19:37:58 +0000 (21:37 +0200)]
NLS updated. Croatian translation added.

Sync'ed with translation project.

12 years agoAdded option --enable-collect-all to configure script.
Sebastien Godard [Thu, 10 May 2012 20:03:02 +0000 (22:03 +0200)]
Added option --enable-collect-all to configure script.

This option tells sadc to collect all possible activities,
including optional ones.

12 years agoFAQ updated.
Sebastien Godard [Wed, 9 May 2012 07:25:46 +0000 (09:25 +0200)]
FAQ updated.

Several details have been added to some answers of the FAQ.
Keep them consistent with current sysstat versions.

12 years agosadc now overwrites its daily data file when it is from a previous month.
Sebastien Godard [Tue, 8 May 2012 13:12:15 +0000 (15:12 +0200)]
sadc now overwrites its daily data file when it is from a previous month.

When the output file is specified as "-", sadc now overwrites the daily
data file if it is from a previous month. This is useful to prevent data
from several months from being saved in the same file.

Mail from Vitezslav Cizek <vcizek@suse.cz>:

Hi,
/var/log/sa/saXX files don't get overwritten when new month comes.
The new data is appended to the end.
Reproduced with several versions of sysstat.

I browsed the code, but couldn't find any part relevant
to the date checking when opening files.

It works as advertised in manpage with the attached patch.
(Against 10.0.4)

The patch doesn't check whether it operates on the standard file or not.

12 years agoChange time format from HH-MM-SS to HH:MM:SS in the reports
Sebastien Godard [Tue, 8 May 2012 12:25:52 +0000 (14:25 +0200)]
Change time format from HH-MM-SS to HH:MM:SS in the reports
displyaed by sadf.

Change the time format to HH:MM:SS to be consistent with XSD
document. This was already the format used a few versions ago
and was changed for an unknown reason.

Mail from Frank Glinka <glinkaf@uni-muenster.de> 24/04/2012:

Your sysstat.xsd specifies the type xs:time for the time elements within the XML. According to the schema specification the format then must be HH:MM:SS for the data but sadf's format is HH-MM-SS. Correspondingly, the element is not valid and not parsed by JAXB.

See:
http://www.w3.org/TR/xmlschema-2/#time
http://www.w3schools.com/schema/schema_dtypes_date.asp

12 years agoXSD document updated.
Sebastien Godard [Tue, 8 May 2012 12:18:59 +0000 (14:18 +0200)]
XSD document updated.

A maxOccurs indicator has been added for the timestamp element.
This is indicator is set to "unbounded", which is compulsory here
as the default value is 1 if not specified.

Mail from Frank Glinka <glinkaf@uni-muenster.de> 24/04/2012:

There seem to be gaps/inconsistencies between the produced XML and the  sysstat.xsd that you provide on your website. The xsd does not specify any maximum occurrence indicators, which in that case default to '1'. For example, although the 'timestamp' element occurs multiple times within the 'statistics' element inside the XML, the xsd claims it appears exactly once. In that case, a 'maxOccurs="unbounded"' is required. (This is an issue if I use Java's JAXB and your sysstat.xsd to read & parse the XML file automatically.)

See:
http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/structures.html#Particle_details
http://www.w3schools.com/schema/schema_complex_indicators.asp

12 years agoOptions -g and -T added to iostat. These options enable the user
Sebastien Godard [Mon, 7 May 2012 18:50:56 +0000 (20:50 +0200)]
Options -g and -T added to iostat. These options enable the user
to display statistics for groups of devices.

Option -g adds support for device groups statistics to iostat.
Option -T tells iostat to display global stats for groups only, and not
stats for individual devices in those groups.

On 03/09/2012 11:05 AM, Alain Chéreau wrote:

    J'ai un serveur avec beaucoup de disques et je voulais ne voir que la
    somme des io des disques utilisés dans le meme type d'usage.
    J'ai modifé iostat pour faire le cumul, somme, ou moyenne, par groupes
    de devices et réalisé la somme sur le nom donné.

    J'attache le code modifié qui réalise cela.

On 03/13/2012 01:53 PM, Alain Chéreau wrote:
Bonjour,

un collegue a également l'intention de s'en servir pour transformer les noms de device en nom logique. Pour simplifier la lecture la mise en plce des titres des courbes.

12 years agoSet exit code to 0 for sa2 script shell.
Sebastien Godard [Thu, 15 Mar 2012 15:49:36 +0000 (16:49 +0100)]
Set exit code to 0 for sa2 script shell.

Mail from Peter Schiffer (pschiffe@redhat.com) 13/03/2012

Hello,

we have found minor issue in sysstat. Exit code of sa2 doesn't have to be 0 even if everything is OK. This is because the last operation there is precautionary rmdir which may not have anything to do:

$ sudo sh /usr/lib64/sa/sa2 -A
$ echo $?
1

I'm attaching simple patch adding "exit 0" at the end of sa1 and sa2. What do you think?

Thanks,

12 years agoStart version 10.0.5
Sebastien Godard [Sat, 10 Mar 2012 19:44:54 +0000 (20:44 +0100)]
Start version 10.0.5

CHANGES files updated. configure scripts updated.

12 years agosysstat 10.0.4: Final packaging. v10.0.4
Sebastien Godard [Thu, 8 Mar 2012 19:19:57 +0000 (20:19 +0100)]
sysstat 10.0.4: Final packaging.

Sync'ed with translation project. CHANGES, lsm and spec files updated.

12 years agoThe number of jiffies spent by a CPU in guest mode given by the
Sebastien Godard [Fri, 24 Feb 2012 15:04:06 +0000 (16:04 +0100)]
The number of jiffies spent by a CPU in guest mode given by the
corresponding counter in /proc/stat may be slightly different
from that included in the user counter. Take this into account
when calculating current time interval value.

This should be a very rare case, and the difference barely noticeable.
Mail from Peter Schiffer 23/02/2012:

Hello Sebastien,

I've done all my work on sysstat for now, but there were no new patches for you.

However, there is one patch I don't know origin of. I am sending it to you as attachment. It's in Fedora since sysstat 10.0.0, but there's no bug related to it. Did Ivana send it to you already? Do you have it included in the next development version?

Anyways, you can release next sysstat version now, thank you for waiting.

peter

sysstat-10.0.0-cpu.patch

diff -up sysstat-10.0.0/mpstat.c.pom sysstat-10.0.0/mpstat.c
--- sysstat-10.0.0/mpstat.c.pom 2011-03-11 18:09:57.000000000 +0100
+++ sysstat-10.0.0/mpstat.c 2011-04-04 11:22:20.000000000 +0200
@@ -418,6 +418,9 @@ void write_stats_core(int prev, int curr

  /* Recalculate itv for current proc */
  pc_itv = get_per_cpu_interval(scc, scp);
+ if ((scc->cpu_user - scc->cpu_guest) < (scp->cpu_user - scp->cpu_guest))
+ pc_itv = pc_itv + (scp->cpu_user - scp->cpu_guest) -
+ (scc->cpu_user - scc->cpu_guest);

  if (!pc_itv) {
  /*

12 years agosa1 manual page updated.
Sebastien Godard [Wed, 8 Feb 2012 06:54:10 +0000 (07:54 +0100)]
sa1 manual page updated.

Give a better example (in the EXAMPLE section) of how to use sa1 shell
script. In particular, tell that option -S from sadc can be used with sa1.

12 years agoiostat didn't display target device information when a symbolic
Sebastien Godard [Tue, 7 Feb 2012 21:14:12 +0000 (22:14 +0100)]
iostat didn't display target device information when a symbolic
link was specified as a parameter. This is now fixed.

Mail from Peter Schiffer <pschiffe@redhat.com> 30/01/2012

Hello Sebastien,

my name is Peter Schiffer and I am a new maintainer of sysstat package in RHEL and Fedora.

We have found the following issue:
iostat does not display target device information when a symbolic link is specified as a parameter

example:
Linux 2.6.32-202.el6.x86_64 (localhost.localdomain)     11/30/11  _x86_64_        (16 CPU)

avg-cpu:  %user   %nice %system %iowait  %steal   %idle
                   0.04      0.00         0.05       0.04      0.00   99.87

Device:            tps   Blk_read/s   Blk_wrtn/s   Blk_read   Blk_wrtn

I am proposing one solution how this could be fixed. What is your opinion about it?

Thanks,

peter

symlinks.patch

diff -upr sysstat-10.0.3.old/common.c sysstat-10.0.3/common.c
--- sysstat-10.0.3.old/common.c 2011-11-20 16:38:04.000000000 +0100
+++ sysstat-10.0.3/common.c 2012-01-30 15:54:28.856597845 +0100
@@ -379,10 +379,10 @@ int get_win_height(void)

 /*
  ***************************************************************************
- * Remove /dev from path name.
+ * Canonicalize and remove /dev from path name.
  *
  * IN:
- * @name Device name (may begins with "/dev/")
+ * @name Device name (may begins with "/dev/" or can be a symlink)
  *
  * RETURNS:
  * Device basename.
@@ -390,10 +390,33 @@ int get_win_height(void)
  */
 char *device_name(char *name)
 {
- if (!strncmp(name, "/dev/", 5))
- return name + 5;
+ char *out;
+ char *resolved_name;

- return name;
+ /* realpath() creates new string, so we need to free it later. */
+ resolved_name = realpath(name, 0);
+
+ /* If path doesn't exists, just copy the input and return it. We have to
+    copy because result of this function is always freed. */
+ if (!resolved_name) {
+ out = (char *)calloc(1, sizeof(name));
+ strncpy(out, name, sizeof(name));
+
+ return out;
+ }
+
+ /* We need to copy the path without "/dev/" prefix because we cannot free
+    'resolved_name + 5' string. */
+ if (!strncmp(resolved_name, "/dev/", 5)) {
+ out = (char *)calloc(1, sizeof(resolved_name) - 4);
+ strncpy(out, resolved_name + 5, sizeof(resolved_name) - 4);
+
+ free(resolved_name);
+
+ return out;
+ }
+
+ return resolved_name;
 }

 /*
diff -upr sysstat-10.0.3.old/iostat.c sysstat-10.0.3/iostat.c
--- sysstat-10.0.3.old/iostat.c 2011-11-20 16:38:04.000000000 +0100
+++ sysstat-10.0.3/iostat.c 2012-01-30 15:57:41.551553692 +0100
@@ -274,6 +274,8 @@ int update_dev_list(int *dlist_idx, char
  strncpy(sdli->dev_name, device_name, MAX_NAME_LEN - 1);
  }

+ free(device_name);
+
  return i;
 }

12 years agoFAQ updated.
Sebastien Godard [Sun, 29 Jan 2012 14:28:42 +0000 (15:28 +0100)]
FAQ updated.

A question and answer has been added for sar and for pidstat.

12 years ago[Andrey Borzenkov]: Don't take virtual devices into account in sar -b results.
Sebastien Godard [Sun, 29 Jan 2012 13:43:53 +0000 (14:43 +0100)]
[Andrey Borzenkov]: Don't take virtual devices into account in sar -b results.

Add only physical devices stats to sar -b results. This avoids
multiplying totals when layered devices (device mapper, Linux MD,
etc) are present.

The device is assumed to be virtual if no /sys/block/<device>/device
link exists.

Only sar -b stats are modified, other statistics (e.g. sar -d) as well
as iostat continue to process virtual devices as before.

Problem noticed by Diedrich Ehlerding.

12 years agoconfigure script updated: Added --disable-stripping option.
Sebastien Godard [Mon, 2 Jan 2012 13:50:53 +0000 (14:50 +0100)]
configure script updated: Added --disable-stripping option.

The configure script has been updated, with the addition of a new
option (--disable-stripping) which tells configure to NOT strip
object files (option "-s" is no longer passed to gcc when linking
the binaries).

From Petr Uzel <petr.uzel@suse.cz> 13/11/2011 11:45 AM

Could you please add something like make install_nostrip to the
Makefile? By default, the buildsystem uses LDFLAGS = -s, which always
strips the resulting binary. In openSUSE, we have to patch this,
because we need to strip the binaries on our own (to create
sysstat-debug{source,info} packages).

12 years agoNLS updated. Serbian translation added.
Sebastien Godard [Sun, 1 Jan 2012 07:35:33 +0000 (08:35 +0100)]
NLS updated. Serbian translation added.

Sync'd with translation project. A new translation file has been added (sr.po).

12 years agosysstat 10.0.3 final packaging. v10.0.3
Sebastien Godard [Sun, 20 Nov 2011 16:24:25 +0000 (17:24 +0100)]
sysstat 10.0.3 final packaging.

Updated CHANGES, lsm and spec files.

12 years agoNLS updated.
Sebastien Godard [Sun, 20 Nov 2011 15:35:19 +0000 (16:35 +0100)]
NLS updated.

Sync'd with Translation Project.

12 years agoFixed random crash with iostat when called with
Sebastien Godard [Sun, 20 Nov 2011 15:29:07 +0000 (16:29 +0100)]
Fixed random crash with iostat when called with
option -N [NOVELL Bug#729130].

Mail from Petr Uzel <petr.uzel@suse.cz> 11/13/2011 11:45 AM:

> > On 11/09/2011 01:34 PM, Petr Uzel wrote:
>> > >attached patch fixes
>> > >https://bugzilla.novell.com/show_bug.cgi?id=729130
>> > >
Hi Sebastien,

As far as I understand (please correct me if I'm wrong), sysstat is
hitting unspecified behavior, which might explain why you can not
reproduce the bug.

Check out transfrom_devmapname() function:

while ((dp = readdir(dm_dir)) != NULL) {
/* For each file in DEVMAP_DIR */

snprintf(filen, MAX_FILE_LEN, "%s/%s", DEVMAP_DIR, dp->d_name);
filen[MAX_FILE_LEN - 1] = '\0';

if (stat(filen, &aux) == 0) {
/* Get its minor and major numbers */

dm_major = major(aux.st_rdev);
dm_minor = minor(aux.st_rdev);

if ((dm_minor == minor) && (dm_major == major)) {
[********>]  dm_name = dp->d_name;
break;
}
}
}
closedir(dm_dir);

dm_name points to the memory returned by readdir(), but from 'man
readdir', this memory is not guaranteed to be valid after next call
to readdir or after closedir().

man readdir:

       ....
       The data returned by readdir() may be overwritten by subsequent
       calls to readdir() for the same directory stream.
       ....

man closedir:

       ....
       The  closedir()  function closes the directory stream
       associated with dirp.  A successful call to closedir() also
       closes the underlying file descriptor associated with dirp.
       The directory stream descriptor dirp is not available after
       this call.
       ....

[It is not very clear to me if this also invalidates the dirent
structure]

So the solution is to strncpy the memory before it gets invalidated by
next readdir() or closedir().

Unrelated to this bug:
Could you please add something like make install_nostrip to the
Makefile? By default, the buildsystem uses LDFLAGS = -s, which always
strips the resulting binary. In openSUSE, we have to patch this,
because we need to strip the binaries on our own (to create
sysstat-debug{source,info} packages).

Thanks for your support,

Petr.

12 years agosadf manual page updated.
Sebastien Godard [Fri, 11 Nov 2011 15:18:55 +0000 (16:18 +0100)]
sadf manual page updated.

sadf manual page updated to add information about new -j option.

12 years agoNew output format added to sadf: JSON.
Sebastien Godard [Fri, 11 Nov 2011 15:01:37 +0000 (16:01 +0100)]
New output format added to sadf: JSON.

JSON (JavaScript Object Notation) is a lightweight data interchange
format (less verbose than XML). sadf can now display sar's data
in JSON using a new switch (-j).

13 years agoFixed bugs in sadf XML output and in DTD/XSD documents.
Sebastien Godard [Wed, 31 Aug 2011 13:11:25 +0000 (15:11 +0200)]
Fixed bugs in sadf XML output and in DTD/XSD documents.

On 08/29/2011 02:27 PM, "Jürgen Heinemann (Undefined)" wrote:
> Hallo Sebastian,
> I have found some bugs with sadf -x command.
> You can see my changes in sysstat-10.0.2.rc1.diff attachment.
> The Doctype Declaration in sadf_misc.c isn't set to "sysstat" rootNode
> and timetamp Element closed with child Elements
> See my Example xslt
>
> sadf -P 0,1 -x > input.xml
> xsltproc --encoding utf-8 --novalid sysstat.xslt input.xml
>
> greets Jürgen

/**
* @file   sysstat-10.0.2.rc1.diff
* @author Juergen Heinemann (Undefined) http://www.hjcms.de
* @since  Mon Aug 29 14:11:17 CEST 2011
* @short  diff options:-Nau6
*/
--- ./xml/sysstat.xsd.orig 2011-08-29 13:42:49.124597092 +0200
+++ ./xml/sysstat.xsd 2011-08-29 13:43:54.065167625 +0200
@@ -40,13 +40,13 @@

 <xs:element name="release" type="release-type"></xs:element>
 <xs:simpleType name="release-type">
  <xs:restriction base="xs:string"></xs:restriction>
 </xs:simpleType>

-<xs:element name=machine"" type="machine-type"></xs:element>
+<xs:element name="machine" type="machine-type"></xs:element>
 <xs:simpleType name="machine-type">
  <xs:restriction base="xs:string"></xs:restriction>
 </xs:simpleType>

 <xs:element name="file-date" type="file-date-type"></xs:element>
 <xs:simpleType name="file-date-type">
@@ -284,17 +284,16 @@
  <xs:element name="hugused-percent" type="hundredth-type"></xs:element>
  </xs:sequence>
 </xs:complexType>

 <xs:element name="kernel" type="kernel-type"></xs:element>
 <xs:complexType name="kernel-type">
- <xs:attribute name="dentunusd" type="xs:nonNegativeInteger">
- <xs:attribute name="file-nr" type="xs:nonNegativeInteger">
- <xs:attribute name="inode-nr" type="xs:nonNegativeInteger">
- <xs:attribute name="pty-nr" type="xs:nonNegativeInteger">
- </xs:attribute>
+  <xs:attribute name="dentunusd" type="xs:nonNegativeInteger"></xs:attribute>
+  <xs:attribute name="file-nr" type="xs:nonNegativeInteger"></xs:attribute>
+  <xs:attribute name="inode-nr" type="xs:nonNegativeInteger"></xs:attribute>
+ <xs:attribute name="pty-nr" type="xs:nonNegativeInteger"></xs:attribute>
 </xs:complexType>

 <xs:element name="queue" type="queue-type"></xs:element>
 <xs:complexType name="queue-type">
  <xs:attribute name="runq-sz" type="xs:nonNegativeInteger"></xs:attribute>
  <xs:attribute name="plist-sz" type="xs:nonNegativeInteger"></xs:attribute>
--- ./xml/sysstat.dtd.orig 2011-08-29 14:00:46.827833320 +0200
+++ ./xml/sysstat.dtd 2011-08-29 14:10:59.347827319 +0200
@@ -2,13 +2,16 @@
 <!--DTD v2.12 for sysstat. See sadf.h -->

 <!ELEMENT sysstat (sysdata-version, host)>

 <!ELEMENT sysdata-version (#PCDATA)>

-<!ELEMENT host (sysname, release, machine, number-of-cpus, file-date, statistics, restarts, comments)>
+<!ENTITY % TIMESTAMP_ELEMENTS "cpu-load|cpu-load-all|process-and-context-switch|interrupts|swap-pages|paging|io|memory|hugepages|kernel|queue|serial|disk|network|power-management">
+<!ENTITY % HOST_ELEMENTS "sysname|release|machine|number-of-cpus|file-date|statistics|restarts|comments">
+
+<!ELEMENT host (%HOST_ELEMENTS;)+>
 <!ATTLIST host
  nodename CDATA #REQUIRED
 >

 <!ELEMENT sysname (#PCDATA)>

@@ -19,13 +22,13 @@
 <!ELEMENT number-of-cpus (#PCDATA)>

 <!ELEMENT file-date (#PCDATA)>

 <!ELEMENT statistics (timestamp+)>

-<!ELEMENT timestamp (cpu-load, cpu-load-all, process-and-context-switch, interrupts, swap-pages, paging, io, memory, hugepages, kernel, queue, serial, disk, network, power-management)>
+<!ELEMENT timestamp (%TIMESTAMP_ELEMENTS;)+>
 <!ATTLIST timestamp
  date CDATA #REQUIRED
  time CDATA #REQUIRED
  utc CDATA #REQUIRED
  interval CDATA #REQUIRED
 >
--- ./sadf_misc.c.orig 2011-08-29 13:54:54.673109443 +0200
+++ ./sadf_misc.c 2011-08-29 14:02:55.640212688 +0200
@@ -285,13 +285,13 @@
  ***************************************************************************
  */
 __printf_funct_t print_xml_timestamp(int *tab, int action, char *cur_date,
       char *cur_time, int utc, unsigned long long itv)
 {
  if (action & F_BEGIN) {
- xprintf(*tab, "<timestamp date=\"%s\" time=\"%s\" utc=\"%d\" interval=\"%llu\"/>",
+ xprintf(*tab, "<timestamp date=\"%s\" time=\"%s\" utc=\"%d\" interval=\"%llu\">",
  cur_date, cur_time, utc ? 1 : 0, itv);
  }
  if (action & F_END) {
  xprintf(--(*tab), "</timestamp>");
  }
 }

sysstat.xslt:
============
<?xml version = '1.0' encoding = 'utf-8' ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!-- Vorgefertigte templates und Helferlein -->
<xsl:output version="1.0"
  method="xml"
  encoding="utf-8"
  indent="yes"
  media-type="text/xml"
/>

<xsl:template match="*" mode="xml">
<xsl:element name="{name()}">
   <xsl:for-each select="@*">
      <xsl:attribute name="{name()}">
         <xsl:value-of select="." />
      </xsl:attribute>
   </xsl:for-each>
   <xsl:apply-templates select="./*|text()" mode="xml" />
</xsl:element>
</xsl:template>

<xsl:template match="sysstat">
  <xsl:apply-templates match="." mode="xml" />
</xsl:template>

</xsl:stylesheet>

13 years agoVersion 10.0.3 begins.
Sebastien Godard [Wed, 31 Aug 2011 12:46:52 +0000 (14:46 +0200)]
Version 10.0.3 begins.

CHANGES and configure files updated for version 10.0.3.

13 years agoSysstat 10.0.2 final packaging v10.0.2
Sebastien Godard [Sun, 21 Aug 2011 14:22:55 +0000 (16:22 +0200)]
Sysstat 10.0.2 final packaging

Updated CHANGES, lsm and spec files.

13 years agoNLS updated.
Sebastien Godard [Sun, 21 Aug 2011 14:14:18 +0000 (16:14 +0200)]
NLS updated.

Sync'd with translation project.

13 years agoFixed a bug with pidstat, where stats for terminated processes
Sebastien Godard [Tue, 16 Aug 2011 12:13:27 +0000 (14:13 +0200)]
Fixed a bug with pidstat, where stats for terminated processes
were still displayed.

On 07/06/2011 08:40 AM, Kei Ishida wrote:
> Hello
>
> I found the folloring bug of pidstat. I hope this would help.
>
> [Bug description]
> Pidstat displayed pid(s) of dead process(es) every other times
> when multiple pids are specified.
>
> [How reproducible]
> Always. Run pidstat with more then pids to watch, and kill one of them.
>
> [Proposed patch]
> diff -urNp sysstat-10.0.1/pidstat.c sysstat-10.0.1_/pidstat.c
> --- sysstat-10.0.1/pidstat.c 2011-06-01 22:05:12.000000000 +0900
> +++ sysstat-10.0.1_/pidstat.c 2011-07-06 11:05:46.149880175 +0900
> @@ -1011,6 +1011,20 @@ int get_pid_to_display(int prev, int cur
>
>   else if (DISPLAY_PID(pidflag)) {
>
> + unsigned int i;
> + int pid_exists = FALSE;
> +
> + /* See if pid exists in pid_array[] */
> + for (i = 0; i < pid_array_nr; i++) {
> + if ((*pstc)->pid == pid_array[i]) {
> + pid_exists = TRUE;
> + break;
> + }
> + }
> +
> + if (!pid_exists)
> + return 0;
> +
>   *pstp = st_pid_list[prev] + p;
>   }
>
>
> Regards,
> Kei Ishida

13 years agoOption "-P ON" added to mpstat.
Sebastien Godard [Mon, 15 Aug 2011 14:00:05 +0000 (16:00 +0200)]
Option "-P ON" added to mpstat.

This option tells mpstat to display statistics for online
processors only.
mpstat manual page updated.

On 06/30/2011 06:41 AM, Ananth N Mavinakayanahalli wrote:

a. Consistency with output of top and /proc/cpuinfo, both of which won't
     display information of offlined CPUs.
b. On POWER7 for instance, with SMT, when SMT is turned off, 3 of the 4
     CPUs are off-lined. Someone using just mpstat will have no idea that
     he has just 1 CPU underneath while mpstat says he has 4, without an
     indication of which ones are usable and which ones are not.

I think, at the least, the -P switch should be educated with a new
option that displays only online CPU information, if there is a hard
requirement to preserve existing functionality.

13 years agopidstat manual page updated.
Sebastien Godard [Sun, 14 Aug 2011 14:33:55 +0000 (16:33 +0200)]
pidstat manual page updated.

Added the description of field %MEM displayed by pidstat -r.

On 06/29/2011 05:43 AM, Carlos Allegri wrote:
> I'm using pidstat version 9.0.6 for monitoring of a mail server.
> I run: "pidstat -r"
> Then, in the output:  "PID  minflt/s  majflt/s     VSZ    RSS   %MEM  Command", I see the column "%MEM" which isn't explained in the manual.
> Could you tell me, which is the meaning of this column?

13 years agosadf manual page updated.
Sebastien Godard [Sat, 13 Aug 2011 13:58:28 +0000 (15:58 +0200)]
sadf manual page updated.

Use of options -t, -H and -T has changed. So updated sadf manual
page accordingly.
Also fix a wrong statement, saying that options -s and -e are ignored
with option -x.

13 years agoDTD and XSD documents updated.
Sebastien Godard [Sat, 13 Aug 2011 12:44:43 +0000 (14:44 +0200)]
DTD and XSD documents updated.

A new mark ("utc") has been added in the XML output
generated by sadf -x. This mark has a value of 0 or 1 depending
on whether the timestamp is expressed in local time or UTC.
A correction has also been made in the XSD document, where the
description of "comment" messages was erroneous.

13 years agosadf modified to make it easier to add new output formats.
Sebastien Godard [Sat, 13 Aug 2011 12:28:19 +0000 (14:28 +0200)]
sadf modified to make it easier to add new output formats.

sadf has been heavily modified to make it easiser to add new
output formats. The idea was to take the same architecture pattern
than that of sar. Anyway, I haven't been able to achieve this goal:
The design is still not generic although things have improved.

13 years agoCosmetic changes in sar.c and sadf.c files.
Sebastien Godard [Tue, 14 Jun 2011 11:29:24 +0000 (13:29 +0200)]
Cosmetic changes in sar.c and sadf.c files.

Instead of calling print methods twice, use the following syntax:

print_method_name(arg1, arg2, arg3,
                  NEED_GLOBAL_ITV(act[i]->options) ? g_itv : itv);

13 years agoAutomate translation files handling in Makefile.in.
Sebastien Godard [Fri, 3 Jun 2011 19:44:18 +0000 (21:44 +0200)]
Automate translation files handling in Makefile.in.

Mail from Jeroen Roovers <jer@gentoo.org> 03/06/2011:
Subject: [PATCH] automate translation file handling in Makefile.in

Hello,

as maintainer of the sysstat package in the Gentoo Linux repository, I
have been maintaining a patch that makes it easier to instruct our
build/install system to install support for certain languages or indeed
save space on the target system by not installing them.

This patch makes the build system not list all the available
translations as the current Makefile.in does, but finds the language
files on its own and repeats the same two commands in a loop over the
files it finds. Also with this patch, the Makefile.in does not need to
be updated for each new translation any longer.

I hope you can implement it.

Kind regards,
      Jeroen Roovers