update to 10.0.1
remove useless patches
This commit is contained in:
parent
3acb6bc7f6
commit
eb0d12691a
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1 @@
|
||||
/sysstat-10.0.0.tar.bz2
|
||||
/sysstat-10.0.1.tar.bz2
|
||||
|
2
sources
2
sources
@ -1 +1 @@
|
||||
557875adaad4dbc0a6873748de6f1ce4 sysstat-10.0.0.tar.bz2
|
||||
b6744a28717dad6a5909fbb2e68b1dc6 sysstat-10.0.1.tar.bz2
|
||||
|
@ -1,43 +0,0 @@
|
||||
diff -up sysstat-10.0.0/cifsiostat.c.pom sysstat-10.0.0/cifsiostat.c
|
||||
--- sysstat-10.0.0/cifsiostat.c.pom 2011-03-11 18:09:57.000000000 +0100
|
||||
+++ sysstat-10.0.0/cifsiostat.c 2011-05-04 08:09:45.000000000 +0200
|
||||
@@ -319,6 +319,8 @@ void read_cifs_stat(int curr)
|
||||
char line[256];
|
||||
char aux[32];
|
||||
int start = 0;
|
||||
+ long long unsigned aux_open;
|
||||
+ long long unsigned all_open = 0;
|
||||
char cifs_name[MAX_NAME_LEN];
|
||||
char name_tmp[MAX_NAME_LEN];
|
||||
struct cifs_stats scifs;
|
||||
@@ -337,7 +339,9 @@ void read_cifs_stat(int curr)
|
||||
/* Read CIFS directory name */
|
||||
if (isdigit((unsigned char) line[0]) && sscanf(line, aux , name_tmp) == 1) {
|
||||
if (start) {
|
||||
+ scifs.fopens = all_open;
|
||||
save_stats(cifs_name, curr, &scifs);
|
||||
+ all_open = 0;
|
||||
}
|
||||
else {
|
||||
start = 1;
|
||||
@@ -353,12 +357,19 @@ void read_cifs_stat(int curr)
|
||||
}
|
||||
if (!strncmp(line, "Opens:", 6)) {
|
||||
sscanf(line, "Opens: %llu Closes:%llu Deletes: %llu",
|
||||
- &scifs.fopens, &scifs.fcloses, &scifs.fdeletes);
|
||||
+ &aux_open, &scifs.fcloses, &scifs.fdeletes);
|
||||
+ all_open += aux_open;
|
||||
+ }
|
||||
+ if (!strncmp(line, "Posix Opens:", 12)) {
|
||||
+ sscanf(line, "Posix Opens: %llu Posix Mkdirs: %*llu",
|
||||
+ &aux_open);
|
||||
+ all_open += aux_open;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (start) {
|
||||
+ scifs.fopens = all_open;
|
||||
save_stats(cifs_name, curr, &scifs);
|
||||
}
|
||||
|
@ -1,109 +0,0 @@
|
||||
diff -up sysstat-10.0.0/iostat.c.pom sysstat-10.0.0/iostat.c
|
||||
--- sysstat-10.0.0/iostat.c.pom 2011-03-11 18:09:57.000000000 +0100
|
||||
+++ sysstat-10.0.0/iostat.c 2011-05-02 15:56:07.000000000 +0200
|
||||
@@ -81,11 +81,11 @@ void usage(char *progname)
|
||||
progname);
|
||||
#ifdef DEBUG
|
||||
fprintf(stderr, _("Options are:\n"
|
||||
- "[ -c ] [ -d ] [ -N ] [ -k | -m ] [ -t ] [ -V ] [ -x ] [ -z ]\n"
|
||||
+ "[ -c ] [ -d ] [ -h ] [ -N ] [ -k | -m ] [ -t ] [ -V ] [ -x ] [ -z ]\n"
|
||||
"[ <device> [...] | ALL ] [ -p [ <device> [,...] | ALL ] ] [ --debuginfo ]\n"));
|
||||
#else
|
||||
fprintf(stderr, _("Options are:\n"
|
||||
- "[ -c ] [ -d ] [ -N ] [ -k | -m ] [ -t ] [ -V ] [ -x ] [ -z ]\n"
|
||||
+ "[ -c ] [ -d ] [ -h ] [ -N ] [ -k | -m ] [ -t ] [ -V ] [ -x ] [ -z ]\n"
|
||||
"[ <device> [...] | ALL ] [ -p [ <device> [,...] | ALL ] ]\n"));
|
||||
#endif
|
||||
exit(1);
|
||||
@@ -827,9 +827,14 @@ void write_ext_stat(int curr, unsigned l
|
||||
(ioi->wr_ticks - ioj->wr_ticks) /
|
||||
((double) (ioi->wr_ios - ioj->wr_ios)) : 0.0;
|
||||
|
||||
+ if (DISPLAY_HUMAN_READ(flags)) {
|
||||
+ printf("%-22s\n%13s", shi->name, "");
|
||||
+ } else {
|
||||
+ printf("%-13s ", shi->name);
|
||||
+ }
|
||||
+
|
||||
/* DEV rrq/s wrq/s r/s w/s rsec wsec rqsz qusz await r_await w_await svctm %util */
|
||||
- printf("%-13s %8.2f %8.2f %7.2f %7.2f %8.2f %8.2f %8.2f %8.2f %7.2f %7.2f %7.2f %6.2f %6.2f\n",
|
||||
- shi->name,
|
||||
+ printf("%8.2f %8.2f %7.2f %7.2f %8.2f %8.2f %8.2f %8.2f %7.2f %7.2f %7.2f %6.2f %6.2f\n",
|
||||
S_VALUE(ioj->rd_merges, ioi->rd_merges, itv),
|
||||
S_VALUE(ioj->wr_merges, ioi->wr_merges, itv),
|
||||
S_VALUE(ioj->rd_ios, ioi->rd_ios, itv),
|
||||
@@ -866,7 +871,11 @@ void write_basic_stat(int curr, unsigned
|
||||
{
|
||||
unsigned long long rd_sec, wr_sec;
|
||||
|
||||
- printf("%-13s", shi->name);
|
||||
+ if (DISPLAY_HUMAN_READ(flags)) {
|
||||
+ printf("%-22s\n%13s", shi->name, "");
|
||||
+ } else {
|
||||
+ printf("%-13s ", shi->name);
|
||||
+ }
|
||||
|
||||
/* Print stats coming from /sys or /proc/diskstats */
|
||||
rd_sec = ioi->rd_sectors - ioj->rd_sectors;
|
||||
@@ -1194,6 +1203,11 @@ int main(int argc, char **argv)
|
||||
report_set = TRUE;
|
||||
break;
|
||||
|
||||
+ case 'h':
|
||||
+ /* Display device names in human readable format */
|
||||
+ flags |= I_D_HUMAN_READ;
|
||||
+ break;
|
||||
+
|
||||
case 'k':
|
||||
if (DISPLAY_MEGABYTES(flags)) {
|
||||
usage(argv[0]);
|
||||
diff -up sysstat-10.0.0/iostat.h.pom sysstat-10.0.0/iostat.h
|
||||
--- sysstat-10.0.0/iostat.h.pom 2011-03-11 18:09:57.000000000 +0100
|
||||
+++ sysstat-10.0.0/iostat.h 2011-05-02 15:56:07.000000000 +0200
|
||||
@@ -21,7 +21,7 @@
|
||||
#define I_D_MEGABYTES 0x00200
|
||||
#define I_D_PARTITIONS 0x00400
|
||||
#define I_F_HAS_DISKSTATS 0x00800
|
||||
-/* Unused 0x01000 */
|
||||
+#define I_D_HUMAN_READ 0x01000
|
||||
/* Unused 0x02000 */
|
||||
/* Unused 0x04000 */
|
||||
/* Unused 0x08000 */
|
||||
@@ -42,6 +42,7 @@
|
||||
#define DISPLAY_UNFILTERED(m) (((m) & I_D_UNFILTERED) == I_D_UNFILTERED)
|
||||
#define DISPLAY_PARTITIONS(m) (((m) & I_D_PARTITIONS) == I_D_PARTITIONS)
|
||||
#define HAS_DISKSTATS(m) (((m) & I_F_HAS_DISKSTATS) == I_F_HAS_DISKSTATS)
|
||||
+#define DISPLAY_HUMAN_READ(m) (((m) & I_D_HUMAN_READ) == I_D_HUMAN_READ)
|
||||
#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_ZERO_OMIT(m) (((m) & I_D_ZERO_OMIT) == I_D_ZERO_OMIT)
|
||||
diff -up sysstat-10.0.0/man/iostat.in.pom sysstat-10.0.0/man/iostat.in
|
||||
--- sysstat-10.0.0/man/iostat.in.pom 2010-06-13 15:23:55.000000000 +0200
|
||||
+++ sysstat-10.0.0/man/iostat.in 2011-05-02 15:56:07.000000000 +0200
|
||||
@@ -4,7 +4,7 @@ iostat \- Report Central Processing Unit
|
||||
statistics for devices and partitions.
|
||||
.SH SYNOPSIS
|
||||
.ie 'yes'@WITH_DEBUG@' \{
|
||||
-.B iostat [ -c ] [ -d ] [ --debuginfo ] [ -N ] [ -k | -m ] [ -t ] [ -V ] [ -x ] [ -z ] [
|
||||
+.B iostat [ -c ] [ -d ] [ -h ] [ --debuginfo ] [ -N ] [ -k | -m ] [ -t ] [ -V ] [ -x ] [ -z ] [
|
||||
.I device
|
||||
.B [...] | ALL ] [ -p [
|
||||
.I device
|
||||
@@ -15,7 +15,7 @@ statistics for devices and partitions.
|
||||
.B ] ]
|
||||
.\}
|
||||
.el \{
|
||||
-.B iostat [ -c ] [ -d ] [ -N ] [ -k | -m ] [ -t ] [ -V ] [ -x ] [ -z ] [
|
||||
+.B iostat [ -c ] [ -d ] [ -h ] [ -N ] [ -k | -m ] [ -t ] [ -V ] [ -x ] [ -z ] [
|
||||
.I device
|
||||
.B [...] | ALL ] [ -p [
|
||||
.I device
|
||||
@@ -265,6 +265,8 @@ Display the device utilization report.
|
||||
.IP --debuginfo
|
||||
Print debug output to stderr.
|
||||
.\}
|
||||
+.IP -h
|
||||
+Make the disk stats report easier to read by a human.
|
||||
.IP -k
|
||||
Display statistics in kilobytes per second.
|
||||
.IP -m
|
@ -1,15 +0,0 @@
|
||||
diff -up sysstat-10.0.0/rd_stats.c.pom sysstat-10.0.0/rd_stats.c
|
||||
--- sysstat-10.0.0/rd_stats.c.pom 2011-03-11 18:09:57.000000000 +0100
|
||||
+++ sysstat-10.0.0/rd_stats.c 2011-05-04 07:59:28.000000000 +0200
|
||||
@@ -1759,8 +1759,10 @@ void read_uptime(unsigned long long *upt
|
||||
if ((fp = fopen(UPTIME, "r")) == NULL)
|
||||
return;
|
||||
|
||||
- if (fgets(line, 128, fp) == NULL)
|
||||
+ if (fgets(line, 128, fp) == NULL) {
|
||||
+ close(fp);
|
||||
return;
|
||||
+ }
|
||||
|
||||
sscanf(line, "%lu.%lu", &up_sec, &up_cent);
|
||||
*uptime = (unsigned long long) up_sec * HZ +
|
14
sysstat.spec
14
sysstat.spec
@ -1,6 +1,6 @@
|
||||
Name: sysstat
|
||||
Version: 10.0.0
|
||||
Release: 4%{?dist}
|
||||
Version: 10.0.1
|
||||
Release: 1%{?dist}
|
||||
Summary: The sar and iostat system monitoring commands
|
||||
License: GPLv2+
|
||||
Group: Applications/System
|
||||
@ -9,9 +9,6 @@ Source: http://perso.orange.fr/sebastien.godard/%{name}-%{version}.tar.bz2
|
||||
# fixes #643380
|
||||
Patch11: sysstat-10.0.0-cpu.patch
|
||||
Patch12: sysstat-10.0.0-makefile.patch
|
||||
Patch13: sysstat-10.0.0-iostat_hr.patch
|
||||
Patch14: sysstat-10.0.0-ru.patch
|
||||
Patch15: sysstat-10.0.0-cifs_fopen.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
|
||||
Requires: /sbin/chkconfig
|
||||
@ -30,9 +27,6 @@ activity.
|
||||
%setup -q
|
||||
%patch11 -p1 -b .cpu
|
||||
%patch12 -p1 -b .ls
|
||||
%patch13 -p1 -b .hr
|
||||
%patch14 -p1 -b .ru
|
||||
%patch15 -p1 -b .fo
|
||||
iconv -f windows-1252 -t utf8 CREDITS > CREDITS.aux
|
||||
mv CREDITS.aux CREDITS
|
||||
|
||||
@ -81,6 +75,10 @@ rm -rf %{buildroot}
|
||||
%{_localstatedir}/log/sa
|
||||
|
||||
%changelog
|
||||
* Tue Jun 7 2011 Ivana Hutarova Varekova <varekova@redhat.com> - 10.0.1-1
|
||||
- update to 10.0.1
|
||||
- remove useles patches
|
||||
|
||||
* Wed May 4 2011 Ivana Hutarova Varekova <varekova@redhat.com> - 10.0.0-4
|
||||
- close the file descriptor in a special situation in read_uoptime function
|
||||
- fix the number on open files in cifsiostat output
|
||||
|
Loading…
Reference in New Issue
Block a user