diff --git a/sysstat-8.0.4-procdisksts.patch b/sysstat-8.0.4-procdisksts.patch new file mode 100644 index 0000000..616a620 --- /dev/null +++ b/sysstat-8.0.4-procdisksts.patch @@ -0,0 +1,50 @@ +diff -up sysstat-8.0.4/man/iostat.1.pom sysstat-8.0.4/man/iostat.1 +--- sysstat-8.0.4/man/iostat.1.pom 2008-12-05 11:12:36.000000000 +0100 ++++ sysstat-8.0.4/man/iostat.1 2008-12-05 11:18:33.000000000 +0100 +@@ -445,7 +445,7 @@ Display the network filesystem (NFS) rep + .IP -h + Display the NFS report more human readable. + .IP "-p [ { device | ALL } ]" +-The -p option is exclusive of the -x option and displays statistics for ++The -p option displays statistics for + block devices and all their partitions that are used by the system. + If a device name is entered on the command line, then statistics for it + and all its partitions are displayed. Last, the +@@ -453,6 +453,8 @@ and all its partitions are displayed. La + keyword indicates that statistics have to be displayed for all the block + devices and partitions defined by the system, including those that have + never been used. ++Some kernels does not produce extended statistic for partitions so then ++the combination of -p and -x options return an error. + Note that this option works only with post 2.5 kernels. + .IP -t + Print the time for each report displayed. The timestamp format may depend +diff -up sysstat-8.0.4/iostat.c.pom sysstat-8.0.4/iostat.c +--- sysstat-8.0.4/iostat.c.pom 2008-12-05 11:12:36.000000000 +0100 ++++ sysstat-8.0.4/iostat.c 2008-12-05 11:20:20.000000000 +0100 +@@ -733,8 +733,10 @@ void read_diskstats_stat(int curr, int f + } + else if (i == 7) { + /* Partition */ +- if (DISPLAY_EXTENDED(flags) || (!dlist_idx && !DISPLAY_PARTITIONS(flags))) +- continue; ++ if (DISPLAY_EXTENDED(flags) || (!dlist_idx && !DISPLAY_PARTITIONS(flags))) { ++ fprintf(stderr, _("Your kernel does not produce data for partition extended statistics\n")); ++ exit(1); ++ } + + sdev.rd_ios = rd_ios; + sdev.rd_sectors = rd_merges_or_rd_sec; +@@ -1471,12 +1473,6 @@ int main(int argc, char **argv) + DISPLAY_UNFILTERED(flags)) + flags |= I_D_DISK; + +- /* Linux does not provide extended stats for partitions nor for NFS directories */ +- if (DISPLAY_PARTITIONS(flags) && DISPLAY_EXTENDED(flags)) { +- fprintf(stderr, _("-x and -p options are mutually exclusive\n")); +- exit(1); +- } +- + /* Ignore device list if '-p ALL' entered on the command line */ + if (DISPLAY_PART_ALL(flags)) + dlist_idx = 0; diff --git a/sysstat.spec b/sysstat.spec index d073503..5fece32 100644 --- a/sysstat.spec +++ b/sysstat.spec @@ -1,6 +1,6 @@ Name: sysstat Version: 8.0.4 -Release: 5%{?dist} +Release: 6%{?dist} Summary: The sar and iostat system monitoring commands License: GPLv2+ Group: Applications/System @@ -9,6 +9,7 @@ Source: http://perso.orange.fr/sebastien.godard/%{name}-%{version}.tar.bz2 Patch0: sysstat-8.0.4-write.patch Patch1: sysstat-8.0.4-nfs_ext.patch Patch2: sysstat-8.0.4-cpu.patch +Patch3: sysstat-8.0.4-procdisksts.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -27,6 +28,7 @@ activity. %patch0 -p1 -b .ret %patch1 -p1 -b .nfse %patch2 -p1 -b .cpu +%patch3 -p1 -b .diskst iconv -f windows-1252 -t utf8 CREDITS > CREDITS.aux mv CREDITS.aux CREDITS @@ -78,6 +80,9 @@ rm -rf %{buildroot} %{_localstatedir}/log/sa %changelog +* Fri Dec 5 2008 Ivana Varekova - 8.0.4-6 +- add /proc/diskstats reading patch + * Mon Sep 22 2008 Ivana Varekova - 8.0.4-5 - Resolves: #463066 - Fix Patch0:/%%patch mismatch