- update to 9.0.3

- remove obsolete patches
This commit is contained in:
Ivana Varekova 2009-05-28 10:03:36 +00:00
parent c21dff9bdc
commit b30944895f
7 changed files with 31 additions and 364 deletions

View File

@ -1 +1 @@
sysstat-8.0.4.tar.bz2
sysstat-9.0.3.tar.bz2

View File

@ -1 +1 @@
637b7e1e1201b2ebecd6ab8102f19ea7 sysstat-8.0.4.tar.bz2
5e62331a0d7757dcc2354c5945102462 sysstat-9.0.3.tar.bz2

View File

@ -1,13 +0,0 @@
diff -up sysstat-8.0.4/common.c.pom sysstat-8.0.4/common.c
--- sysstat-8.0.4/common.c.pom 2008-01-01 10:26:31.000000000 +0100
+++ sysstat-8.0.4/common.c 2008-04-23 10:23:46.000000000 +0200
@@ -129,6 +129,9 @@ int get_sys_cpu_nr(void)
while ((drd = readdir(dir)) != NULL) {
if (!strncmp(drd->d_name, "cpu", 3)) {
+ /* filter out entries like cpuidle/ */
+ if (!isdigit(drd->d_name[3]))
+ continue;
snprintf(line, MAX_PF_NAME, "%s/%s", SYSFS_DEVCPU, drd->d_name);
line[MAX_PF_NAME - 1] = '\0';
if (stat(line, &buf) < 0)

View File

@ -1,202 +0,0 @@
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 2007-11-10 14:41:02.000000000 +0100
+++ sysstat-8.0.4/man/iostat.1 2008-03-06 10:21:45.000000000 +0100
@@ -3,7 +3,7 @@
iostat \- Report Central Processing Unit (CPU) statistics and input/output
statistics for devices, partitions and network filesystems (NFS).
.SH SYNOPSIS
-.B iostat [ -c ] [ -d ] [ -N ] [ -n ] [ -k | -m ] [ -t ] [ -V ] [ -x ] [
+.B iostat [ -c ] [ -d ] [ -N ] [ -n ] [ -h ] [ -k | -m ] [ -t ] [ -V ] [ -x ] [
.I device
.B [ ... ] | ALL ] [ -p [
.I device
@@ -409,6 +409,19 @@ NFS READ request.
.RS
Indicate the number of megabytes written to the server by the NFS client via an
NFS WRITE request.
+
+.RE
+.B rops/s
+.RS
+Indicate the number of read operations that were issued to the mount point
+per second
+
+.RE
+.B wops/s
+.RS
+Indicate the number of write operations that were issued to the mount point
+per second
+
.RE
.RE
.SH OPTIONS
@@ -429,6 +442,8 @@ Useful for viewing LVM2 statistics.
.IP -n
Display the network filesystem (NFS) report. This option works only with kernel
2.6.17 and later.
+.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
block devices and all their partitions that are used by the system.
diff -up sysstat-8.0.4/iostat.c.pom sysstat-8.0.4/iostat.c
--- sysstat-8.0.4/iostat.c.pom 2008-01-01 10:26:31.000000000 +0100
+++ sysstat-8.0.4/iostat.c 2008-03-06 12:13:01.000000000 +0100
@@ -73,7 +73,7 @@ void usage(char *progname)
{
fprintf(stderr, _("Usage: %s [ options... ] [ <interval> [ <count> ] ]\n"
"Options are:\n"
- "[ -c ] [ -d ] [ -N ] [ -n ] [ -k | -m ] [ -t ] [ -V ] [ -x ]\n"
+ "[ -c ] [ -d ] [ -N ] [ -n ] [ -h ] [ -k | -m ] [ -t ] [ -V ] [ -x ]\n"
"[ <device> [ ... ] | ALL ] [ -p [ <device> | ALL ] ]\n"),
progname);
exit(1);
@@ -843,10 +843,11 @@ void read_ppartitions_stat(int curr, int
void read_nfs_stat(int curr, int flags)
{
FILE *fp;
- int i, sw = 0;
+ int sw = 0;
char line[8192];
+ char *xprt_line;
char nfs_name[MAX_NAME_LEN];
- char mount[10], on[10], bytes[10], aux[32];
+ char mount[10], on[10], prefix[10], aux[32];
struct io_nfs_stats snfs;
/* Every I/O NFS entry is potentially unregistered */
@@ -869,15 +870,45 @@ void read_nfs_stat(int curr, int flags)
}
}
- sscanf(line, "%10s", bytes);
- if (sw && (!strncmp(bytes, "bytes:", 6))) {
+ sscanf(line, "%10s", prefix);
+ if (sw && (!strncmp(prefix, "bytes:", 6))) {
/* Read the stats for the last NFS-mounted directory */
- i = sscanf(strstr(line, "bytes:") + 6, "%llu %llu %llu %llu %llu %llu",
+ sscanf(strstr(line, "bytes:") + 6, "%llu %llu %llu %llu %llu %llu",
&snfs.rd_normal_bytes, &snfs.wr_normal_bytes, &snfs.rd_direct_bytes,
&snfs.wr_direct_bytes, &snfs.rd_server_bytes, &snfs.wr_server_bytes);
- save_stats(nfs_name, curr, &snfs, ionfs_nr, st_hdr_ionfs);
- sw = 0;
+ sw = 2;
+ }
+
+ if ((sw==2) && (!strncmp(prefix,"xprt:", 5))) {
+ /* Read extended statistic for the last NFS-mounted directory
+ - number of sent rpc requests*/
+ xprt_line=(strstr(line,"xprt:")+6);
+ /* upc, tcp or rdma data */
+
+ if (!strncmp(xprt_line,"udp",3)) {
+ /* port, bind_count, sends, recvs, bad_xids, req_u, bklog_u */
+ sscanf(strstr(xprt_line,"udp")+4, "%*u %*u %lu %lu %*u %*u %*u",
+ &snfs.rpc_sends, &snfs.rpc_recvs);
+ }
+
+ if (!strncmp(xprt_line,"tcp",3)) {
+ /* port, bind_counter, connect_count, connect_time, idle_time,
+ sends, recvs, bad_xids, req_u, bklog_u*/
+ sscanf(strstr(xprt_line,"tcp")+4, "%*u %*u %*u %*u %*d %lu %lu %*u %*u %*u",
+ &snfs.rpc_sends, &snfs.rpc_recvs);
+ }
+
+ if (!strncmp(xprt_line,"rdma",4)) {
+ /* 0(port), bind_count, connect_count, connect_time, idle_time
+ sends, recvs, bad_xids, req_u, bklog_u
+ ... */
+ sscanf(strstr(xprt_line,"rdma")+5,"%*u %*u %*u %*u %*d %lu %lu %*u %*u %*u "
+ "%*u %*u %*u %*u %*u %*u %*u %*u %*u %*u\n",
+ &snfs.rpc_sends, &snfs.rpc_recvs);
+ }
+ save_stats(nfs_name, curr, &snfs, ionfs_nr, st_hdr_ionfs);
+ sw = 0;
}
}
@@ -957,15 +988,15 @@ void write_nfs_stat_header(int flags, in
{
printf("Filesystem: ");
if (DISPLAY_KILOBYTES(flags)) {
- printf(" rkB_nor/s wkB_nor/s rkB_dir/s wkB_dir/s rkB_svr/s wkB_svr/s\n");
+ printf(" rkB_nor/s wkB_nor/s rkB_dir/s wkB_dir/s rkB_svr/s wkB_svr/s rops/s wops/s\n");
*fctr = 1024;
}
else if (DISPLAY_MEGABYTES(flags)) {
- printf(" rMB_nor/s wMB_nor/s rMB_dir/s wMB_dir/s rMB_svr/s wMB_svr/s\n");
+ printf(" rMB_nor/s wMB_nor/s rMB_dir/s wMB_dir/s rMB_svr/s wMB_svr/s rops/s wops/s\n");
*fctr = 1024 * 1024;
}
else {
- printf(" rBlk_nor/s wBlk_nor/s rBlk_dir/s wBlk_dir/s rBlk_svr/s wBlk_svr/s\n");
+ printf(" rBlk_nor/s wBlk_nor/s rBlk_dir/s wBlk_dir/s rBlk_svr/s wBlk_svr/s rops/s wops/s\n");
*fctr = 512;
}
}
@@ -1084,14 +1115,19 @@ void write_nfs_stat(int curr, unsigned l
struct io_hdr_stats *shi, struct io_nfs_stats *ioni,
struct io_nfs_stats *ionj)
{
- printf("%-22s %12.2f %12.2f %12.2f %12.2f %12.2f %12.2f\n",
- shi->name,
- S_VALUE(ionj->rd_normal_bytes, ioni->rd_normal_bytes, itv) / fctr,
+ if (DISPLAY_HUMAN_READABLE(flags))
+ printf("%-22s \n%23s", shi-> name,"");
+ else
+ printf("%-22s ", shi->name);
+ printf("%12.2f %12.2f %12.2f %12.2f %12.2f %12.2f %9.2f %9.2f \n",
+ S_VALUE(ionj->rd_normal_bytes, ioni->rd_normal_bytes, itv) / fctr,
S_VALUE(ionj->wr_normal_bytes, ioni->wr_normal_bytes, itv) / fctr,
S_VALUE(ionj->rd_direct_bytes, ioni->rd_direct_bytes, itv) / fctr,
S_VALUE(ionj->wr_direct_bytes, ioni->wr_direct_bytes, itv) / fctr,
S_VALUE(ionj->rd_server_bytes, ioni->rd_server_bytes, itv) / fctr,
- S_VALUE(ionj->wr_server_bytes, ioni->wr_server_bytes, itv) / fctr);
+ S_VALUE(ionj->wr_server_bytes, ioni->wr_server_bytes, itv) / fctr,
+ S_VALUE(ionj->rpc_sends, ioni->rpc_sends, itv),
+ S_VALUE(ionj->rpc_recvs, ioni->rpc_recvs, itv));
}
@@ -1353,6 +1389,11 @@ int main(int argc, char **argv)
flags |= I_D_DISK; /* Display disk utilization */
break;
+ case 'h':
+ /* Display NFS stats human readable*/
+ flags |= I_D_HUMAN_READABLE;
+ break;
+
case 'k':
if (DISPLAY_MEGABYTES(flags))
usage(argv[0]);
diff -up sysstat-8.0.4/iostat.h.pom sysstat-8.0.4/iostat.h
--- sysstat-8.0.4/iostat.h.pom 2008-01-01 10:26:31.000000000 +0100
+++ sysstat-8.0.4/iostat.h 2008-03-06 11:04:05.000000000 +0100
@@ -27,6 +27,7 @@
#define I_F_HAS_NFS 0x08000
#define I_D_DEVMAP_NAME 0x10000
#define I_D_ISO 0x20000
+#define I_D_HUMAN_READABLE 0x40000
#define DISPLAY_CPU(m) (((m) & I_D_CPU) == I_D_CPU)
#define DISPLAY_DISK(m) (((m) & I_D_DISK) == I_D_DISK)
@@ -46,6 +47,7 @@
#define HAS_NFS(m) (((m) & I_F_HAS_NFS) == I_F_HAS_NFS)
#define DISPLAY_DEVMAP_NAME(m) (((m) & I_D_DEVMAP_NAME) == I_D_DEVMAP_NAME)
#define DISPLAY_ISO(m) (((m) & I_D_ISO) == I_D_ISO)
+#define DISPLAY_HUMAN_READABLE(m) (((m) & I_D_HUMAN_READABLE) == I_D_HUMAN_READABLE)
#define DT_DEVICE 0
#define DT_PARTITION 1
@@ -120,6 +122,9 @@ struct io_nfs_stats {
unsigned long long wr_direct_bytes __attribute__ ((packed));
unsigned long long rd_server_bytes __attribute__ ((packed));
unsigned long long wr_server_bytes __attribute__ ((packed));
+ unsigned long rpc_sends __attribute__ ((packed));
+ unsigned long rpc_recvs __attribute__ ((packed));
+
};
#define IO_NFS_STATS_SIZE (sizeof(struct io_nfs_stats))

View File

@ -1,50 +1,28 @@
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
diff -up sysstat-9.0.3/iostat.c.pom sysstat-9.0.3/iostat.c
--- sysstat-9.0.3/iostat.c.pom 2009-04-16 18:30:27.000000000 +0200
+++ sysstat-9.0.3/iostat.c 2009-05-28 11:49:45.000000000 +0200
@@ -825,8 +825,10 @@ void read_diskstats_stat(int curr)
else if (i == 7) {
/* Partition without extended statistics */
if (DISPLAY_EXTENDED(flags) ||
- (!dlist_idx && !DISPLAY_PARTITIONS(flags)))
- continue;
+ (!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;
diff -up sysstat-9.0.3/man/iostat.1.pom sysstat-9.0.3/man/iostat.1
--- sysstat-9.0.3/man/iostat.1.pom 2009-04-16 18:01:06.000000000 +0200
+++ sysstat-9.0.3/man/iostat.1 2009-05-28 11:53:36.000000000 +0200
@@ -462,6 +462,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
+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;

View File

@ -1,94 +0,0 @@
diff -up sysstat-8.0.4/sadc.c.pom sysstat-8.0.4/sadc.c
--- sysstat-8.0.4/sadc.c.pom 2008-01-01 10:26:31.000000000 +0100
+++ sysstat-8.0.4/sadc.c 2008-02-28 10:25:20.000000000 +0100
@@ -99,6 +99,32 @@ void alarm_handler(int sig)
alarm(interval);
}
+
+/*
+ ***************************************************************************
+ * write 'count' bytes from buffer to file fd
+ ***************************************************************************
+ */
+int write_all(int fd, const char *buffer, int count)
+{
+ int block, offset = 0;
+
+ while (count > 0) {
+ block = write(fd, &buffer[offset], count);
+
+ if (block < 0) {
+ if (errno == EINTR) continue;
+ return block;
+ }
+ if (block == 0) return offset;
+
+ offset += block;
+ count -= block;
+ }
+
+ return offset;
+}
+
/*
***************************************************************************
@@ -357,7 +383,7 @@ void setup_file_hdr(int fd, size_t *file
file_hdr.sa_release[UTSNAME_LEN - 1] = '\0';
/* Write file header */
- if ((nb = write(fd, &file_hdr, FILE_HDR_SIZE)) != FILE_HDR_SIZE) {
+ if ((nb = write_all(fd, &file_hdr, FILE_HDR_SIZE)) != FILE_HDR_SIZE) {
fprintf(stderr, _("Cannot write system activity file header: %s\n"),
strerror(errno));
exit(2);
@@ -404,7 +430,7 @@ void write_special_record(int ofd, size_
}
/* Write record now */
- if ((nb = write(ofd, &file_stats, file_stats_size)) != file_stats_size)
+ if ((nb = write_all(ofd, &file_stats, file_stats_size)) != file_stats_size)
p_write_error();
}
@@ -432,32 +458,32 @@ void write_stats(int ofd, size_t file_st
/* Unable to lock file: wait for next iteration to try again to save data */
return;
}
- if ((nb = write(ofd, &file_stats, file_stats_size)) != file_stats_size)
+ if ((nb = write_all(ofd, &file_stats, file_stats_size)) != file_stats_size)
p_write_error();
if (cpu_nr) {
- if ((nb = write(ofd, st_cpu, STATS_ONE_CPU_SIZE * cpu_nr)) != (STATS_ONE_CPU_SIZE * cpu_nr))
+ if ((nb = write_all(ofd, st_cpu, STATS_ONE_CPU_SIZE * cpu_nr)) != (STATS_ONE_CPU_SIZE * cpu_nr))
p_write_error();
}
if (GET_ONE_IRQ(sadc_actflag)) {
- if ((nb = write(ofd, interrupts, STATS_ONE_IRQ_SIZE)) != STATS_ONE_IRQ_SIZE)
+ if ((nb = write_all(ofd, interrupts, STATS_ONE_IRQ_SIZE)) != STATS_ONE_IRQ_SIZE)
p_write_error();
}
if (serial_nr) {
- if ((nb = write(ofd, st_serial, STATS_SERIAL_SIZE * serial_nr)) != (STATS_SERIAL_SIZE * serial_nr))
+ if ((nb = write_all(ofd, st_serial, STATS_SERIAL_SIZE * serial_nr)) != (STATS_SERIAL_SIZE * serial_nr))
p_write_error();
}
if (irqcpu_nr) {
- if ((nb = write(ofd, st_irq_cpu, STATS_IRQ_CPU_SIZE * cpu_nr * irqcpu_nr))
+ if ((nb = write_all(ofd, st_irq_cpu, STATS_IRQ_CPU_SIZE * cpu_nr * irqcpu_nr))
!= (STATS_IRQ_CPU_SIZE * cpu_nr * irqcpu_nr))
p_write_error();
}
if (iface_nr) {
- if ((nb = write(ofd, st_net_dev, STATS_NET_DEV_SIZE * iface_nr)) != (STATS_NET_DEV_SIZE * iface_nr))
+ if ((nb = write_all(ofd, st_net_dev, STATS_NET_DEV_SIZE * iface_nr)) != (STATS_NET_DEV_SIZE * iface_nr))
p_write_error();
}
if (disk_nr && GET_DISK(sadc_actflag)) {
/* Disk stats written only if -d option used */
- if ((nb = write(ofd, st_disk, DISK_STATS_SIZE * disk_nr)) != (DISK_STATS_SIZE * disk_nr))
+ if ((nb = write_all(ofd, st_disk, DISK_STATS_SIZE * disk_nr)) != (DISK_STATS_SIZE * disk_nr))
p_write_error();
}
}

View File

@ -1,14 +1,11 @@
Name: sysstat
Version: 8.0.4
Release: 7%{?dist}
Version: 9.0.3
Release: 1%{?dist}
Summary: The sar and iostat system monitoring commands
License: GPLv2+
Group: Applications/System
URL: http://perso.orange.fr/sebastien.godard/
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)
@ -25,10 +22,7 @@ activity.
%prep
%setup -q
%patch0 -p1 -b .ret
%patch1 -p1 -b .nfse
%patch2 -p1 -b .cpu
%patch3 -p1 -b .diskst
#%patch3 -p1 -b .diskst
iconv -f windows-1252 -t utf8 CREDITS > CREDITS.aux
mv CREDITS.aux CREDITS
@ -80,6 +74,10 @@ rm -rf %{buildroot}
%{_localstatedir}/log/sa
%changelog
* Thu May 28 2009 Ivana Varekova <varekova@redhat.com> - 9.0.3-1
- update to 9.0.3
- remove obsolete patches
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 8.0.4-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild