From bc8a7c719ff9249c7f978dab73673fa096ca8f13 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Aug 01 2017 02:43:50 +0000 Subject: import procps-ng-3.3.10-16.el7 --- diff --git a/SOURCES/procps-ng-3.3.10-pmap-lines-twice.patch b/SOURCES/procps-ng-3.3.10-pmap-lines-twice.patch new file mode 100644 index 0000000..edb2250 --- /dev/null +++ b/SOURCES/procps-ng-3.3.10-pmap-lines-twice.patch @@ -0,0 +1,12 @@ +diff -up procps-ng-3.3.10/pmap.c.ori procps-ng-3.3.10/pmap.c +--- procps-ng-3.3.10/pmap.c.ori 2017-02-20 10:47:08.292453148 +0100 ++++ procps-ng-3.3.10/pmap.c 2017-02-20 10:49:05.078924572 +0100 +@@ -615,7 +615,7 @@ static int one_proc(proc_t * p) + total_private_dirty += smap_value; + continue; + } +- if (strncmp("Swap", smap_key, 4) == 0) { ++ if ((strncmp("Swap", smap_key, 4) == 0) && (strlen(smap_key)==4)) { + /*doesn't matter as long as last */ + printf("%0*" KLF "x %*lu %*llu %*llu %*s %s\n", + maxw1, start, diff --git a/SOURCES/procps-ng-3.3.10-ps-full-wchan-name.patch b/SOURCES/procps-ng-3.3.10-ps-full-wchan-name.patch new file mode 100644 index 0000000..e72d059 --- /dev/null +++ b/SOURCES/procps-ng-3.3.10-ps-full-wchan-name.patch @@ -0,0 +1,29 @@ +diff -up ./proc/ksym.c.ori ./proc/ksym.c +--- ./proc/ksym.c.ori 2006-06-25 08:57:18.000000000 +0200 ++++ ./proc/ksym.c 2016-11-16 13:34:31.902836748 +0100 +@@ -567,11 +567,7 @@ static const char * read_wchan_file(unsi + + // lame ppc64 has a '.' in front of every name + if(*ret=='.') ret++; +- switch(*ret){ +- case 's': if(!strncmp(ret, "sys_", 4)) ret += 4; break; +- case 'd': if(!strncmp(ret, "do_", 3)) ret += 3; break; +- case '_': while(*ret=='_') ret++; break; +- } ++ while(*ret=='_') ret++; + return ret; + } + +@@ -616,11 +612,7 @@ const char * lookup_wchan(unsigned KLONG + ret = good_symb->name; + // lame ppc64 has a '.' in front of every name + if(*ret=='.') ret++; +- switch(*ret){ +- case 's': if(!strncmp(ret, "sys_", 4)) ret += 4; break; +- case 'd': if(!strncmp(ret, "do_", 3)) ret += 3; break; +- case '_': while(*ret=='_') ret++; break; +- } ++ while(*ret=='_') ret++; + /* if(!*ret) ret = fail.name; */ /* not likely (name was "sys_", etc.) */ + + /* cache name after abbreviation */ diff --git a/SOURCES/procps-ng-3.3.10-slabtop-use-val-float.patch b/SOURCES/procps-ng-3.3.10-slabtop-use-val-float.patch new file mode 100644 index 0000000..42ed9df --- /dev/null +++ b/SOURCES/procps-ng-3.3.10-slabtop-use-val-float.patch @@ -0,0 +1,21 @@ +diff -up ./proc/slab.c.ori ./proc/slab.c +--- ./proc/slab.c.ori 2017-03-13 17:14:22.684744976 +0100 ++++ ./proc/slab.c 2017-03-13 17:14:28.836719945 +0100 +@@ -179,7 +179,7 @@ static int parse_slabinfo20(struct slab_ + curr->cache_size = (unsigned long)curr->nr_slabs * curr->pages_per_slab * page_size; + + if (curr->nr_objs) { +- curr->use = 100 * curr->nr_active_objs / curr->nr_objs; ++ curr->use = 100 * (float)curr->nr_active_objs / curr->nr_objs; + stats->nr_active_caches++; + } else + curr->use = 0; +@@ -258,7 +258,7 @@ static int parse_slabinfo11(struct slab_ + curr->cache_size = (unsigned long)curr->nr_slabs * curr->pages_per_slab * page_size; + + if (curr->nr_objs) { +- curr->use = 100 * curr->nr_active_objs / curr->nr_objs; ++ curr->use = 100 * (float)curr->nr_active_objs / curr->nr_objs; + stats->nr_active_caches++; + } else + curr->use = 0; diff --git a/SOURCES/procps-ng-3.3.10-sysctl-conf-manpage-predef-note.patch b/SOURCES/procps-ng-3.3.10-sysctl-conf-manpage-predef-note.patch new file mode 100644 index 0000000..8f687ca --- /dev/null +++ b/SOURCES/procps-ng-3.3.10-sysctl-conf-manpage-predef-note.patch @@ -0,0 +1,19 @@ +diff -up ./sysctl.conf.5.ori ./sysctl.conf.5 +--- ./sysctl.conf.5.ori 2017-04-06 18:59:51.718644400 +0200 ++++ ./sysctl.conf.5 2017-04-06 19:00:01.872604143 +0200 +@@ -28,6 +28,15 @@ token = value + Note that blank lines are ignored, and whitespace before and after a token or + value is ignored, although a value can contain whitespace within. Lines which + begin with a # or ; are considered comments and ignored. ++.SH NOTES ++As the ++.BR /etc/sysctl.conf ++file is used to override default kernel parameter values, only a small number of parameters is predefined in the file. ++Use ++.IR /sbin/sysctl\ \-a ++or follow ++.BR sysctl (8) ++to list all possible parameters. The description of individual parameters can be found in the kernel documentation. + .SH EXAMPLE + .RS + .sp diff --git a/SOURCES/procps-ng-3.3.10-sysctl-man-conf-override-hint.patch b/SOURCES/procps-ng-3.3.10-sysctl-man-conf-override-hint.patch new file mode 100644 index 0000000..0f3b3de --- /dev/null +++ b/SOURCES/procps-ng-3.3.10-sysctl-man-conf-override-hint.patch @@ -0,0 +1,12 @@ +diff -up ./sysctl.8.ori ./sysctl.8 +--- ./sysctl.8.ori 2014-09-23 13:40:36.000000000 +0200 ++++ ./sysctl.8 2017-05-31 14:43:08.323364474 +0200 +@@ -78,7 +78,7 @@ values listing. + Print value without new line. + .TP + \fB\-\-system\fR +-Load settings from all system configuration files. ++Load settings from all system configuration files. Files are read from directories in the following list in given order from top to bottom. Once a file of a given filename is loaded, any file of the same name in subsequent directories is ignored. + .br + /run/sysctl.d/*.conf + .br diff --git a/SOURCES/procps-ng-3.3.10-top-instant-cpu-stats.patch b/SOURCES/procps-ng-3.3.10-top-instant-cpu-stats.patch new file mode 100644 index 0000000..a60a043 --- /dev/null +++ b/SOURCES/procps-ng-3.3.10-top-instant-cpu-stats.patch @@ -0,0 +1,166 @@ +diff -up ./top/top.c.ori ./top/top.c +--- ./top/top.c.ori 2017-04-07 18:36:05.953611338 +0200 ++++ ./top/top.c 2017-04-07 18:37:14.037321741 +0200 +@@ -91,6 +91,7 @@ static int Rc_questions; + static unsigned Pg2K_shft = 0; + + /* SMP, Irix/Solaris mode, Linux 2.5.xx support */ ++static CPU_t *Cpu_tics; + static int Cpu_faux_tot; + static float Cpu_pmax; + static const char *Cpu_States_fmts; +@@ -2356,10 +2357,10 @@ static void zap_fieldstab (void) { + * This guy's modeled on libproc's 'eight_cpu_numbers' function except + * we preserve all cpu data in our CPU_t array which is organized + * as follows: +- * cpus[0] thru cpus[n] == tics for each separate cpu +- * cpus[sumSLOT] == tics from the 1st /proc/stat line +- * [ and beyond sumSLOT == tics for each cpu NUMA node ] */ +-static CPU_t *cpus_refresh (CPU_t *cpus) { ++ * Cpu_tics[0] thru Cpu_tics[n] == tics for each separate cpu ++ * Cpu_tics[sumSLOT] == tics from /proc/stat line #1 ++ * [ and beyond sumSLOT == tics for each cpu NUMA node ] */ ++static void cpus_refresh (void) { + #define sumSLOT ( smp_num_cpus ) + #define totSLOT ( 1 + smp_num_cpus + Numa_node_tot) + static FILE *fp = NULL; +@@ -2377,7 +2378,7 @@ static CPU_t *cpus_refresh (CPU_t *cpus) + sav_slot = sumSLOT; + zap_fieldstab(); + if (fp) { fclose(fp); fp = NULL; } +- if (cpus) { free(cpus); cpus = NULL; } ++ if (Cpu_tics) free(Cpu_tics); + } + + /* by opening this file once, we'll avoid the hit on minor page faults +@@ -2387,7 +2388,7 @@ static CPU_t *cpus_refresh (CPU_t *cpus) + error_exit(fmtmk(N_fmt(FAIL_statopn_fmt), strerror(errno))); + /* note: we allocate one more CPU_t via totSLOT than 'cpus' so that a + slot can hold tics representing the /proc/stat cpu summary */ +- cpus = alloc_c(totSLOT * sizeof(CPU_t)); ++ Cpu_tics = alloc_c(totSLOT * sizeof(CPU_t)); + } + rewind(fp); + fflush(fp); +@@ -2410,7 +2411,7 @@ static CPU_t *cpus_refresh (CPU_t *cpus) + #undef buffGRW + + // remember from last time around +- sum_ptr = &cpus[sumSLOT]; ++ sum_ptr = &Cpu_tics[sumSLOT]; + memcpy(&sum_ptr->sav, &sum_ptr->cur, sizeof(CT_t)); + // then value the last slot with the cpu summary line + if (4 > sscanf(bp, "cpu %Lu %Lu %Lu %Lu %Lu %Lu %Lu %Lu" +@@ -2437,7 +2438,7 @@ static CPU_t *cpus_refresh (CPU_t *cpus) + + // now value each separate cpu's tics... + for (i = 0; i < sumSLOT; i++) { +- CPU_t *cpu_ptr = &cpus[i]; // avoid gcc subscript bloat ++ CPU_t *cpu_ptr = &Cpu_tics[i]; // avoid gcc subscript bloat + #ifdef PRETEND8CPUS + bp = buf; + #endif +@@ -2448,7 +2449,6 @@ static CPU_t *cpus_refresh (CPU_t *cpus) + , &cpu_ptr->cur.u, &cpu_ptr->cur.n, &cpu_ptr->cur.s + , &cpu_ptr->cur.i, &cpu_ptr->cur.w, &cpu_ptr->cur.x + , &cpu_ptr->cur.y, &cpu_ptr->cur.z)) { +- memmove(cpu_ptr, sum_ptr, sizeof(CPU_t)); + break; // tolerate cpus taken offline + } + +@@ -2488,8 +2488,6 @@ static CPU_t *cpus_refresh (CPU_t *cpus) + } // end: for each cpu + + Cpu_faux_tot = i; // tolerate cpus taken offline +- +- return cpus; + #undef sumSLOT + #undef totSLOT + } // end: cpus_refresh +@@ -5119,7 +5117,6 @@ static void summary_hlp (CPU_t *cpu, con + static void summary_show (void) { + #define isROOM(f,n) (CHKw(w, f) && Msg_row + (n) < Screen_rows - 1) + #define anyFLG 0xffffff +- static CPU_t *smpcpu = NULL; + WIN_t *w = Curwin; // avoid gcc bloat with a local copy + char tmp[MEDBUFSIZ]; + int i; +@@ -5142,7 +5139,7 @@ static void summary_show (void) { + , Frame_stopped, Frame_zombied)); + Msg_row += 1; + +- smpcpu = cpus_refresh(smpcpu); ++ cpus_refresh(); + + #ifndef NUMA_DISABLE + if (!Numa_node_tot) goto numa_nope; +@@ -5150,11 +5147,11 @@ static void summary_show (void) { + if (CHKw(w, View_CPUNOD)) { + if (Numa_node_sel < 0) { + // display the 1st /proc/stat line, then the nodes (if room) +- summary_hlp(&smpcpu[smp_num_cpus], N_txt(WORD_allcpus_txt)); ++ summary_hlp(&Cpu_tics[smp_num_cpus], N_txt(WORD_allcpus_txt)); + Msg_row += 1; + // display each cpu node's states + for (i = 0; i < Numa_node_tot; i++) { +- CPU_t *nod_ptr = &smpcpu[1 + smp_num_cpus + i]; ++ CPU_t *nod_ptr = &Cpu_tics[1 + smp_num_cpus + i]; + if (!isROOM(anyFLG, 1)) break; + #ifndef OFF_NUMASKIP + if (nod_ptr->id) { +@@ -5169,13 +5166,13 @@ static void summary_show (void) { + } else { + // display the node summary, then the associated cpus (if room) + snprintf(tmp, sizeof(tmp), N_fmt(NUMA_nodenam_fmt), Numa_node_sel); +- summary_hlp(&smpcpu[1 + smp_num_cpus + Numa_node_sel], tmp); ++ summary_hlp(&Cpu_tics[1 + smp_num_cpus + Numa_node_sel], tmp); + Msg_row += 1; + for (i = 0; i < Cpu_faux_tot; i++) { +- if (Numa_node_sel == smpcpu[i].node) { ++ if (Numa_node_sel == Cpu_tics[i].node) { + if (!isROOM(anyFLG, 1)) break; +- snprintf(tmp, sizeof(tmp), N_fmt(WORD_eachcpu_fmt), smpcpu[i].id); +- summary_hlp(&smpcpu[i], tmp); ++ snprintf(tmp, sizeof(tmp), N_fmt(WORD_eachcpu_fmt), Cpu_tics[i].id); ++ summary_hlp(&Cpu_tics[i], tmp); + Msg_row += 1; + } + } +@@ -5185,14 +5182,14 @@ numa_nope: + #endif + if (CHKw(w, View_CPUSUM)) { + // display just the 1st /proc/stat line +- summary_hlp(&smpcpu[Cpu_faux_tot], N_txt(WORD_allcpus_txt)); ++ summary_hlp(&Cpu_tics[Cpu_faux_tot], N_txt(WORD_allcpus_txt)); + Msg_row += 1; + + } else { + // display each cpu's states separately, screen height permitting... + for (i = 0; i < Cpu_faux_tot; i++) { +- snprintf(tmp, sizeof(tmp), N_fmt(WORD_eachcpu_fmt), smpcpu[i].id); +- summary_hlp(&smpcpu[i], tmp); ++ snprintf(tmp, sizeof(tmp), N_fmt(WORD_eachcpu_fmt), Cpu_tics[i].id); ++ summary_hlp(&Cpu_tics[i], tmp); + Msg_row += 1; + if (!isROOM(anyFLG, 1)) break; + } +@@ -5643,6 +5640,7 @@ static void frame_make (void) { + + // whoa either first time or thread/task mode change, (re)prime the pump... + if (Pseudo_row == PROC_XTRA) { ++ cpus_refresh(); + procs_refresh(); + usleep(LIB_USLEEP); + putp(Cap_clr_scr); +diff -up ./top/top.h.ori ./top/top.h +--- ./top/top.h.ori 2017-04-07 18:36:14.921573192 +0200 ++++ ./top/top.h 2017-04-07 18:37:14.037321741 +0200 +@@ -728,7 +728,7 @@ typedef struct WIN_t { + //atic inline void widths_resize (void); + //atic void zap_fieldstab (void); + /*------ Library Interface ---------------------------------------------*/ +-//atic CPU_t *cpus_refresh (CPU_t *cpus); ++//atic void cpus_refresh (void); + #ifdef OFF_HST_HASH + //atic inline HST_t *hstbsrch (HST_t *hst, int max, int pid); + #else diff --git a/SPECS/procps-ng.spec b/SPECS/procps-ng.spec index 911cc3b..8f34cbb 100644 --- a/SPECS/procps-ng.spec +++ b/SPECS/procps-ng.spec @@ -4,7 +4,7 @@ Summary: System and process monitoring utilities Name: procps-ng Version: 3.3.10 -Release: 10%{?dist} +Release: 16%{?dist} License: GPL+ and GPLv2 and GPLv2+ and GPLv3+ and LGPLv2+ Group: Applications/System URL: https://sourceforge.net/projects/procps-ng/ @@ -18,6 +18,12 @@ Patch3: procps-ng-3.3.10-vmstat-devlen.patch Patch4: procps-ng-3.3.10-find_elf_note-memory-error-fix.patch Patch5: procps-ng-3.3.10-ps-scattered-thread-cgroups.patch Patch6: procps-ng-3.3.10-vmstat-long-device-name.patch +Patch7: procps-ng-3.3.10-ps-full-wchan-name.patch +Patch8: procps-ng-3.3.10-pmap-lines-twice.patch +Patch9: procps-ng-3.3.10-slabtop-use-val-float.patch +Patch10: procps-ng-3.3.10-sysctl-conf-manpage-predef-note.patch +Patch11: procps-ng-3.3.10-top-instant-cpu-stats.patch +Patch12: procps-ng-3.3.10-sysctl-man-conf-override-hint.patch Requires(post): /sbin/ldconfig Requires(postun): /sbin/ldconfig @@ -90,6 +96,12 @@ Internationalization pack for procps-ng %patch4 -p1 %patch5 -p1 %patch6 -p1 +%patch7 -p1 +%patch8 -p1 +%patch9 -p1 +%patch10 -p1 +%patch11 -p1 +%patch12 -p1 %build @@ -171,6 +183,30 @@ rmdir %{buildroot}/share %{_datadir}/locale/* %changelog +* Wed May 31 2017 Jan Rybar - 3.3.10-16 +- sysctl manpage: Added explanation of conf files precedence +- Resolves: rhbz#1456905 + +* Fri Apr 07 2017 Jan Rybar - 3.3.10-15 +- top - real CPU statistics instead of since-boot are shown at start +- Resolves: rhbz#1182327 + +* Fri Apr 07 2017 Jan Rybar - 3.3.10-14 +- sysctl.conf manpage: note about predefined values added +- Resolves: rhbz#1439837 + +* Mon Mar 13 2017 Jan Rybar - 3.3.10-13 +- slabtop: incorrect computation of "used" value, use float to fix +- Resolves: rhbz#1329958 + +* Mon Feb 20 2017 Jan Rybar - 3.3.10-12 +- pmap no longer shows each line twice with blank values on newer kernels +- Resolves: rhbz#1330417 + +* Tue Jan 31 2017 Jan Rybar - 3.3.10-11 +- ps no longer removes 'do_' and 'sys_' from wchan data +- Resolves: rhbz#1373246 + * Tue Jul 26 2016 Jan Rybar - 3.3.10-10 - Fixes sysinfo - devices with name longer than 20 chars are mistaken for partitions - Resolves: rhbz#1169349