Hello community,
here is the log from the commit of package procps for openSUSE:Factory checked in at 2014-05-27 07:08:58
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/procps (Old)
and /work/SRC/openSUSE:Factory/.procps.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "procps"
Changes:
--------
--- /work/SRC/openSUSE:Factory/procps/procps.changes 2014-05-17 06:43:16.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.procps.new/procps.changes 2014-05-27 07:09:01.000000000 +0200
@@ -1,0 +2,91 @@
+Wed May 21 13:39:58 UTC 2014 - werner@suse.de
+
+- Require the systemd libraries for build to allow the move
+ of systemd.pc back to systemd
+
+-------------------------------------------------------------------
+Fri May 16 09:44:19 UTC 2014 - werner@suse.de
+
+- Update to procps-ng-3.3.9
+ * kernel namespaces support added to skill, pgrep, ps and top
+ * pidof was reimplemented from scratch (replacing sysvinit pidof)
+ * ps has configurable libselinux support (--enable-libselinux)
+ * ps provides for display of systemd slice unit (--with-systemd)
+ * free can once again report non-zero 'shared' memory
+ * sysctl provides '--system' to ignore missing /etc/sysctl.conf
+ * watch interval capacity was increased - debian #720445
+ * pwdx no longer fails in a nonexistent locale - debian #718766
+ * top clarified summary area Mem/Swap stats - debian #718670
+ * top batch mode -w (width) abend fixed - debian #721204
+ * top man page removed 'Bd/Ed' mdoc macros - debian #725713
+ * top no longer clears screen at exit - redhat #977561
+ * top adapted to potential libnuma stderr message - redhat #998678
+ * top added missing batch mode newline - redhat #1008674
+- Modify patches
+ procps-ng-3.3.8-watch.patch becomes procps-ng-3.3.9-watch.patch
+ procps-v3.3.4-w-notruncate.diff becomes procps-ng-3.3.9-w-notruncate.diff
+ procps-ng-3.3.8-top.1.diff
+ procps-ng-3.3.8-top.1.diff
+ procps-v3.3.4-large_pcpu.patch
+ procps-ng-3.3.8-bnc634071_procstat2.diff
+- Remove patches now upstream
+ procps-v3.3.4-stealtime.patch is upstream
+ procps-ng-3.3.8-libselinux.patch
+ procps-ng-3.3.8-shmem.patch
+ 0001-top-add-the-major-version-to-dlopen-of-libnuma-sonam.patch
+ 0002-top-trade-two-groff_mdoc-macros-for-groff-equivalent.patch
+ 0003-library-for-atexit-support-fix-fileutils-for-EPIPE.patch
+ 0004-top-enable-screen-contents-preservation-at-end-of-jo.patch
+ 0005-top-refine-some-miscellaneous-signals-interrupt-stuf.patch
+ 0006-top-cursor-repositioning-includes-line-oriented-inpu.patch
+ 0007-top-correct-improve-or-otherwise-tweak-some-comments.patch
+ 0008-top-tweak-cursor-state-code-to-swat-an-obscure-bugle.patch
+ 0009-top-correct-cursor-positioning-for-all-Z-or-C-cases.patch
+ 0010-ps-address-a-potential-newline-quirk-the-libselinux.patch
+ 0012-top-hint-that-Summary-Area-cached-is-Mem-not-Swap.patch
+ 0013-top-modest-efficiency-change-to-message-line-handlin.patch
+ 0014-top-correct-improve-and-otherwise-tweak-configs_read.patch
+ 0015-top-swat-bug-affecting-batch-mode-and-width-provisio.patch
+ 0018-top-restore-the-lost-final-newline-when-in-Batch-mod.patch
+ 0019-top-swat-bug-impacting-idle-mode-user-filtering.patch
+ 0021-top-address-some-potential-libnuma-display-corruptio.patch
+ 0022-top-fix-miscellaneous-spelling-errors-in-man-documen.patch
+ 0023-top-expand-on-column-highlight-quirks-in-man-documen.patch
+ 0024-top-add-some-flexibility-to-dlopen-for-numa-support.patch
+ 0025-top-minimize-the-statistics-overhead-for-numa-suppor.patch
+ 0026-top-eliminate-yet-more-gcc-subscript-resolution-bloa.patch
+ 0032-top-do-not-lie-about-purported-alphabetical-ordering.patch
+ 0033-top-follow-usual-name-conventions-for-global-variabl.patch
+- Add patches from upstream
+ 0023-top-do-not-forget-the-fscanf-s-terminating-null-byte.patch
+ 0024-sysctl-system-loads-default-config-file.patch
+ 0025-Split-help-lines-to-help-translators.patch
+ 0026-library-fixing-uninitialized-variable-pos-in-whattim.patch
+ 0027-pgrep-Fixing-memory-leak-in-do_regcomp.patch
+ 0028-sysctl-Fixing-memory-leaks-in-PreloadSystem.patch
+ 0029-ps-ignore-SIGCONT.patch
+ 0031-vmstat-wide-output-still-not-wide-enough.patch
+ 0032-library-skip-replacement-of-trailing-0-in-read_unvec.patch
+ 0033-kill-for-PID-1-restored.patch
+ 0034-Check-for-presence-of-disks-in-vmstat.patch
+ 0035-PID-2-to-9-for-kill-too.patch
+ 0036-pgrep-fails-to-show-full-command-line-with-au.patch
+ 0037-fail-on-null-string-for-arguments.patch
+ 0038-Update-help-files.patch
+ 0039-vmstat-Support-for-timestamps-with-t-fix-for-wd.patch
+ 0040-watch-Don-t-leak-extra-fds-to-the-child.patch
+ 0041-vmstat-Fixing-format-security-flaws.patch
+ 0043-Added-get-trans-target-to-Makefile.patch
+ 0045-library-properly-handle-memory-used-by-tmpfs.patch
+ 0046-Minor-i18n-fixes.patch
+ 0047-sysctl-increase-max-supported-line-length-of-the-con.patch
+ 0049-fix-url-for-rsync.patch
+ 0051-top-update-copyright-dates-plus-1-preprocessor-chang.patch
+ 0052-top-refactor-man-document-so-as-to-allow-translation.patch
+ 0053-top-minimize-the-usage-of-apostrophes-in-man-documen.patch
+ 0054-top-swap-opening-quotes-for-back-tics-in-man-documen.patch
+ 0055-misc-fix-man-doc-spelling-and-grammar-for-translatio.patch
+ 0058-library-reverting-tmpfs-subtraction-from-cached-18-F.patch
+ 0060-top-miscellaneous-accumulated-changes-to-man-documen.patch
+
+-------------------------------------------------------------------
Old:
----
0001-top-add-the-major-version-to-dlopen-of-libnuma-sonam.patch
0002-top-trade-two-groff_mdoc-macros-for-groff-equivalent.patch
0003-library-for-atexit-support-fix-fileutils-for-EPIPE.patch
0004-top-enable-screen-contents-preservation-at-end-of-jo.patch
0005-top-refine-some-miscellaneous-signals-interrupt-stuf.patch
0006-top-cursor-repositioning-includes-line-oriented-inpu.patch
0007-top-correct-improve-or-otherwise-tweak-some-comments.patch
0008-top-tweak-cursor-state-code-to-swat-an-obscure-bugle.patch
0009-top-correct-cursor-positioning-for-all-Z-or-C-cases.patch
0010-ps-address-a-potential-newline-quirk-the-libselinux.patch
0012-top-hint-that-Summary-Area-cached-is-Mem-not-Swap.patch
0013-top-modest-efficiency-change-to-message-line-handlin.patch
0014-top-correct-improve-and-otherwise-tweak-configs_read.patch
0015-top-swat-bug-affecting-batch-mode-and-width-provisio.patch
0018-top-restore-the-lost-final-newline-when-in-Batch-mod.patch
0019-top-swat-bug-impacting-idle-mode-user-filtering.patch
0021-top-address-some-potential-libnuma-display-corruptio.patch
0022-top-fix-miscellaneous-spelling-errors-in-man-documen.patch
0023-top-expand-on-column-highlight-quirks-in-man-documen.patch
0024-top-add-some-flexibility-to-dlopen-for-numa-support.patch
0025-top-minimize-the-statistics-overhead-for-numa-suppor.patch
0026-top-eliminate-yet-more-gcc-subscript-resolution-bloa.patch
0032-top-do-not-lie-about-purported-alphabetical-ordering.patch
0033-top-follow-usual-name-conventions-for-global-variabl.patch
procps-ng-3.3.8-libselinux.patch
procps-ng-3.3.8-shmem.patch
procps-ng-3.3.8-watch.patch
procps-ng-3.3.8.tar.xz
procps-v3.3.4-stealtime.patch
procps-v3.3.4-w-notruncate.diff
New:
----
0023-top-do-not-forget-the-fscanf-s-terminating-null-byte.patch
0024-sysctl-system-loads-default-config-file.patch
0025-Split-help-lines-to-help-translators.patch
0026-library-fixing-uninitialized-variable-pos-in-whattim.patch
0027-pgrep-Fixing-memory-leak-in-do_regcomp.patch
0028-sysctl-Fixing-memory-leaks-in-PreloadSystem.patch
0029-ps-ignore-SIGCONT.patch
0031-vmstat-wide-output-still-not-wide-enough.patch
0032-library-skip-replacement-of-trailing-0-in-read_unvec.patch
0033-kill-for-PID-1-restored.patch
0034-Check-for-presence-of-disks-in-vmstat.patch
0035-PID-2-to-9-for-kill-too.patch
0036-pgrep-fails-to-show-full-command-line-with-au.patch
0037-fail-on-null-string-for-arguments.patch
0038-Update-help-files.patch
0039-vmstat-Support-for-timestamps-with-t-fix-for-wd.patch
0040-watch-Don-t-leak-extra-fds-to-the-child.patch
0041-vmstat-Fixing-format-security-flaws.patch
0043-Added-get-trans-target-to-Makefile.patch
0045-library-properly-handle-memory-used-by-tmpfs.patch
0046-Minor-i18n-fixes.patch
0047-sysctl-increase-max-supported-line-length-of-the-con.patch
0049-fix-url-for-rsync.patch
0051-top-update-copyright-dates-plus-1-preprocessor-chang.patch
0052-top-refactor-man-document-so-as-to-allow-translation.patch
0053-top-minimize-the-usage-of-apostrophes-in-man-documen.patch
0054-top-swap-opening-quotes-for-back-tics-in-man-documen.patch
0055-misc-fix-man-doc-spelling-and-grammar-for-translatio.patch
0058-library-reverting-tmpfs-subtraction-from-cached-18-F.patch
0060-top-miscellaneous-accumulated-changes-to-man-documen.patch
procps-ng-3.3.9-w-notruncate.diff
procps-ng-3.3.9-watch.patch
procps-ng-3.3.9.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ procps.spec ++++++
--- /var/tmp/diff_new_pack.rjAhlH/_old 2014-05-27 07:09:02.000000000 +0200
+++ /var/tmp/diff_new_pack.rjAhlH/_new 2014-05-27 07:09:02.000000000 +0200
@@ -17,7 +17,8 @@
%bcond_with bin2usr
-%define somajor 1
+%bcond_with pidof
+%define somajor 3
%define libname libprocps%{somajor}
Name: procps
@@ -31,11 +32,15 @@
BuildRequires: libtool
BuildRequires: ncurses-devel
BuildRequires: pkg-config
+%if 0%{?suse_version} > 1310
+BuildRequires: pkgconfig(libsystemd-login)
+%else
%if 0%{?suse_version} > 1230
-BuildRequires: pkgconfig(systemd)
+BuildRequires: pkgconfig(libsystemd)
+%endif
%endif
BuildRequires: xz
-Version: 3.3.8
+Version: 3.3.9
Release: 0
Provides: ps = %version-%release
Obsoletes: ps < %version-%release
@@ -45,14 +50,13 @@
Summary: The ps utilities for /proc
License: GPL-2.0+ and LGPL-2.1+
Group: System/Monitoring
-Source: http://downloads.sourceforge.net/project/procps-ng/Production/procps-ng-3.3....
+Source: http://downloads.sourceforge.net/project/procps-ng/Production/procps-ng-3.3....
Source1: procps-pmap-legacy.tar.bz2
Source2: boot.sysctl
Source3: systat.xinetd
-Patch0: procps-ng-3.3.8-watch.patch
+Patch0: procps-ng-3.3.9-watch.patch
Patch1: procps-v3.3.3-ia64.diff
-Patch2: procps-v3.3.4-stealtime.patch
-Patch3: procps-v3.3.4-w-notruncate.diff
+Patch3: procps-ng-3.3.9-w-notruncate.diff
Patch4: procps-v3.3.4-w-simply-work.diff
Patch5: procps-ng-3.3.8-top.1.diff
Patch6: procps-v3.3.3-buffersize.diff
@@ -71,64 +75,39 @@
Patch19: procps-v3.3.4-large_pcpu.patch
Patch20: procps-ng-3.3.8-tinfo.dif
Patch21: procps-v3.3.3-pwdx.patch
-# PATCH-FIX-UPSTREAM -- Let libproc support EPIPE in close_stream
-Patch22: 0003-library-for-atexit-support-fix-fileutils-for-EPIPE.patch
-# PATCH-FIX-UPSTREAM -- Add enable-libselinux switch
-Patch23: procps-ng-3.3.8-libselinux.patch
# PATCH-FIX-OPENSUSE -- trifle rest of the old terabyte patch
Patch28: procps-ng-3.3.8-vmstat-terabyte.dif
-# PATCH-FIX-UPSTREAM -- Show shared memory in 'free' again
-Patch29: procps-ng-3.3.8-shmem.patch
-# PATCH-FIX-UPSTREAM -- Add enable-libselinux switch
-Patch30: 0010-ps-address-a-potential-newline-quirk-the-libselinux.patch
# PATCH-FIX-SUSE -- Ignore scan_unevictable_pages in sysctl
Patch31: procps-ng-3.3.8-ignore-scan_unevictable_pages.patch
+Patch60: 0024-sysctl-system-loads-default-config-file.patch
+Patch61: 0025-Split-help-lines-to-help-translators.patch
+Patch62: 0026-library-fixing-uninitialized-variable-pos-in-whattim.patch
+Patch63: 0027-pgrep-Fixing-memory-leak-in-do_regcomp.patch
+Patch64: 0028-sysctl-Fixing-memory-leaks-in-PreloadSystem.patch
+Patch65: 0029-ps-ignore-SIGCONT.patch
+Patch66: 0031-vmstat-wide-output-still-not-wide-enough.patch
+Patch67: 0032-library-skip-replacement-of-trailing-0-in-read_unvec.patch
+Patch68: 0033-kill-for-PID-1-restored.patch
+Patch69: 0034-Check-for-presence-of-disks-in-vmstat.patch
+Patch70: 0035-PID-2-to-9-for-kill-too.patch
+Patch71: 0036-pgrep-fails-to-show-full-command-line-with-au.patch
+Patch72: 0037-fail-on-null-string-for-arguments.patch
+Patch73: 0038-Update-help-files.patch
+Patch74: 0039-vmstat-Support-for-timestamps-with-t-fix-for-wd.patch
+Patch75: 0040-watch-Don-t-leak-extra-fds-to-the-child.patch
+Patch76: 0041-vmstat-Fixing-format-security-flaws.patch
+Patch77: 0043-Added-get-trans-target-to-Makefile.patch
+Patch78: 0045-library-properly-handle-memory-used-by-tmpfs.patch
+Patch79: 0046-Minor-i18n-fixes.patch
+Patch80: 0047-sysctl-increase-max-supported-line-length-of-the-con.patch
+Patch81: 0049-fix-url-for-rsync.patch
+Patch82: 0055-misc-fix-man-doc-spelling-and-grammar-for-translatio.patch
+Patch83: 0058-library-reverting-tmpfs-subtraction-from-cached-18-F.patch
+
# Top patches
-# PATCH-FIX-UPSTREAM -- Add the major version to dlopen of libnuma
-Patch100: 0001-top-add-the-major-version-to-dlopen-of-libnuma-sonam.patch
-# PATCH-FIX-UPSTREAM -- Use common mdoc nroff macros
-Patch101: 0002-top-trade-two-groff_mdoc-macros-for-groff-equivalent.patch
-# PATCH-FIX-UPSTREAM -- Do not clear screen after end-of-job
-Patch102: 0004-top-enable-screen-contents-preservation-at-end-of-jo.patch
-# PATCH-FIX-UPSTREAM -- Suppress end-of-job report if top if not ended with 'q' key
-Patch103: 0005-top-refine-some-miscellaneous-signals-interrupt-stuf.patch
-# PATCH-FIX-UPSTREAM -- Cursor repositioning includes line oriented input
-Patch104: 0006-top-cursor-repositioning-includes-line-oriented-inpu.patch
-# PATCH-FIX-UPSTREAM added at 2014/05/15
-Patch105: 0007-top-correct-improve-or-otherwise-tweak-some-comments.patch
-# PATCH-FIX-UPSTREAM added at 2014/05/15
-Patch106: 0008-top-tweak-cursor-state-code-to-swat-an-obscure-bugle.patch
-# PATCH-FIX-UPSTREAM added at 2014/05/15
-Patch107: 0009-top-correct-cursor-positioning-for-all-Z-or-C-cases.patch
-# PATCH-FIX-UPSTREAM added at 2014/05/15
-Patch108: 0012-top-hint-that-Summary-Area-cached-is-Mem-not-Swap.patch
-# PATCH-FIX-UPSTREAM added at 2014/05/15
-Patch109: 0013-top-modest-efficiency-change-to-message-line-handlin.patch
-# PATCH-FIX-UPSTREAM added at 2014/05/15
-Patch110: 0014-top-correct-improve-and-otherwise-tweak-configs_read.patch
-# PATCH-FIX-UPSTREAM added at 2014/05/15
-Patch111: 0015-top-swat-bug-affecting-batch-mode-and-width-provisio.patch
-# PATCH-FIX-UPSTREAM added at 2014/05/15
-Patch112: 0018-top-restore-the-lost-final-newline-when-in-Batch-mod.patch
-# PATCH-FIX-UPSTREAM added at 2014/05/15
-Patch113: 0019-top-swat-bug-impacting-idle-mode-user-filtering.patch
-# PATCH-FIX-UPSTREAM added at 2014/05/15
-Patch114: 0021-top-address-some-potential-libnuma-display-corruptio.patch
-# PATCH-FIX-UPSTREAM added at 2014/05/15
-Patch115: 0022-top-fix-miscellaneous-spelling-errors-in-man-documen.patch
-# PATCH-FIX-UPSTREAM added at 2014/05/15
-Patch116: 0023-top-expand-on-column-highlight-quirks-in-man-documen.patch
-# PATCH-FIX-UPSTREAM added at 2014/05/15
-Patch117: 0024-top-add-some-flexibility-to-dlopen-for-numa-support.patch
-# PATCH-FIX-UPSTREAM added at 2014/05/15
-Patch118: 0025-top-minimize-the-statistics-overhead-for-numa-suppor.patch
-# PATCH-FIX-UPSTREAM added at 2014/05/15
-Patch119: 0026-top-eliminate-yet-more-gcc-subscript-resolution-bloa.patch
-# PATCH-FIX-UPSTREAM added at 2014/05/15
-Patch120: 0032-top-do-not-lie-about-purported-alphabetical-ordering.patch
-# PATCH-FIX-UPSTREAM added at 2014/05/15
-Patch121: 0033-top-follow-usual-name-conventions-for-global-variabl.patch
+# PATCH-FIX-UPSTREAM added at 2014/05/16
+Patch121: 0023-top-do-not-forget-the-fscanf-s-terminating-null-byte.patch
# PATCH-FIX-UPSTREAM added at 2014/05/15
Patch122: 0035-top-provide-for-discontinuous-not-active-NUMA-nodes.patch
# PATCH-FIX-UPSTREAM added at 2014/05/15
@@ -143,6 +122,17 @@
Patch127: 0045-top-standardize-Esc-key-support-with-prompted-input.patch
# PATCH-FIX-UPSTREAM added at 2014/05/15
Patch128: 0046-top-miscellaneous-accumulated-changes-to-program-cod.patch
+# PATCH-FIX-UPSTREAM added at 2014/05/16
+Patch129: 0051-top-update-copyright-dates-plus-1-preprocessor-chang.patch
+# PATCH-FIX-UPSTREAM added at 2014/05/16
+Patch130: 0052-top-refactor-man-document-so-as-to-allow-translation.patch
+# PATCH-FIX-UPSTREAM added at 2014/05/16
+Patch131: 0053-top-minimize-the-usage-of-apostrophes-in-man-documen.patch
+# PATCH-FIX-UPSTREAM added at 2014/05/16
+Patch132: 0054-top-swap-opening-quotes-for-back-tics-in-man-documen.patch
+# PATCH-FIX-UPSTREAM added at 2014/05/16
+Patch133: 0060-top-miscellaneous-accumulated-changes-to-man-documen.patch
+
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
@@ -188,7 +178,6 @@
%setup -q -n %{name}-ng-%{version}
%patch0
%patch1
-%patch2
%patch3
%patch4
%patch5
@@ -208,34 +197,33 @@
%patch19
%patch20
%patch21
-%patch22
-%patch23 -p1
%patch28
-%patch29 -p1
-%patch30
%patch31 -p1
+%patch60
+%patch61
+%patch62
+%patch63
+%patch64
+%patch65
+%patch66
+%patch67
+%patch68
+%patch69
+%patch70
+%patch71
+%patch72
+%patch73
+%patch74
+%patch75
+%patch76
+%patch77
+%patch78
+%patch79
+%patch80
+%patch81
+%patch82
+%patch83 -b .xyz
# Patches for top
-%patch100
-%patch101
-%patch102
-%patch103
-%patch104
-%patch105
-%patch106
-%patch107
-%patch108
-%patch109
-%patch110
-%patch111
-%patch112
-%patch113
-%patch114
-%patch115
-%patch116
-%patch117
-%patch118
-%patch119
-%patch120
%patch121
%patch122
%patch123
@@ -244,6 +232,11 @@
%patch126
%patch127
%patch128
+%patch129
+%patch130
+%patch131
+%patch132
+%patch133
%build
tar --strip-components=1 -xf %{S:1}
@@ -259,6 +252,9 @@
--disable-nls \
--disable-rpath \
--disable-kill \
+%if !%{with pidof}
+ --disable-pidof \
+%endif
--enable-watch8bit \
--enable-shared \
--enable-skill \
@@ -364,6 +360,9 @@
%verify(link) %{_sbindir}/sysctl
%endif
%{_bindir}/free
+%if %{with pidof}
+%{_bindir}/pidof
+%endif
%{_bindir}/pmap
%{_bindir}/pwdx
%{_bindir}/skill
@@ -376,6 +375,9 @@
%{_bindir}/watch
%_mandir/man1/free.1.gz
%_mandir/man1/pgrep.1.gz
+%if %{with pidof}
+%_mandir/man1/pidof.1.gz
+%endif
%_mandir/man1/pkill.1.gz
%_mandir/man1/pmap.1.gz
%_mandir/man1/ps.1.gz
++++++ 0023-top-do-not-forget-the-fscanf-s-terminating-null-byte.patch ++++++
From 14ef47af57f48d1e51ab91e80fd8f132fabb665a Mon Sep 17 00:00:00 2001
From: Jim Warner
Date: Tue, 3 Dec 2013 15:00:00 -0600
Subject: [PATCH] top: do not forget the fscanf %s terminating null byte
Reference(s):
http://www.freelists.org/post/procps/procpsng-339-defects-found
Signed-off-by: Jim Warner
---
top/top.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git top/top.c top/top.c
index 4d1d912..bb15d01 100644
--- top/top.c
+++ top/top.c
@@ -3445,8 +3445,8 @@ static void configs_read (void) {
WIN_t *w = &Winstk[i];
p = fmtmk(N_fmt(RC_bad_entry_fmt), i+1, Rc_name);
- // note: "fieldscur=%__s" on next line should equal PFLAGSSIZ !
- if (2 != fscanf(fp, "%3s\tfieldscur=%80s\n"
+ // note: "fieldscur=%__s" on next line should equal (PFLAGSSIZ -1) !
+ if (2 != fscanf(fp, "%3s\tfieldscur=%79s\n"
, w->rc.winname, w->rc.fieldscur))
goto default_or_error;
#if PFLAGSSIZ > 80
--
1.7.9.2
++++++ 0024-sysctl-system-loads-default-config-file.patch ++++++
From 7f6efed9bb85d1e212e06985ea3e06720f6ca949 Mon Sep 17 00:00:00 2001
From: Craig Small
Date: Fri, 27 Dec 2013 23:08:14 +1100
Subject: [PATCH] sysctl --system loads default config file
Commit cdca71e94506fbb921ab2c626be3ad05c4287498 fixed
the loading the sysctl.conf file, but had the logic
for checking the file exists reversed incorrectly.
---
NEWS | 4 ++++
sysctl.c | 2 +-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git NEWS NEWS
index 287f867..1c710a3 100644
--- NEWS
+++ NEWS
@@ -1,3 +1,7 @@
+procps-ng-3.3.10
+----------------
+ * sysctl --system loads default config file - Debian #732920
+
procps-ng-3.3.9
---------------
* kernel namespaces support added to skill, pgrep, ps and top
diff --git sysctl.c sysctl.c
index bb3e6b7..33c9403 100644
--- sysctl.c
+++ sysctl.c
@@ -640,7 +640,7 @@ static int PreloadSystem(void)
}
- if (stat(DEFAULT_PRELOAD, &ts) < 0 && S_ISREG(ts.st_mode)) {
+ if (stat(DEFAULT_PRELOAD, &ts) < 0 || S_ISREG(ts.st_mode)) {
if (!Quiet)
printf(_("* Applying %s ...\n"), DEFAULT_PRELOAD);
rc |= Preload(DEFAULT_PRELOAD);
--
1.7.9.2
++++++ 0025-Split-help-lines-to-help-translators.patch ++++++
From 8a38cd5eb449c47450e31aa093635e8cfaaf2f73 Mon Sep 17 00:00:00 2001
From: Craig Small
Date: Sat, 28 Dec 2013 09:25:39 +1100
Subject: [PATCH] Split help lines to help translators
To assist translators, the help lines are split so that each translation
chunk has one option. This gives bonus of if we add or change an option,
only that option remains untranslated rather than the entire help block.
Reference:
http://www.freelists.org/post/procps/procpsng-for-Translation-Project,1
Signed-off-by: Craig Small
---
pidof.c | 8 ++--
pmap.c | 26 ++++++------
ps/help.c | 131 +++++++++++++++++++++++++++++--------------------------------
skill.c | 42 ++++++++++----------
slabtop.c | 28 ++++++-------
watch.c | 20 +++++-----
6 files changed, 125 insertions(+), 130 deletions(-)
diff --git pidof.c pidof.c
index 2e0911d..6a38675 100644
--- pidof.c
+++ pidof.c
@@ -60,10 +60,10 @@ static int __attribute__ ((__noreturn__)) usage(int opt)
fputs(USAGE_HEADER, fp);
fprintf(fp, _(" %s [options] [program [...]]\n"), program_invocation_short_name);
fputs(USAGE_OPTIONS, fp);
- fputs(_(" -s, --single-shot return one PID only\n"
- " -c, --check-root omit processes with different root\n"
- " -x scripts too\n"
- " -o, --omit-pid omit processes with PID\n"), fp);
+ fputs(_(" -s, --single-shot return one PID only\n"), fp);
+ fputs(_(" -c, --check-root omit processes with different root\n"), fp);
+ fputs(_(" -x scripts too\n"), fp);
+ fputs(_(" -o, --omit-pid omit processes with PID\n"), fp);
fputs(USAGE_SEPARATOR, fp);
fputs(USAGE_HELP, fp);
fputs(USAGE_VERSION, fp);
diff --git pmap.c pmap.c
index 8f111a0..4ecabce 100644
--- pmap.c
+++ pmap.c
@@ -108,19 +108,19 @@ usage(FILE * out)
fprintf(out,
_(" %s [options] pid [pid ...]\n"), program_invocation_short_name);
fputs(USAGE_OPTIONS, out);
- fputs(_(" -x, --extended show details\n"
- " -X show even more details\n"
- " WARNING: format changes according to /proc/PID/smaps\n"
- " -XX show everything the kernel provides\n"
- " -c, --read-rc read the default rc\n"
- " -C, --read-rc-from=<file> read the rc from file\n"
- " -n, --create-rc create new default rc\n"
- " -N, --create-rc-to=<file> create new rc to file\n"
- " NOTE: pid arguments are not allowed with -n, -N\n"
- " -d, --device show the device format\n"
- " -q, --quiet do not display header and footer\n"
- " -p, --show-path show path in the mapping\n"
- " -A, --range=<low>[,<high>] limit results to the given range\n"), out);
+ fputs(_(" -x, --extended show details\n"), out);
+ fputs(_(" -X show even more details\n"), out);
+ fputs(_(" WARNING: format changes according to /proc/PID/smaps\n"), out);
+ fputs(_(" -XX show everything the kernel provides\n"), out);
+ fputs(_(" -c, --read-rc read the default rc\n"), out);
+ fputs(_(" -C, --read-rc-from=<file> read the rc from file\n"), out);
+ fputs(_(" -n, --create-rc create new default rc\n"), out);
+ fputs(_(" -N, --create-rc-to=<file> create new rc to file\n"), out);
+ fputs(_(" NOTE: pid arguments are not allowed with -n, -N\n"), out);
+ fputs(_(" -d, --device show the device format\n"), out);
+ fputs(_(" -q, --quiet do not display header and footer\n"), out);
+ fputs(_(" -p, --show-path show path in the mapping\n"), out);
+ fputs(_(" -A, --range=<low>[,<high>] limit results to the given range\n"), out);
fputs(USAGE_SEPARATOR, out);
fputs(USAGE_HELP, out);
fputs(USAGE_VERSION, out);
diff --git ps/help.c ps/help.c
index b536f1a..9133903 100644
--- ps/help.c
+++ ps/help.c
@@ -96,85 +96,80 @@ void do_help (const char *opt, int rc) {
" %s [options]\n"), myname);
if (section == HELP_SMP || section == HELP_ALL) {
- fprintf(out, _("\n"
- "Basic options:\n"
- " -A, -e all processes\n"
- " -a all with tty, except session leaders\n"
- " a all with tty, including other users\n"
- " -d all except session leaders\n"
- " -N, --deselect negate selection\n"
- " r only running processes\n"
- " T all processes on this terminal\n"
- " x processes without controlling ttys\n"));
+ fputs(_("\nBasic options:\n"), out);
+ fputs(_(" -A, -e all processes\n"), out);
+ fputs(_(" -a all with tty, except session leaders\n"), out);
+ fputs(_(" a all with tty, including other users\n"), out);
+ fputs(_(" -d all except session leaders\n"), out);
+ fputs(_(" -N, --deselect negate selection\n"), out);
+ fputs(_(" r only running processes\n"), out);
+ fputs(_(" T all processes on this terminal\n"), out);
+ fputs(_(" x processes without controlling ttys\n"), out);
}
if (section == HELP_LST || section == HELP_ALL) {
- fprintf(out, _("\n"
- "Selection by list:\n"
- " -C <command> command name\n"
- " -G, --Group <gid> real group id or name\n"
- " -g, --group <group> session or effective group name\n"
- " -p, --pid <pid> process id\n"
- " --ppid <pid> select by parent process id\n"
- " -s, --sid <session> session id\n"
- " -t, t, --tty <tty> terminal\n"
- " -u, U, --user <uid> effective user id or name\n"
- " -U, --User <uid> real user id or name\n"
- "\n"
+ fputs(_("\nSelection by list:\n"), out);
+ fputs(_(" -C <command> command name\n"), out);
+ fputs(_(" -G, --Group <gid> real group id or name\n"), out);
+ fputs(_(" -g, --group <group> session or effective group name\n"), out);
+ fputs(_(" -p, --pid <pid> process id\n"), out);
+ fputs(_(" --ppid <pid> select by parent process id\n"), out);
+ fputs(_(" -s, --sid <session> session id\n"), out);
+ fputs(_(" -t, t, --tty <tty> terminal\n"), out);
+ fputs(_(" -u, U, --user <uid> effective user id or name\n"), out);
+ fputs(_(" -U, --User <uid> real user id or name\n"), out);
+ fputs(_("\n"
" selection <arguments> take either:\n"
" comma-separated list e.g. '-u root,nobody' or\n"
- " blank-separated list e.g. '-p 123 4567'\n"));
+ " blank-separated list e.g. '-p 123 4567'\n"), out);
}
if (section == HELP_OUT || section == HELP_ALL) {
- fprintf(out, _("\n"
- "Output formats:\n"
- " -F extra full\n"
- " -f full-format, including command lines\n"
- " f, --forest ascii art process tree\n"
- " -H show process hierarchy\n"
- " -j jobs format\n"
- " j BSD job control format\n"
- " -l long format\n"
- " l BSD long format\n"
- " -M, Z add security data (for SELinux)\n"
- " -O <format> preloaded with default columns\n"
- " O <format> as -O, with BSD personality\n"
- " -o, o, --format <format>\n"
- " user defined format\n"
- " s signal format\n"
- " u user-oriented format\n"
- " v virtual memory format\n"
- " X register format\n"
- " -y do not show flags, show rrs vs. addr (used with -l)\n"
- " --context display security context (for SELinux)\n"
- " --headers repeat header lines, one per page\n"
- " --no-headers do not print header at all\n"
- " --cols, --columns, --width <num>\n"
- " set screen width\n"
- " --rows, --lines <num>\n"
- " set screen height\n"));
+ fputs(_("\nOutput formats:\n"), out);
+ fputs(_(" -F extra full\n"), out);
+ fputs(_(" -f full-format, including command lines\n"), out);
+ fputs(_(" f, --forest ascii art process tree\n"), out);
+ fputs(_(" -H show process hierarchy\n"), out);
+ fputs(_(" -j jobs format\n"), out);
+ fputs(_(" j BSD job control format\n"), out);
+ fputs(_(" -l long format\n"), out);
+ fputs(_(" l BSD long format\n"), out);
+ fputs(_(" -M, Z add security data (for SELinux)\n"), out);
+ fputs(_(" -O <format> preloaded with default columns\n"), out);
+ fputs(_(" O <format> as -O, with BSD personality\n"), out);
+ fputs(_(" -o, o, --format <format>\n"
+ " user defined format\n"), out);
+ fputs(_(" s signal format\n"), out);
+ fputs(_(" u user-oriented format\n"), out);
+ fputs(_(" v virtual memory format\n"), out);
+ fputs(_(" X register format\n"), out);
+ fputs(_(" -y do not show flags, show rrs vs. addr (used with -l)\n"), out);
+ fputs(_(" --context display security context (for SELinux)\n"), out);
+ fputs(_(" --headers repeat header lines, one per page\n"), out);
+ fputs(_(" --no-headers do not print header at all\n"), out);
+ fputs(_(" --cols, --columns, --width <num>\n"
+ " set screen width\n"), out);
+ fputs(_(" --rows, --lines <num>\n"
+ " set screen height\n"), out);
}
if (section == HELP_THD || section == HELP_ALL) {
- fprintf(out, _("\n"
- "Show threads:\n"
- " H as if they where processes\n"
- " -L possibly with LWP and NLWP columns\n"
- " -m, m after processes\n"
- " -T possibly with SPID column\n"));
+ fputs(_("\nShow threads:\n"), out);
+ fputs(_(" H as if they where processes\n"), out);
+ fputs(_(" -L possibly with LWP and NLWP columns\n"), out);
+ fputs(_(" -m, m after processes\n"), out);
+ fputs(_(" -T possibly with SPID column\n"), out);
}
if (section == HELP_MSC || section == HELP_ALL) {
+ fputs(_("\nMiscellaneous options:\n"), out);
+ fputs(_(" -c show scheduling class with -l option\n"), out);
+ fputs(_(" c show true command name\n"), out);
+ fputs(_(" e show the environment after command\n"), out);
+ fputs(_(" k, --sort specify sort order as: [+|-]key[,[+|-]key[,...]]\n"), out);
+ fputs(_(" L list format specifiers\n"), out);
+ fputs(_(" n display numeric uid and wchan\n"), out);
+ fputs(_(" S, --cumulative include some dead child process data\n"), out);
+ fputs(_(" -y do not show flags, show rss (only with -l)\n"), out);
+ fputs(_(" -V, V, --version display version information and exit\n"), out);
+ fputs(_(" -w, w unlimited output width\n"), out);
fprintf(out, _("\n"
- "Miscellaneous options:\n"
- " -c show scheduling class with -l option\n"
- " c show true command name\n"
- " e show the environment after command\n"
- " k, --sort specify sort order as: [+|-]key[,[+|-]key[,...]]\n"
- " L list format specifiers\n"
- " n display numeric uid and wchan\n"
- " S, --cumulative include some dead child process data\n"
- " -y do not show flags, show rss (only with -l)\n"
- " -V, V, --version display version information and exit\n"
- " -w, w unlimited output width\n"
- "\n"
" --%s <%s|%s|%s|%s|%s|%s>\n"
" display help and exit\n")
, the_word_help
diff --git skill.c skill.c
index 01b29cb..5c8192a 100644
--- skill.c
+++ skill.c
@@ -324,11 +324,11 @@ static void __attribute__ ((__noreturn__)) kill_usage(FILE * out)
fprintf(out,
_(" %s [options] <pid> [...]\n"), program_invocation_short_name);
fputs(USAGE_OPTIONS, out);
- fputs(_(" <pid> [...] send signal to every <pid> listed\n"
- " -<signal>, -s, --signal <signal>\n"
- " specify the <signal> to be sent\n"
- " -l, --list=[<signal>] list all signal names, or convert one to a name\n"
- " -L, --table list all signal names in a nice table\n"), out);
+ fputs(_(" <pid> [...] send signal to every <pid> listed\n"), out);
+ fputs(_(" -<signal>, -s, --signal <signal>\n"
+ " specify the <signal> to be sent\n"), out);
+ fputs(_(" -l, --list=[<signal>] list all signal names, or convert one to a name\n"), out);
+ fputs(_(" -L, --table list all signal names in a nice table\n"), out);
fputs(USAGE_SEPARATOR, out);
fputs(USAGE_HELP, out);
fputs(USAGE_VERSION, out);
@@ -351,25 +351,25 @@ static void __attribute__ ((__noreturn__)) skillsnice_usage(FILE * out)
program_invocation_short_name);
}
fputs(USAGE_OPTIONS, out);
- fputs(_(" -f, --fast fast mode (not implemented)\n"
- " -i, --interactive interactive\n"
- " -l, --list list all signal names\n"
- " -L, --table list all signal names in a nice table\n"
- " -n, --no-action no action\n"
- " -v, --verbose explain what is being done\n"
- " -w, --warnings enable warnings (not implemented)\n"), out);
+ fputs(_(" -f, --fast fast mode (not implemented)\n"), out);
+ fputs(_(" -i, --interactive interactive\n"), out);
+ fputs(_(" -l, --list list all signal names\n"), out);
+ fputs(_(" -L, --table list all signal names in a nice table\n"), out);
+ fputs(_(" -n, --no-action no action\n"), out);
+ fputs(_(" -v, --verbose explain what is being done\n"), out);
+ fputs(_(" -w, --warnings enable warnings (not implemented)\n"), out);
fputs(USAGE_SEPARATOR, out);
fputs(_("Expression can be: terminal, user, pid, command.\n"
- "The options below may be used to ensure correct interpretation.\n"
- " -c, --command <command> expression is a command name\n"
- " -p, --pid <pid> expression is a process id number\n"
- " -t, --tty <tty> expression is a terminal\n"
- " -u, --user <username> expression is a username\n"), out);
+ "The options below may be used to ensure correct interpretation.\n"), out);
+ fputs(_(" -c, --command <command> expression is a command name\n"), out);
+ fputs(_(" -p, --pid <pid> expression is a process id number\n"), out);
+ fputs(_(" -t, --tty <tty> expression is a terminal\n"), out);
+ fputs(_(" -u, --user <username> expression is a username\n"), out);
fputs(USAGE_SEPARATOR, out);
- fputs(_("Alternatively, expression can be:\n"
- " --ns <pid> match the processes that belong to the same\n"
- " namespace as <pid>\n"
- " --nslist list which namespaces will be considered for\n"
+ fputs(_("Alternatively, expression can be:\n"), out);
+ fputs(_(" --ns <pid> match the processes that belong to the same\n"
+ " namespace as <pid>\n"), out);
+ fputs(_(" --nslist list which namespaces will be considered for\n"
" the --ns option.\n"
" Available namespaces: ipc, mnt, net, pid, user, uts\n"), out);
diff --git slabtop.c slabtop.c
index dc89c4d..c135ec5 100644
--- slabtop.c
+++ slabtop.c
@@ -188,24 +188,24 @@ static void __attribute__((__noreturn__)) usage(FILE *out)
fputs(USAGE_HEADER, out);
fprintf(out, _(" %s [options]\n"), program_invocation_short_name);
fputs(USAGE_OPTIONS, out);
- fputs(_(" -d, --delay <secs> delay updates\n"
- " -o, --once only display once, then exit\n"
- " -s, --sort <char> specify sort criteria by character (see below)\n"), out);
+ fputs(_(" -d, --delay <secs> delay updates\n"), out);
+ fputs(_(" -o, --once only display once, then exit\n"), out);
+ fputs(_(" -s, --sort <char> specify sort criteria by character (see below)\n"), out);
fputs(USAGE_SEPARATOR, out);
fputs(USAGE_HELP, out);
fputs(USAGE_VERSION, out);
- fputs(_("\nThe following are valid sort criteria:\n"
- " a: sort by number of active objects\n"
- " b: sort by objects per slab\n"
- " c: sort by cache size\n"
- " l: sort by number of slabs\n"
- " v: sort by number of active slabs\n"
- " n: sort by name\n"
- " o: sort by number of objects (the default)\n"
- " p: sort by pages per slab\n"
- " s: sort by object size\n"
- " u: sort by cache utilization\n"), out);
+ fputs(_("\nThe following are valid sort criteria:\n"), out);
+ fputs(_(" a: sort by number of active objects\n"), out);
+ fputs(_(" b: sort by objects per slab\n"), out);
+ fputs(_(" c: sort by cache size\n"), out);
+ fputs(_(" l: sort by number of slabs\n"), out);
+ fputs(_(" v: sort by number of active slabs\n"), out);
+ fputs(_(" n: sort by name\n"), out);
+ fputs(_(" o: sort by number of objects (the default)\n"), out);
+ fputs(_(" p: sort by pages per slab\n"), out);
+ fputs(_(" s: sort by object size\n"), out);
+ fputs(_(" u: sort by cache utilization\n"), out);
fprintf(out, USAGE_MAN_TAIL("slabtop(1)"));
exit(out == stderr ? EXIT_FAILURE : EXIT_SUCCESS);
diff --git watch.c watch.c
index 436d213..032dfb7 100644
--- watch.c
+++ watch.c
@@ -88,16 +88,16 @@ static void __attribute__ ((__noreturn__))
fprintf(out,
_(" %s [options] command\n"), program_invocation_short_name);
fputs(USAGE_OPTIONS, out);
- fputs(_(" -b, --beep beep if command has a non-zero exit\n"
- " -c, --color interpret ANSI color sequences\n"
- " -d, --differences[=<permanent>]\n"
- " highlight changes between updates\n"
- " -e, --errexit exit if command has a non-zero exit\n"
- " -g, --chgexit exit when output from command changes\n"
- " -n, --interval <secs> seconds to wait between updates\n"
- " -p, --precise attempt run command in precise intervals\n"
- " -t, --no-title turn off header\n"
- " -x, --exec pass command to exec instead of \"sh -c\"\n"), out);
+ fputs(_(" -b, --beep beep if command has a non-zero exit\n"), out);
+ fputs(_(" -c, --color interpret ANSI color sequences\n"), out);
+ fputs(_(" -d, --differences[=<permanent>]\n"
+ " highlight changes between updates\n"), out);
+ fputs(_(" -e, --errexit exit if command has a non-zero exit\n"), out);
+ fputs(_(" -g, --chgexit exit when output from command changes\n"), out);
+ fputs(_(" -n, --interval <secs> seconds to wait between updates\n"), out);
+ fputs(_(" -p, --precise attempt run command in precise intervals\n"), out);
+ fputs(_(" -t, --no-title turn off header\n"), out);
+ fputs(_(" -x, --exec pass command to exec instead of \"sh -c\"\n"), out);
fputs(USAGE_SEPARATOR, out);
fputs(USAGE_HELP, out);
fputs(_(" -v, --version output version information and exit\n"), out);
--
1.7.9.2
++++++ 0026-library-fixing-uninitialized-variable-pos-in-whattim.patch ++++++
From 38cbeedeb7dc94c95482343e547addc1748344b0 Mon Sep 17 00:00:00 2001
From: Jaromir Capik
Date: Thu, 2 Jan 2014 18:21:31 +0100
Subject: [PATCH] library: fixing uninitialized variable 'pos' in whattime.c
---
proc/whattime.c | 2 ++
1 file changed, 2 insertions(+)
diff --git proc/whattime.c proc/whattime.c
index 9d6abb3..eb345fb 100644
--- proc/whattime.c
+++ proc/whattime.c
@@ -58,6 +58,8 @@ char *sprint_uptime(int human_readable) {
realtime = localtime(&realseconds);
pos = sprintf(buf, " %02d:%02d:%02d ",
realtime->tm_hour, realtime->tm_min, realtime->tm_sec);
+ } else {
+ pos = 0;
}
/* read and calculate the amount of uptime */
--
1.7.9.2
++++++ 0027-pgrep-Fixing-memory-leak-in-do_regcomp.patch ++++++
From 69de8db3e27b63fdcd8e3dce4d63e725d80bf05b Mon Sep 17 00:00:00 2001
From: Jaromir Capik
Date: Thu, 2 Jan 2014 18:39:27 +0100
Subject: [PATCH] pgrep: Fixing memory leak in do_regcomp()
---
pgrep.c | 3 +++
1 file changed, 3 insertions(+)
diff --git pgrep.c pgrep.c
index 6290ec5..93a7c89 100644
--- pgrep.c
+++ pgrep.c
@@ -460,6 +460,9 @@ static regex_t * do_regcomp (void)
}
re_err = regcomp (preg, re, REG_EXTENDED | REG_NOSUB | opt_case);
+
+ if (opt_exact) free(re);
+
if (re_err) {
regerror (re_err, preg, errbuf, sizeof(errbuf));
fputs(errbuf,stderr);
--
1.7.9.2
++++++ 0028-sysctl-Fixing-memory-leaks-in-PreloadSystem.patch ++++++
From 8622b582da06fb93a8f06d302215269835fca9a9 Mon Sep 17 00:00:00 2001
From: Jaromir Capik
Date: Thu, 2 Jan 2014 19:49:36 +0100
Subject: [PATCH] sysctl: Fixing memory leaks in PreloadSystem()
---
sysctl.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git sysctl.c sysctl.c
index 33c9403..51af15d 100644
--- sysctl.c
+++ sysctl.c
@@ -645,6 +645,13 @@ static int PreloadSystem(void)
printf(_("* Applying %s ...\n"), DEFAULT_PRELOAD);
rc |= Preload(DEFAULT_PRELOAD);
}
+
+ /* cleaning */
+ for (i = 0; i < ncfgs; ++i) {
+ free(cfgs[i]);
+ }
+ if (cfgs) free(cfgs);
+
return rc;
}
--
1.7.9.2
++++++ 0029-ps-ignore-SIGCONT.patch ++++++
From d06aaaaf2bd8f3b5f0235e75f4f04c0ad69c7d6d Mon Sep 17 00:00:00 2001
From: Craig Small
Date: Tue, 14 Jan 2014 22:23:58 +1100
Subject: [PATCH] ps: ignore SIGCONT
SIGCONT is a continue signal. It seems that some zsh setups can send
this signal, causing ps to abort. This is not what "continue" means.
This change just uses the default handler which will continue a stopped
process.
References:
http://bugs.debian.org/732410
http://www.zsh.org/cgi-bin/mla/redirect?WORKERNUMBER=32251
Signed-off-by: Craig Small
---
NEWS | 1 +
ps/display.c | 1 +
2 files changed, 2 insertions(+)
diff --git NEWS NEWS
index 1c710a3..a2afaa3 100644
--- NEWS
+++ NEWS
@@ -1,6 +1,7 @@
procps-ng-3.3.10
----------------
* sysctl --system loads default config file - Debian #732920
+ * ps doesn't exit on SIGCONT
procps-ng-3.3.9
---------------
diff --git ps/display.c ps/display.c
index c20285d..693154b 100644
--- ps/display.c
+++ ps/display.c
@@ -563,6 +563,7 @@ int main(int argc, char *argv[]){
default:
sigaction(i,&sa,NULL);
case 0:
+ case SIGCONT:
case SIGINT: /* ^C */
case SIGTSTP: /* ^Z */
case SIGTTOU: /* see stty(1) man page */
--
1.7.9.2
++++++ 0031-vmstat-wide-output-still-not-wide-enough.patch ++++++
From 1baf31be9bbfd6fb82629176e595d2d2cef85ef3 Mon Sep 17 00:00:00 2001
From: Jaromir Capik
Date: Mon, 20 Jan 2014 19:59:39 +0100
Subject: [PATCH] vmstat: wide output still not wide enough?
8 digits per memory column is apparently still too low
for systems with 128TB of RAM. Anyway, setting the limit
to 999TB (12 digits) must be sufficient for now as it
produces wide gaps on "regular" computers.
This commit also increases the number of digits per cpu
columns from 2 to 3 as some of them can hit the 100%
maximum in corner cases.
---
vmstat.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git vmstat.c vmstat.c
index 67515c1..c01351d 100644
--- vmstat.c
+++ vmstat.c
@@ -187,12 +187,12 @@ static void new_header(void)
const char header[] =
"procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----\n";
const char wide_header[] =
- "procs ---------------memory-------------- ---swap-- -----io---- -system-- ------cpu-----\n";
+ "procs -----------------------memory---------------------- ---swap-- -----io---- -system-- --------cpu--------\n";
const char format[] =
"%2s %2s %6s %6s %6s %6s %4s %4s %5s %5s %4s %4s %2s %2s %2s %2s %2s\n";
const char wide_format[] =
- "%2s %2s %8s %8s %8s %8s %4s %4s %5s %5s %4s %4s %2s %2s %2s %2s %2s\n";
+ "%2s %2s %12s %12s %12s %12s %4s %4s %5s %5s %4s %4s %3s %3s %3s %3s %3s\n";
printf(w_option ? _(wide_header) : _(header));
printf(
@@ -249,7 +249,7 @@ static void new_format(void)
const char format[] =
"%2u %2u %6lu %6lu %6lu %6lu %4u %4u %5u %5u %4u %4u %2u %2u %2u %2u %2u\n";
const char wide_format[] =
- "%2u %2u %8lu %8lu %8lu %8lu %4u %4u %5u %5u %4u %4u %2u %2u %2u %2u %2u\n";
+ "%2u %2u %12lu %12lu %12lu %12lu %4u %4u %5u %5u %4u %4u %3u %3u %3u %3u %3u\n";
unsigned int tog = 0; /* toggle switch for cleaner code */
unsigned int i;
--
1.7.9.2
++++++ 0032-library-skip-replacement-of-trailing-0-in-read_unvec.patch ++++++
From ae9676a337e38526b994d189444f3fd02ab800ad Mon Sep 17 00:00:00 2001
From: Jaromir Capik
Date: Fri, 24 Jan 2014 18:07:34 +0100
Subject: [PATCH] library: skip replacement of trailing '\0' in
read_unvectored()
Under some circumstances the ksh shell doesn't fork new processes
when executing scripts and the script is interpreted by the
parent process. That makes the execution faster, but it means
ksh needs to reuse the /proc/PID/cmdline for the new script name
and arguments while the file length needs to stay untouched.
The fork is skipped only when the new cmdline is shorter than
the parent's cmdline and the rest of the file is filled
with '\0'. This is perfectly ok until we try to read the cmdline
of such process. As the read_unvectored() function replaces
all zeros with chosen separator, these trailing zeros are replaced
with spaces in case of the ps tool. Consequently it appends
multiple spaces at the end of the arguments string even when these
zeros do not represent any separators and therefore shouldn't
be replaced.
With this commit the read_unvectored() function skips the
replacement of trailing zeros and separates valid content only.
Reference: https://bugzilla.redhat.com/show_bug.cgi?id=1057600
---
proc/readproc.c | 1 +
1 file changed, 1 insertion(+)
diff --git proc/readproc.c proc/readproc.c
index 286e173..46dfa10 100644
--- proc/readproc.c
+++ proc/readproc.c
@@ -686,6 +686,7 @@ static int read_unvectored(char *restrict const dst, unsigned sz, const char* wh
close(fd);
if(n){
int i=n;
+ while(i && dst[i-1]=='\0') --i; // skip trailing zeroes
while(i--)
if(dst[i]=='\n' || dst[i]=='\0') dst[i]=sep;
if(dst[n-1]==' ') dst[n-1]='\0';
--
1.7.9.2
++++++ 0033-kill-for-PID-1-restored.patch ++++++
From 4359cf069819d9fb53493933e00d9af5c37bced5 Mon Sep 17 00:00:00 2001
From: Craig Small
Date: Tue, 28 Jan 2014 22:35:26 +1100
Subject: [PATCH] kill for PID -1 restored
Both the man page and the shell builtin kill mention you can
use PID -1, which means nuke everything you can get at.
Alas this "fun" option was missing and the only way to get
around it was with "kill -HUP -- -1".
This small change means kill -HUP -1 is back for all those
destructive types. The error was introduced when the argument
parser was fixed for other problems.
Thanks to Mike for pointing this out.
Signed-off-by: Craig Small
---
skill.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git skill.c skill.c
index 5c8192a..1c99985 100644
--- skill.c
+++ skill.c
@@ -477,6 +477,12 @@ static void __attribute__ ((__noreturn__))
display_kill_version();
exit(EXIT_SUCCESS);
case '?':
+ /* Special case is -1 which means all except init */
+ if (optopt == '1') {
+ if (kill(-1, signo) != 0)
+ exitvalue = EXIT_FAILURE;
+ exit(exitvalue);
+ }
if (!isdigit(optopt)) {
xwarnx(_("invalid argument %c"), optopt);
kill_usage(stderr);
--
1.7.9.2
++++++ 0034-Check-for-presence-of-disks-in-vmstat.patch ++++++
From 5a34ff0a99a3c5e7ba4f7982d5de3d0dcc9e3045 Mon Sep 17 00:00:00 2001
From: Craig Small
Date: Wed, 29 Jan 2014 22:22:11 +1100
Subject: [PATCH] Check for presence of disks in vmstat
vmstat -d or vmstat -p would crash mysteriously under different
circumstances. The problem was eventually tracked down to /sys not
being mounted which meant is_disk() always returned false.
The partition would then be attempted to be linked to a non-existent
disk causing a segfault.
vmstat will now not link to a disk if none exists.
The change in testing will skip those tests when /sys/block doesn't
exist.
Many thanks to Daniel Schepler for his analysis and suggestions.
Bug-Debian: http://bugs.debian.org/736628
---
proc/sysinfo.c | 7 +++++--
testsuite/vmstat.test/vmstat.exp | 22 +++++++++++++++-------
2 files changed, 20 insertions(+), 9 deletions(-)
diff --git proc/sysinfo.c proc/sysinfo.c
index f318376..1680cc4 100644
--- proc/sysinfo.c
+++ proc/sysinfo.c
@@ -938,8 +938,11 @@ unsigned int getdiskstat(struct disk_stat **disks, struct partition_stat **parti
&(*partitions)[cPartition].writes,
&(*partitions)[cPartition].requested_writes
);
- (*partitions)[cPartition++].parent_disk = cDisk-1;
- (*disks)[cDisk-1].partitions++;
+
+ if (cDisk > 0) {
+ (*partitions)[cPartition++].parent_disk = cDisk-1;
+ (*disks)[cDisk-1].partitions++;
+ }
}
}
diff --git testsuite/vmstat.test/vmstat.exp testsuite/vmstat.test/vmstat.exp
index fb5de14..f470afc 100644
--- testsuite/vmstat.test/vmstat.exp
+++ testsuite/vmstat.test/vmstat.exp
@@ -26,15 +26,23 @@ expect_pass "$test" "^Cache\\s+Num\\s+Total\\s+Size\\s+Pages\\s+\(\[\(\)A-Za-z0-
}
set test "vmstat disk information (-d option)"
-spawn $vmstat -d
-expect_pass "$test" "^disk\[ -\]+reads\[ -\]+writes\[ -\]+IO\[ -\]+\\s+total\\s+merged\\s+sectors\\s+ms\\s+total\\s+merged\\s+sectors\\s+ms\\s+cur\\s+sec\\s+"
+if { [ file readable "/sys/block" ] == 0 } {
+ unsupported "$test /sys/block not readable"
+} else {
+ spawn $vmstat -d
+ expect_pass "$test" "^disk\[ -\]+reads\[ -\]+writes\[ -\]+IO\[ -\]+\\s+total\\s+merged\\s+sectors\\s+ms\\s+total\\s+merged\\s+sectors\\s+ms\\s+cur\\s+sec\\s+"
+}
# Need a partition
set diskstats [ exec cat /proc/diskstats ]
-if [ regexp "\\s+\\d+\\s+\\d+\\s+\(\[a-z\]+\\d+\)\\s+\[0-9\]\[0-9\]+" $diskstats line partition == 1 ] {
- set test "vmstat partition (using $partition)"
- spawn $vmstat -p $partition
- expect_pass "$test" "^${partition}\\s+reads"
+if { [ file readable "/sys/block" ] == 0 } {
+ unsupported "vmstat partition /sys/block not readable"
} else {
- unsupported "vmstat partition (cannot find partition)"
+ if [ regexp "\\s+\\d+\\s+\\d+\\s+\(\[a-z\]+\\d+\)\\s+\[0-9\]\[0-9\]+" $diskstats line partition == 1 ] {
+ set test "vmstat partition (using $partition)"
+ spawn $vmstat -p $partition
+ expect_pass "$test" "^${partition}\\s+reads"
+ } else {
+ unsupported "vmstat partition (cannot find partition)"
+ }
}
--
1.7.9.2
++++++ 0035-PID-2-to-9-for-kill-too.patch ++++++
From 39210a89debaff023fa97250bee63c57fe9dfcfb Mon Sep 17 00:00:00 2001
From: Craig Small
Date: Wed, 29 Jan 2014 22:28:02 +1100
Subject: [PATCH] PID -2 to -9 for kill too
Commit 4359cf069819d9fb53493933e00d9af5c37bced5 restored kill's ability
to kill PID -1. This however left PIDs -2 to -9 (or rather process
groups 2 to 9) still having this problem. The check is now generically
looking for a digit and parses it correctly.
---
skill.c | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git skill.c skill.c
index 1c99985..60ed274 100644
--- skill.c
+++ skill.c
@@ -195,7 +195,8 @@ static void check_proc(int pid, struct run_time_conf_t *run_time)
if (i == -1)
goto closure;
}
- read(fd, buf, 128);
+ if (read(fd, buf, 128) <= 0)
+ goto closure;
buf[127] = '\0';
tmp = strrchr(buf, ')');
*tmp++ = '\0';
@@ -477,15 +478,16 @@ static void __attribute__ ((__noreturn__))
display_kill_version();
exit(EXIT_SUCCESS);
case '?':
- /* Special case is -1 which means all except init */
- if (optopt == '1') {
- if (kill(-1, signo) != 0)
- exitvalue = EXIT_FAILURE;
- exit(exitvalue);
- }
if (!isdigit(optopt)) {
xwarnx(_("invalid argument %c"), optopt);
kill_usage(stderr);
+ } else {
+ /* Special case for signal digit negative
+ * PIDs */
+ pid = (long)('0' - optopt);
+ if (kill((pid_t)pid, signo) != 0)
+ exitvalue = EXIT_FAILURE;
+ exit(exitvalue);
}
loop=0;
break;
--
1.7.9.2
++++++ 0035-top-provide-for-discontinuous-not-active-NUMA-nodes.patch ++++++
--- /var/tmp/diff_new_pack.rjAhlH/_old 2014-05-27 07:09:03.000000000 +0200
+++ /var/tmp/diff_new_pack.rjAhlH/_new 2014-05-27 07:09:03.000000000 +0200
@@ -81,13 +81,13 @@
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 = &smpcpu[1 + smp_num_cpus + i];
if (!isROOM(anyFLG, 1)) break;
+#ifndef OFF_NUMASKIP
+ if (nod_ptr->id) {
+#endif
snprintf(tmp, sizeof(tmp), N_fmt(NUMA_nodenam_fmt), i);
-- summary_hlp(&smpcpu[1 + smp_num_cpus() + i], tmp);
+- summary_hlp(&smpcpu[1 + smp_num_cpus + i], tmp);
+ summary_hlp(nod_ptr, tmp);
Msg_row += 1;
+#ifndef OFF_NUMASKIP
++++++ 0036-pgrep-fails-to-show-full-command-line-with-au.patch ++++++
From 6f1c04259d979ff04d129f235c950e48e94c7e76 Mon Sep 17 00:00:00 2001
From: Elliott Forney
Date: Thu, 30 Jan 2014 21:36:26 +1100
Subject: [PATCH] pgrep fails to show full command line with -au
pgrep does not show the full command line when the -a and -u flags are
combined. The -a flag is ignored when the -u flag is used as well.
In addition, the supplied patch by Elliot did not fix the problem
when invert flag ( -v ) was used; a very small tweak to the patch
fixed this problem as well. This problem existed before.
Signed-off-by: Craig Small
---
pgrep.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git pgrep.c pgrep.c
index 93a7c89..2a0ee19 100644
--- pgrep.c
+++ pgrep.c
@@ -417,7 +417,7 @@ static PROCTAB *do_openproc (void)
PROCTAB *ptp;
int flags = 0;
- if (opt_pattern || opt_full)
+ if (opt_pattern || opt_full || opt_longlong)
flags |= PROC_FILLCOM;
if (opt_ruid || opt_rgid)
flags |= PROC_FILLSTATUS;
@@ -538,7 +538,7 @@ static struct el * select_procs (int *num)
match = match_strlist (tty, opt_term);
}
}
- if (task.cmdline && (opt_longlong || opt_full) && match && opt_pattern) {
+ if (task.cmdline && (opt_longlong || opt_full) ) {
int i = 0;
int bytes = sizeof (cmdline) - 1;
--
1.7.9.2
++++++ 0037-fail-on-null-string-for-arguments.patch ++++++
From c304ffa994c2beacf3eabf9986a67d2065b60cc4 Mon Sep 17 00:00:00 2001
From: Ryan Cox
Date: Mon, 28 Oct 2013 21:05:35 -0600
Subject: [PATCH] fail on null string for arguments
---
pgrep.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git pgrep.c pgrep.c
index 6290ec5..38c380b 100644
--- pgrep.c
+++ pgrep.c
@@ -142,13 +142,19 @@ static int __attribute__ ((__noreturn__)) usage(int opt)
static struct el *split_list (const char *restrict str, int (*convert)(const char *, struct el *))
{
- char *copy = xstrdup (str);
- char *ptr = copy;
+ char *copy;
+ char *ptr;
char *sep_pos;
int i = 0;
int size = 0;
struct el *list = NULL;
+ if (str[0] == '\0')
+ return NULL;
+
+ copy = xstrdup (str);
+ ptr = copy;
+
do {
if (i == size) {
size = size * 5 / 4 + 4;
--
1.7.9.2
++++++ 0037-top-avoid-name-conflict-in-the-next-version-of-stdli.patch ++++++
--- /var/tmp/diff_new_pack.rjAhlH/_old 2014-05-27 07:09:03.000000000 +0200
+++ /var/tmp/diff_new_pack.rjAhlH/_new 2014-05-27 07:09:03.000000000 +0200
@@ -23,13 +23,15 @@
Signed-off-by: Jim Warner
---
- top/top.c | 274 +++++++++++++++++++++++++++++-----------------------------
- top/top.h | 44 ++++-----
- top/top_nls.c | 186 +++++++++++++++++++--------------------
- 3 files changed, 252 insertions(+), 252 deletions(-)
+ top/top.c | 290 +++++++++++++++++++++++++++++-----------------------------
+ top/top.h | 46 ++++-----
+ top/top_nls.c | 210 +++++++++++++++++++++---------------------
+ 3 files changed, 273 insertions(+), 273 deletions(-)
+diff --git top/top.c top/top.c
+index 23dad92..ca3d24a 100644
--- top/top.c
-+++ top/top.c 2014-05-15 11:24:26.438236477 +0000
++++ top/top.c
@@ -18,12 +18,6 @@
* Sami Kerola,
*/
@@ -79,7 +81,7 @@
#define AUTOX_MODE (0 > Rc.fixed_widest)
/* Support for scale_mem and scale_num (to avoid duplication. */
-@@ -1681,9 +1681,9 @@ static FLD_t Fieldstab[] = {
+@@ -1688,9 +1688,9 @@ static FLD_t Fieldstab[] = {
a -1 width represents variable width columns
a 0 width represents columns set once at startup (see zap_fieldstab)
.lflg anomalies:
@@ -92,7 +94,7 @@
L_EITHER - must L_status, else L_stat == 64-bit math (__udivdi3) on 32-bit !
.width .scale .align .sort .lflg
-@@ -1708,11 +1708,11 @@ static FLD_t Fieldstab[] = {
+@@ -1715,11 +1715,11 @@ static FLD_t Fieldstab[] = {
{ 0, -1, A_right, SF(CPN), L_stat },
{ 0, -1, A_right, SF(CPU), L_stat },
{ 6, -1, A_right, SF(TME), L_stat },
@@ -107,7 +109,7 @@
#endif
#ifndef NOBOOST_MEMS
{ 7, SK_Kb, A_right, SF(VRT), L_statm },
-@@ -1866,10 +1866,10 @@ static void build_headers (void) {
+@@ -1879,10 +1879,10 @@ static void build_headers (void) {
w->hdrcaplen += strlen(Caps_off) + strlen(w->capclr_msg);
}
#else
@@ -121,7 +123,7 @@
Frames_libflags |= Fieldstab[w->procflgs[i]].lflg;
s = scat(s, justify_pad(N_col(f)
, VARcol(f) ? w->varcolsz : Fieldstab[f].width
-@@ -1892,7 +1892,7 @@ static void build_headers (void) {
+@@ -1905,7 +1905,7 @@ static void build_headers (void) {
// we must also accommodate an out of view sort field...
f = w->rc.sortindx;
Frames_libflags |= Fieldstab[f].lflg;
@@ -130,7 +132,7 @@
} // end: VIZISw(w)
if (Rc.mode_altscr) w = w->next;
-@@ -1945,16 +1945,16 @@ static void calibrate_fields (void) {
+@@ -1958,16 +1958,16 @@ static void calibrate_fields (void) {
if (VIZISw(w)) {
w->hdrcaplen = 0; // really only used with USE_X_COLHDR
// build window's pflgsall array, establish upper bounds for maxpflgs
@@ -150,7 +152,7 @@
} else
w->pflgsall[w->totpflgs++] = f;
#endif
-@@ -1970,7 +1970,7 @@ static void calibrate_fields (void) {
+@@ -1983,7 +1983,7 @@ static void calibrate_fields (void) {
f = w->pflgsall[i + w->begpflg];
w->procflgs[i] = f;
#ifndef USE_X_COLHDR
@@ -159,7 +161,7 @@
#endif
h = N_col(f);
len = (VARcol(f) ? (int)strlen(h) : Fieldstab[f].width) + COLPADSIZ;
-@@ -1980,7 +1980,7 @@ static void calibrate_fields (void) {
+@@ -1993,7 +1993,7 @@ static void calibrate_fields (void) {
s = scat(s, fmtmk("%*.*s", len, len, h));
}
#ifndef USE_X_COLHDR
@@ -168,7 +170,7 @@
#endif
/* establish the final maxpflgs and prepare to grow the variable column
-@@ -1997,7 +1997,7 @@ static void calibrate_fields (void) {
+@@ -2010,7 +2010,7 @@ static void calibrate_fields (void) {
for (i = w->totpflgs - 1; -1 < i; i--) {
f = w->pflgsall[i];
#ifndef USE_X_COLHDR
@@ -177,7 +179,7 @@
#endif
h = N_col(f);
len = (VARcol(f) ? (int)strlen(h) : Fieldstab[f].width) + COLPADSIZ;
-@@ -2006,7 +2006,7 @@ static void calibrate_fields (void) {
+@@ -2019,7 +2019,7 @@ static void calibrate_fields (void) {
w->endpflg = i;
}
#ifndef USE_X_COLHDR
@@ -186,7 +188,7 @@
#endif
} // end: if (VIZISw(w))
-@@ -2063,10 +2063,10 @@ static void display_fields (int focus, i
+@@ -2076,10 +2076,10 @@ static void display_fields (int focus, i
int rmax = Screen_rows - yRSVD; // total useable rows
static int col_sav, row_sav;
@@ -201,7 +203,7 @@
if (i > 1) { cmax /= i; xadd = 1; }
if (cmax > xTOTL) cmax = xTOTL;
smax = cmax - xPRFX;
-@@ -2081,7 +2081,7 @@ static void display_fields (int focus, i
+@@ -2094,7 +2094,7 @@ static void display_fields (int focus, i
}
fflush(stdout);
@@ -210,7 +212,7 @@
int b = FLDviz(w, i), x = (i / rmax) * cmax, y = (i % rmax) + yRSVD;
const char *e = (i == focus && extend) ? w->capclr_hdr : "";
FLG_t f = FLDget(w, i);
-@@ -2156,7 +2156,7 @@ signify_that:
+@@ -2169,7 +2169,7 @@ signify_that:
if (i > 0) { --i; if (p) swapEM }
break;
case kbd_DOWN:
@@ -219,7 +221,7 @@
break;
case kbd_LEFT:
case kbd_ENTER:
-@@ -2171,7 +2171,7 @@ signify_that:
+@@ -2184,7 +2184,7 @@ signify_that:
break;
case kbd_END:
case kbd_PGDN:
@@ -228,7 +230,7 @@
break;
case kbd_SPACE:
case 'd':
-@@ -2209,7 +2209,7 @@ static inline void widths_resize (void)
+@@ -2222,7 +2222,7 @@ static inline void widths_resize (void)
// next var may also be set by the guys that actually truncate stuff
Autox_found = 0;
@@ -237,7 +239,7 @@
if (Autox_array[i]) {
Fieldstab[i].width++;
Autox_array[i] = 0;
-@@ -2229,58 +2229,58 @@ static void zap_fieldstab (void) {
+@@ -2242,58 +2242,58 @@ static void zap_fieldstab (void) {
char buf[8];
if (!once) {
@@ -263,7 +265,7 @@
- Fieldstab[P_CPN].width = 1;
+ Fieldstab[EU_CPN].width = 1;
- if (1 < (digits = (unsigned)snprintf(buf, sizeof(buf), "%u", (unsigned)smp_num_cpus()))) {
+ if (1 < (digits = (unsigned)snprintf(buf, sizeof(buf), "%u", (unsigned)smp_num_cpus))) {
if (5 < digits) error_exit(N_txt(FAIL_widecpu_txt));
- Fieldstab[P_CPN].width = digits;
+ Fieldstab[EU_CPN].width = digits;
@@ -273,17 +275,17 @@
Cpu_pmax = 99.9;
- Fieldstab[P_CPU].width = 5;
+ Fieldstab[EU_CPU].width = 5;
- if (Rc.mode_irixps && smp_num_cpus() > 1 && !Thread_mode) {
- Cpu_pmax = 100.0 * smp_num_cpus();
- if (smp_num_cpus() > 1000) {
+ if (Rc.mode_irixps && smp_num_cpus > 1 && !Thread_mode) {
+ Cpu_pmax = 100.0 * smp_num_cpus;
+ if (smp_num_cpus > 1000) {
if (Cpu_pmax > 9999999.0) Cpu_pmax = 9999999.0;
- Fieldstab[P_CPU].width = 8;
+ Fieldstab[EU_CPU].width = 8;
- } else if (smp_num_cpus() > 100) {
+ } else if (smp_num_cpus > 100) {
if (Cpu_pmax > 999999.0) Cpu_pmax = 999999.0;
- Fieldstab[P_CPU].width = 7;
+ Fieldstab[EU_CPU].width = 7;
- } else if (smp_num_cpus() > 10) {
+ } else if (smp_num_cpus > 10) {
if (Cpu_pmax > 99999.0) Cpu_pmax = 99999.0;
- Fieldstab[P_CPU].width = 6;
+ Fieldstab[EU_CPU].width = 6;
@@ -295,27 +297,27 @@
Cpu_pmax = 99.9;
- Fieldstab[P_CPU].width = 4;
+ Fieldstab[EU_CPU].width = 4;
- if (Rc.mode_irixps && smp_num_cpus() > 1 && !Thread_mode) {
- Cpu_pmax = 100.0 * smp_num_cpus();
- if (smp_num_cpus() > 1000) {
+ if (Rc.mode_irixps && smp_num_cpus > 1 && !Thread_mode) {
+ Cpu_pmax = 100.0 * smp_num_cpus;
+ if (smp_num_cpus > 1000) {
if (Cpu_pmax > 9999999.0) Cpu_pmax = 9999999.0;
- Fieldstab[P_CPU].width = 7;
+ Fieldstab[EU_CPU].width = 7;
- } else if (smp_num_cpus() > 100) {
+ } else if (smp_num_cpus > 100) {
if (Cpu_pmax > 999999.0) Cpu_pmax = 999999.0;
- Fieldstab[P_CPU].width = 6;
+ Fieldstab[EU_CPU].width = 6;
- } else if (smp_num_cpus() > 10) {
+ } else if (smp_num_cpus > 10) {
if (Cpu_pmax > 99999.0) Cpu_pmax = 99999.0;
- Fieldstab[P_CPU].width = 5;
+ Fieldstab[EU_CPU].width = 5;
} else {
if (Cpu_pmax > 999.9) Cpu_pmax = 999.9;
}
-@@ -2289,23 +2289,23 @@ static void zap_fieldstab (void) {
-
+@@ -2303,26 +2303,26 @@ static void zap_fieldstab (void) {
/* and accommodate optional wider non-scalable columns (maybe) */
if (!AUTOX_MODE) {
+ int i;
- Fieldstab[P_UED].width = Fieldstab[P_URD].width
- = Fieldstab[P_USD].width = Fieldstab[P_GID].width
+ Fieldstab[EU_UED].width = Fieldstab[EU_URD].width
@@ -332,6 +334,10 @@
- Fieldstab[P_WCH].width
+ Fieldstab[EU_WCH].width
= Rc.fixed_widest ? 10 + Rc.fixed_widest : 10;
+- for (i = P_NS1; i < P_NS1 + NUM_NS; i++)
++ for (i = EU_NS1; i < EU_NS1 + NUM_NS; i++)
+ Fieldstab[i].width
+ = Rc.fixed_widest ? 10 + Rc.fixed_widest : 10;
}
/* plus user selectable scaling */
@@ -346,7 +352,7 @@
// lastly, ensure we've got proper column headers...
calibrate_fields();
-@@ -3491,8 +3491,8 @@ static void configs_read (void) {
+@@ -3510,8 +3510,8 @@ static void configs_read (void) {
default: // and future versions?
if (strlen(w->rc.fieldscur) != sizeof(DEF_FIELDS) - 1)
goto default_or_error;
@@ -357,7 +363,7 @@
goto default_or_error;
break;
}
-@@ -3671,16 +3671,16 @@ static void parse_args (char **args) {
+@@ -3690,16 +3690,16 @@ static void parse_args (char **args) {
else error_exit(fmtmk(N_fmt(MISSING_args_fmt), ch));
if (*cp == '+') { SETw(Curwin, Qsrt_NORMAL); ++cp; }
else if (*cp == '-') { OFFw(Curwin, Qsrt_NORMAL); ++cp; }
@@ -377,7 +383,7 @@
puts(N_col(i));
bye_bye(NULL);
case 'p':
-@@ -4244,9 +4244,9 @@ static void other_selection (int ch) {
+@@ -4263,9 +4263,9 @@ static void other_selection (int ch) {
}
ops = *(pval);
*(pval++) = '\0';
@@ -389,7 +395,7 @@
show_msg(fmtmk(N_fmt(XTRA_badflds_fmt), glob));
return;
}
-@@ -4521,7 +4521,7 @@ static void keys_task (int ch) {
+@@ -4540,7 +4540,7 @@ static void keys_task (int ch) {
if (*p == w->rc.sortindx) {
--p;
#ifndef USE_X_COLHDR
@@ -398,7 +404,7 @@
#endif
if (p >= w->procflgs) {
w->rc.sortindx = *p;
-@@ -4542,7 +4542,7 @@ static void keys_task (int ch) {
+@@ -4561,7 +4561,7 @@ static void keys_task (int ch) {
if (*p == w->rc.sortindx) {
++p;
#ifndef USE_X_COLHDR
@@ -407,7 +413,7 @@
#endif
if (p < w->procflgs + w->maxpflgs) {
w->rc.sortindx = *p;
-@@ -4611,7 +4611,7 @@ static void keys_task (int ch) {
+@@ -4630,7 +4630,7 @@ static void keys_task (int ch) {
case 'V':
if (VIZCHKw(w)) {
TOGw(w, Show_FOREST);
@@ -416,7 +422,7 @@
show_msg(fmtmk(N_fmt(FOREST_modes_fmt) , CHKw(w, Show_FOREST)
? N_txt(ON_word_only_txt) : N_txt(OFF_one_word_txt)));
}
-@@ -4731,13 +4731,13 @@ static void keys_window (int ch) {
+@@ -4750,13 +4750,13 @@ static void keys_window (int ch) {
w->varcolbeg -= SCROLLAMT;
else if (0 < w->begpflg) {
w->begpflg -= 1;
@@ -432,7 +438,7 @@
}
#endif
break;
-@@ -4748,14 +4748,14 @@ static void keys_window (int ch) {
+@@ -4767,14 +4767,14 @@ static void keys_window (int ch) {
w->varcolbeg += SCROLLAMT;
if (0 > w->varcolbeg) w->varcolbeg = 0;
} else if (w->begpflg + 1 < w->totpflgs) {
@@ -449,7 +455,7 @@
w->begpflg += (w->begpflg + 3 < w->totpflgs) ? 3 : 0;
else w->begpflg += 1;
}
-@@ -4812,19 +4812,19 @@ static void keys_xtra (int ch) {
+@@ -4831,19 +4831,19 @@ static void keys_xtra (int ch) {
we would just whack do_key's key_tab entry and this function... */
switch (ch) {
case 'M':
@@ -473,7 +479,7 @@
// xmsg = "Time";
break;
default: // keep gcc happy
-@@ -5204,30 +5204,30 @@ static const char *task_show (const WIN_
+@@ -5223,30 +5223,30 @@ static const char *task_show (const WIN_
switch (i) {
#ifndef USE_X_COLHDR
// these 2 aren't real procflgs, they're used in column highlighting!
@@ -512,7 +518,7 @@
{ float u = (float)p->pcpu * Frame_etscale;
/* process can't use more %cpu than number of threads it has
( thanks Jaromir Capik ) */
-@@ -5236,139 +5236,139 @@ static const char *task_show (const WIN_
+@@ -5255,150 +5255,150 @@ static const char *task_show (const WIN_
cp = scale_pcnt(u, W, Jn);
}
break;
@@ -566,6 +572,24 @@
+ case EU_NCE:
cp = make_num(p->nice, W, Jn, AUTOX_NO);
break;
+- case P_NS1: // IPCNS
+- case P_NS2: // MNTNS
+- case P_NS3: // NETNS
+- case P_NS4: // PIDNS
+- case P_NS5: // USERNS
+- case P_NS6: // UTSNS
+- { long ino = p->ns[i - P_NS1];
++ case EU_NS1: // IPCNS
++ case EU_NS2: // MNTNS
++ case EU_NS3: // NETNS
++ case EU_NS4: // PIDNS
++ case EU_NS5: // USERNS
++ case EU_NS6: // UTSNS
++ { long ino = p->ns[i - EU_NS1];
+ if (ino > 0) cp = make_num(ino, W, Jn, i);
+ else cp = make_str("-", W, Js, i);
+ }
+ break;
#ifdef OOMEM_ENABLE
- case P_OOA:
+ case EU_OOA:
@@ -703,8 +727,8 @@
break;
default: // keep gcc happy
--- top/top.h
-+++ top/top.h 2014-05-15 11:25:39.890735226 +0000
-@@ -181,27 +181,27 @@ char *strcasestr(const char *haystack, c
++++ top/top.h
+@@ -181,28 +181,28 @@ char *strcasestr(const char *haystack, const char *needle);
/* Flags for each possible field (and then some) --
these MUST be kept in sync with the FLD_t Fieldstab[] array !! */
enum pflag {
@@ -733,9 +757,11 @@
- P_ENV,
- P_FV1, P_FV2,
- P_USE,
+- P_NS1, P_NS2, P_NS3, P_NS4, P_NS5, P_NS6,
+ EU_ENV,
+ EU_FV1, EU_FV2,
+ EU_USE,
++ EU_NS1, EU_NS2, EU_NS3, EU_NS4, EU_NS5, EU_NS6,
#ifdef USE_X_COLHDR
// not really pflags, used with tbl indexing
- P_MAXPFLGS
@@ -743,11 +769,11 @@
#else
// not really pflags, used with tbl indexing & col highlighting
- P_MAXPFLGS, X_XON, X_XOF
-+ EU_MAXPFLGS, X_XON, X_XOF
++ EU_MAXPFLGS, EU_XON, EU_XOF
#endif
};
-@@ -445,7 +445,7 @@ typedef struct WIN_t {
+@@ -446,7 +446,7 @@ typedef struct WIN_t {
#define VARright(w) (1 == w->maxpflgs && VARcol(w->procflgs[0]))
#else
#define VARright(w) ((1 == w->maxpflgs && VARcol(w->procflgs[0])) || \
@@ -756,7 +782,7 @@
#endif
#define VARleft(w) (w->varcolbeg && VARright(w))
#define SCROLLAMT 8
-@@ -475,7 +475,7 @@ typedef struct WIN_t {
+@@ -476,7 +476,7 @@ typedef struct WIN_t {
/* Used to create *most* of the sort callback functions
note: some of the callbacks are NOT your father's callbacks, they're
highly optimized to save them ol' precious cycles! */
@@ -765,7 +791,7 @@
#define SCB_NUM1(f,n) \
static int SCB_NAME(f) (const proc_t **P, const proc_t **Q) { \
if ( (*P)->n < (*Q)->n ) return SORT_lt; \
-@@ -596,16 +596,16 @@ typedef struct WIN_t {
+@@ -598,16 +598,16 @@ typedef struct WIN_t {
/* The default values for the local config file */
#define DEF_RCFILE { \
RCF_VERSION_ID, 0, 1, DEF_DELAY, 0, { \
@@ -786,7 +812,7 @@
COLOR_YELLOW, COLOR_YELLOW, COLOR_GREEN, COLOR_YELLOW, \
"Usr", USR_FIELDS } \
}, 0, SK_Kb, SK_Kb, 0 }
-@@ -645,7 +645,7 @@ typedef struct WIN_t {
+@@ -647,7 +647,7 @@ typedef struct WIN_t {
/* ( see the find_string function for the one true required protoype ) */
/*------ Sort callbacks ------------------------------------------------*/
/* for each possible field, in the form of: */
@@ -795,8 +821,10 @@
/*------ Tiny useful routine(s) ----------------------------------------*/
//atic const char *fmtmk (const char *fmts, ...);
//atic inline char *scat (char *dst, const char *src);
+diff --git top/top_nls.c top/top_nls.c
+index 1dd6d46..0f37d89 100644
--- top/top_nls.c
-+++ top/top_nls.c 2014-05-15 11:26:38.222235592 +0000
++++ top/top_nls.c
@@ -94,8 +94,8 @@
* + none of the important translator only comments will
* clutter and obscure the main program
@@ -808,7 +836,7 @@
const char *Norm_nlstab[norm_MAX];
const char *Uniq_nlstab[uniq_MAX];
-@@ -121,144 +121,144 @@ static void build_two_nlstabs (void) {
+@@ -121,162 +121,162 @@ static void build_two_nlstabs (void) {
. */
/* Translation Hint: maximum 'PID' = 5 */
@@ -1040,10 +1068,40 @@
- Desc_nlstab[P_USE] = _("Res+Swap Size (KiB)");
+ Head_nlstab[EU_USE] = _("USED");
+ Desc_nlstab[EU_USE] = _("Res+Swap Size (KiB)");
+ /* Translation Hint: maximum 'nsIPC' = 10 */
+- Head_nlstab[P_NS1] = _("nsIPC");
+- Desc_nlstab[P_NS1] = _("IPC namespace Inode");
++ Head_nlstab[EU_NS1] = _("nsIPC");
++ Desc_nlstab[EU_NS1] = _("IPC namespace Inode");
+ /* Translation Hint: maximum 'nsMNT' = 10 */
+- Head_nlstab[P_NS2] = _("nsMNT");
+- Desc_nlstab[P_NS2] = _("MNT namespace Inode");
++ Head_nlstab[EU_NS2] = _("nsMNT");
++ Desc_nlstab[EU_NS2] = _("MNT namespace Inode");
+ /* Translation Hint: maximum 'nsNET' = 10 */
+- Head_nlstab[P_NS3] = _("nsNET");
+- Desc_nlstab[P_NS3] = _("NET namespace Inode");
++ Head_nlstab[EU_NS3] = _("nsNET");
++ Desc_nlstab[EU_NS3] = _("NET namespace Inode");
+ /* Translation Hint: maximum 'nsPID' = 10 */
+- Head_nlstab[P_NS4] = _("nsPID");
+- Desc_nlstab[P_NS4] = _("PID namespace Inode");
++ Head_nlstab[EU_NS4] = _("nsPID");
++ Desc_nlstab[EU_NS4] = _("PID namespace Inode");
+ /* Translation Hint: maximum 'nsUSER' = 10 */
+- Head_nlstab[P_NS5] = _("nsUSER");
+- Desc_nlstab[P_NS5] = _("USER namespace Inode");
++ Head_nlstab[EU_NS5] = _("nsUSER");
++ Desc_nlstab[EU_NS5] = _("USER namespace Inode");
+ /* Translation Hint: maximum 'nsUTS' = 10 */
+- Head_nlstab[P_NS6] = _("nsUTS");
+- Desc_nlstab[P_NS6] = _("UTS namespace Inode");
++ Head_nlstab[EU_NS6] = _("nsUTS");
++ Desc_nlstab[EU_NS6] = _("UTS namespace Inode");
}
-@@ -663,7 +663,7 @@ void initialize_nls (void) {
+@@ -681,7 +681,7 @@ void initialize_nls (void) {
memset(Head_nlstab, 0, sizeof(Head_nlstab));
memset(Desc_nlstab, 0, sizeof(Desc_nlstab));
build_two_nlstabs();
@@ -1052,3 +1110,6 @@
if (!Head_nlstab[i]) {
fprintf(stderr, nls_err, "Head", i);
exit(1);
+--
+1.7.9.2
+
++++++ 0038-Update-help-files.patch ++++++
From 8e7ef322e21b2232d2a1ff9482ec8ce2808fc5c3 Mon Sep 17 00:00:00 2001
From: Craig Small
Date: Sun, 2 Feb 2014 18:13:01 +1100
Subject: [PATCH] Update help files
Benno Schulenberg suggested some changes to the help messages
to provide some consistency and clarity for both the users and
translators of procps.
The test needed to be updated as the pmap output changed too.
Signed-off-by: Craig Small
---
pgrep.c | 14 +++++++-------
pidof.c | 2 +-
pmap.c | 2 +-
ps/help.c | 22 +++++++++++-----------
skill.c | 6 +++---
testsuite/pmap.test/pmap.exp | 2 +-
6 files changed, 24 insertions(+), 24 deletions(-)
diff --git pgrep.c pgrep.c
index fda7924..d8d3dcb 100644
--- pgrep.c
+++ pgrep.c
@@ -115,19 +115,19 @@ static int __attribute__ ((__noreturn__)) usage(int opt)
}
fputs(_(" -c, --count count of matching processes\n"), fp);
fputs(_(" -f, --full use full process name to match\n"), fp);
- fputs(_(" -g, --pgroup match listed process group IDs\n"), fp);
- fputs(_(" -G, --group match real group IDs\n"), fp);
+ fputs(_(" -g, --pgroup match listed process group IDs\n"), fp);
+ fputs(_(" -G, --group match real group IDs\n"), fp);
fputs(_(" -n, --newest select most recently started\n"), fp);
fputs(_(" -o, --oldest select least recently started\n"), fp);
- fputs(_(" -P, --parent match only child processes of the given parent\n"), fp);
- fputs(_(" -s, --session match session IDs\n"), fp);
+ fputs(_(" -P, --parent match only child processes of the given parent\n"), fp);
+ fputs(_(" -s, --session match session IDs\n"), fp);
fputs(_(" -t, --terminal match by controlling terminal\n"), fp);
- fputs(_(" -u, --euid match by effective IDs\n"), fp);
- fputs(_(" -U, --uid match by real IDs\n"), fp);
+ fputs(_(" -u, --euid match by effective IDs\n"), fp);
+ fputs(_(" -U, --uid match by real IDs\n"), fp);
fputs(_(" -x, --exact match exactly with the command name\n"), fp);
fputs(_(" -F, --pidfile <file> read PIDs from file\n"), fp);
fputs(_(" -L, --logpidfile fail if PID file is not locked\n"), fp);
- fputs(_(" --ns <pid> match the processes that belong to the same\n"
+ fputs(_(" --ns <PID> match the processes that belong to the same\n"
" namespace as <pid>\n"), fp);
fputs(_(" --nslist list which namespaces will be considered for\n"
" the --ns option.\n"
diff --git pidof.c pidof.c
index 6a38675..d1a9f31 100644
--- pidof.c
+++ pidof.c
@@ -62,7 +62,7 @@ static int __attribute__ ((__noreturn__)) usage(int opt)
fputs(USAGE_OPTIONS, fp);
fputs(_(" -s, --single-shot return one PID only\n"), fp);
fputs(_(" -c, --check-root omit processes with different root\n"), fp);
- fputs(_(" -x scripts too\n"), fp);
+ fputs(_(" -x also find shells running the named scripts\n"), fp);
fputs(_(" -o, --omit-pid omit processes with PID\n"), fp);
fputs(USAGE_SEPARATOR, fp);
fputs(USAGE_HELP, fp);
diff --git pmap.c pmap.c
index 4ecabce..66c1c2d 100644
--- pmap.c
+++ pmap.c
@@ -106,7 +106,7 @@ usage(FILE * out)
{
fputs(USAGE_HEADER, out);
fprintf(out,
- _(" %s [options] pid [pid ...]\n"), program_invocation_short_name);
+ _(" %s [options] PID [PID ...]\n"), program_invocation_short_name);
fputs(USAGE_OPTIONS, out);
fputs(_(" -x, --extended show details\n"), out);
fputs(_(" -X show even more details\n"), out);
diff --git ps/help.c ps/help.c
index 9133903..1b98b73 100644
--- ps/help.c
+++ ps/help.c
@@ -109,18 +109,18 @@ void do_help (const char *opt, int rc) {
if (section == HELP_LST || section == HELP_ALL) {
fputs(_("\nSelection by list:\n"), out);
fputs(_(" -C <command> command name\n"), out);
- fputs(_(" -G, --Group <gid> real group id or name\n"), out);
+ fputs(_(" -G, --Group <GID> real group id or name\n"), out);
fputs(_(" -g, --group <group> session or effective group name\n"), out);
- fputs(_(" -p, --pid <pid> process id\n"), out);
- fputs(_(" --ppid <pid> select by parent process id\n"), out);
+ fputs(_(" -p, --pid <PID> process id\n"), out);
+ fputs(_(" --ppid <PID> select by parent process id\n"), out);
fputs(_(" -s, --sid <session> session id\n"), out);
fputs(_(" -t, t, --tty <tty> terminal\n"), out);
- fputs(_(" -u, U, --user <uid> effective user id or name\n"), out);
- fputs(_(" -U, --User <uid> real user id or name\n"), out);
+ fputs(_(" -u, U, --user <UID> effective user id or name\n"), out);
+ fputs(_(" -U, --User <UID> real user id or name\n"), out);
fputs(_("\n"
- " selection <arguments> take either:\n"
- " comma-separated list e.g. '-u root,nobody' or\n"
- " blank-separated list e.g. '-p 123 4567'\n"), out);
+ " The selection options take as their argument either:\n"
+ " a comma-separated list e.g. '-u root,nobody' or\n"
+ " or a blank-separated list e.g. '-p 123 4567'\n"), out);
}
if (section == HELP_OUT || section == HELP_ALL) {
fputs(_("\nOutput formats:\n"), out);
@@ -136,7 +136,7 @@ void do_help (const char *opt, int rc) {
fputs(_(" -O <format> preloaded with default columns\n"), out);
fputs(_(" O <format> as -O, with BSD personality\n"), out);
fputs(_(" -o, o, --format <format>\n"
- " user defined format\n"), out);
+ " user-defined format\n"), out);
fputs(_(" s signal format\n"), out);
fputs(_(" u user-oriented format\n"), out);
fputs(_(" v virtual memory format\n"), out);
@@ -152,7 +152,7 @@ void do_help (const char *opt, int rc) {
}
if (section == HELP_THD || section == HELP_ALL) {
fputs(_("\nShow threads:\n"), out);
- fputs(_(" H as if they where processes\n"), out);
+ fputs(_(" H as if they were processes\n"), out);
fputs(_(" -L possibly with LWP and NLWP columns\n"), out);
fputs(_(" -m, m after processes\n"), out);
fputs(_(" -T possibly with SPID column\n"), out);
@@ -163,7 +163,7 @@ void do_help (const char *opt, int rc) {
fputs(_(" c show true command name\n"), out);
fputs(_(" e show the environment after command\n"), out);
fputs(_(" k, --sort specify sort order as: [+|-]key[,[+|-]key[,...]]\n"), out);
- fputs(_(" L list format specifiers\n"), out);
+ fputs(_(" L show format specifiers\n"), out);
fputs(_(" n display numeric uid and wchan\n"), out);
fputs(_(" S, --cumulative include some dead child process data\n"), out);
fputs(_(" -y do not show flags, show rss (only with -l)\n"), out);
diff --git skill.c skill.c
index 60ed274..9f3b4fc 100644
--- skill.c
+++ skill.c
@@ -356,7 +356,7 @@ static void __attribute__ ((__noreturn__)) skillsnice_usage(FILE * out)
fputs(_(" -i, --interactive interactive\n"), out);
fputs(_(" -l, --list list all signal names\n"), out);
fputs(_(" -L, --table list all signal names in a nice table\n"), out);
- fputs(_(" -n, --no-action no action\n"), out);
+ fputs(_(" -n, --no-action do not actually kill processes; just print what would happen\n"), out);
fputs(_(" -v, --verbose explain what is being done\n"), out);
fputs(_(" -w, --warnings enable warnings (not implemented)\n"), out);
fputs(USAGE_SEPARATOR, out);
@@ -371,8 +371,8 @@ static void __attribute__ ((__noreturn__)) skillsnice_usage(FILE * out)
fputs(_(" --ns <pid> match the processes that belong to the same\n"
" namespace as <pid>\n"), out);
fputs(_(" --nslist list which namespaces will be considered for\n"
- " the --ns option.\n"
- " Available namespaces: ipc, mnt, net, pid, user, uts\n"), out);
+ " the --ns option; available namespaces are\n:"
+ " ipc, mnt, net, pid, user, uts\n"), out);
fputs(USAGE_SEPARATOR, out);
fputs(USAGE_SEPARATOR, out);
diff --git testsuite/pmap.test/pmap.exp testsuite/pmap.test/pmap.exp
index bc2550a..5a9e603 100644
--- testsuite/pmap.test/pmap.exp
+++ testsuite/pmap.test/pmap.exp
@@ -22,7 +22,7 @@ set pmap_ext_footer "\[ -\]+\\s+total kB\\s+\\d+(\\s+\[\\d-\]+){2,3}\\s*\$"
set test "pmap with no arguments"
spawn $pmap
#expect_pass "$test" "^\(lt-\)\?pmap: argument missing"
-expect_pass "$test" "Usage:\\s+\(lt-\)?pmap \\\[options\\\] pid \\\[pid \.\.\.\\\]"
+expect_pass "$test" "Usage:\\s+\(lt-\)?pmap \\\[options\\\] PID \\\[PID \.\.\.\\\]"
set test "pmap standard output"
spawn $pmap $mypid
--
1.7.9.2
++++++ 0038-top-protect-against-distortion-when-system-time-rese.patch ++++++
--- /var/tmp/diff_new_pack.rjAhlH/_old 2014-05-27 07:09:03.000000000 +0200
+++ /var/tmp/diff_new_pack.rjAhlH/_new 2014-05-27 07:09:03.000000000 +0200
@@ -1,4 +1,4 @@
-Based on 22e658297494e11ef92a81069b49a40420b8d824 Mon Sep 17 00:00:00 2001
+From 22e658297494e11ef92a81069b49a40420b8d824 Mon Sep 17 00:00:00 2001
From: Jim Warner
Date: Fri, 25 Apr 2014 00:00:00 -0500
Subject: [PATCH] top: protect against distortion when system time reset
@@ -49,9 +49,11 @@
top/top.c | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
+diff --git top/top.c top/top.c
+index d767495..cbcb152 100644
--- top/top.c
-+++ top/top.c 2014-05-15 00:00:00.000000000 +0000
-@@ -2514,17 +2514,14 @@ static void procs_hlp (proc_t *this) {
++++ top/top.c
+@@ -2518,17 +2518,14 @@ static void procs_hlp (proc_t *this) {
HST_t *h;
if (!this) {
@@ -73,4 +75,7 @@
+ uptime_sav = uptime_cur;
// if in Solaris mode, adjust our scaling for all cpus
- Frame_etscale = 100.0f / ((float)Hertz * (float)et * (Rc.mode_irixps ? 1 : smp_num_cpus()));
+ Frame_etscale = 100.0f / ((float)Hertz * (float)et * (Rc.mode_irixps ? 1 : smp_num_cpus));
+--
+1.7.9.2
+
++++++ 0039-vmstat-Support-for-timestamps-with-t-fix-for-wd.patch ++++++
Based on 4fcd56bf582ee2ef5b205625ca3d1bfed90364e9 Mon Sep 17 00:00:00 2001
From: Jaromir Capik
Date: Tue, 4 Feb 2014 19:10:42 +0100
Subject: [PATCH] vmstat: Support for timestamps with '-t' & fix for '-wd'
From now the vmstat can append a timestamp to each line in the
VMSTAT and DISKSTAT mode. You can achieve that with the '-t'
switch.
The '-w' switch now works in the DISKSTAT mode too.
vmstat.8 | 3 +
vmstat.c | 197 +++++++++++++++++++++++++++++++++++++++++++++++++++-----------
2 files changed, 167 insertions(+), 33 deletions(-)
diff --git vmstat.8 vmstat.8
index ef6cbe9..420d9f3 100644
--- vmstat.8
+++ vmstat.8
@@ -74,6 +74,9 @@ or 1048576
bytes. Note this does not change the swap (si/so) or block (bi/bo)
fields.
.TP
+\fB\-t\fR, \fB\-\-timestamp\fR
+Append timestamp to each line
+.TP
\fB\-w\fR, \fB\-\-wide\fR
Wide output mode (useful for systems with higher amount of memory,
where the default output mode suffers from unwanted column breakage).
diff --git vmstat.c vmstat.c
index c01351d..a84d2d2 100644
--- vmstat.c
+++ vmstat.c
@@ -43,6 +43,7 @@
#include
#include
#include
+#include
#include "c.h"
#include "fileutils.h"
#include "nls.h"
@@ -75,6 +76,9 @@ static int a_option;
/* "-w" means "wide output" */
static int w_option;
+/* "-t" means "show timestamp" */
+static int t_option;
+
static unsigned sleep_time = 1;
static int infinite_updates = 0;
static unsigned long num_updates;
@@ -100,6 +104,7 @@ static void __attribute__ ((__noreturn__))
fputs(_(" -p, --partition <dev> partition specific statistics\n"), out);
fputs(_(" -S, --unit <char> define display unit\n"), out);
fputs(_(" -w, --wide wide output\n"), out);
+ fputs(_(" -t, --timestamp show timestamp\n"), out);
fputs(USAGE_SEPARATOR, out);
fputs(USAGE_HELP, out);
fputs(USAGE_VERSION, out);
@@ -180,21 +185,33 @@ static int format_1000(unsigned long long val64, char *restrict dst)
static void new_header(void)
{
+ struct tm *tm_ptr;
+ time_t the_time;
+ char timebuf[32];
+
/* Translation Hint: Translating folloging header & fields
* that follow (marked with max x chars) might not work,
* unless manual page is translated as well. */
-
- const char header[] =
- "procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----\n";
- const char wide_header[] =
- "procs -----------------------memory---------------------- ---swap-- -----io---- -system-- --------cpu--------\n";
+ const char *header =
+ _("procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----");
+ const char *wide_header =
+ _("procs -----------------------memory---------------------- ---swap-- -----io---- -system-- --------cpu--------");
+ const char *timestamp_header = _(" -----timestamp-----");
const char format[] =
- "%2s %2s %6s %6s %6s %6s %4s %4s %5s %5s %4s %4s %2s %2s %2s %2s %2s\n";
+ "%2s %2s %6s %6s %6s %6s %4s %4s %5s %5s %4s %4s %2s %2s %2s %2s %2s";
const char wide_format[] =
- "%2s %2s %12s %12s %12s %12s %4s %4s %5s %5s %4s %4s %3s %3s %3s %3s %3s\n";
+ "%2s %2s %12s %12s %12s %12s %4s %4s %5s %5s %4s %4s %3s %3s %3s %3s %3s";
+
+
+ printf(w_option ? wide_header : header);
+
+ if (t_option) {
+ printf(timestamp_header);
+ }
+
+ printf("\n");
- printf(w_option ? _(wide_header) : _(header));
printf(
w_option ? wide_format : format,
/* Translation Hint: max 2 chars */
@@ -235,6 +252,19 @@ static void new_header(void)
_("wa"),
/* Translation Hint: max 2 chars */
_("st"));
+
+ if (t_option) {
+ (void) time( &the_time );
+ tm_ptr = localtime( &the_time );
+ if (strftime(timebuf, sizeof(timebuf), "%Z", tm_ptr)) {
+ timebuf[strlen(timestamp_header) - 1] = '\0';
+ } else {
+ timebuf[0] = '\0';
+ }
+ printf(" %*s", (int)(strlen(timestamp_header) - 1), timebuf);
+ }
+
+ printf("\n");
}
static unsigned long unitConvert(unsigned long size)
@@ -247,9 +277,9 @@ static unsigned long unitConvert(unsigned long size)
static void new_format(void)
{
const char format[] =
- "%2u %2u %6lu %6lu %6lu %6lu %4u %4u %5u %5u %4u %4u %2u %2u %2u %2u %2u\n";
+ "%2u %2u %6lu %6lu %6lu %6lu %4u %4u %5u %5u %4u %4u %2u %2u %2u %2u %2u";
const char wide_format[] =
- "%2u %2u %12lu %12lu %12lu %12lu %4u %4u %5u %5u %4u %4u %3u %3u %3u %3u %3u\n";
+ "%2u %2u %12lu %12lu %12lu %12lu %4u %4u %5u %5u %4u %4u %3u %3u %3u %3u %3u";
unsigned int tog = 0; /* toggle switch for cleaner code */
unsigned int i;
@@ -263,6 +293,9 @@ static void new_format(void)
unsigned int sleep_half;
unsigned long kb_per_page = sysconf(_SC_PAGESIZE) / 1024ul;
long long debt = 0; /* handle idle ticks running backwards */
+ struct tm *tm_ptr;
+ time_t the_time;
+ char timebuf[32];
sleep_half = (sleep_time / 2);
new_header();
@@ -272,6 +305,12 @@ static void new_format(void)
cpu_zzz, pgpgin, pgpgout, pswpin, pswpout, intr, ctxt, &running,
&blocked, &dummy_1, &dummy_2);
+ if (t_option) {
+ (void) time( &the_time );
+ tm_ptr = localtime( &the_time );
+ strftime(timebuf, sizeof(timebuf), "%Y-%m-%d %H:%M:%S", tm_ptr);
+ }
+
duse = *cpu_use + *cpu_nic;
dsys = *cpu_sys + *cpu_xxx + *cpu_yyy;
didl = *cpu_idl;
@@ -298,6 +337,12 @@ static void new_format(void)
(unsigned)( (100*dstl + divo2) / Div )
);
+ if (t_option) {
+ printf(" %s", timebuf);
+ }
+
+ printf("\n");
+
/* main loop */
for (i = 1; infinite_updates || i < num_updates; i++) {
sleep(sleep_time);
@@ -313,6 +358,12 @@ static void new_format(void)
pgpgout + tog, pswpin + tog, pswpout + tog, intr + tog,
ctxt + tog, &running, &blocked, &dummy_1, &dummy_2);
+ if (t_option) {
+ (void) time( &the_time );
+ tm_ptr = localtime( &the_time );
+ strftime(timebuf, sizeof(timebuf), "%Y-%m-%d %H:%M:%S", tm_ptr);
+ }
+
duse =
cpu_use[tog] - cpu_use[!tog] + cpu_nic[tog] - cpu_nic[!tog];
dsys =
@@ -364,6 +415,12 @@ static void new_format(void)
/* st */
(unsigned)( (100*dstl+divo2)/Div )
);
+
+ if (t_option) {
+ printf(" %s", timebuf);
+ }
+
+ printf("\n");
}
}
@@ -453,11 +510,33 @@ static int diskpartition_format(const char *partition_name)
static void diskheader(void)
{
+ struct tm *tm_ptr;
+ time_t the_time;
+ char timebuf[32];
+
/* Translation Hint: Translating folloging header & fields
* that follow (marked with max x chars) might not work,
* unless manual page is translated as well. */
- printf(_("disk- ------------reads------------ ------------writes----------- -----IO------\n"));
- printf("%5s %6s %6s %7s %7s %6s %6s %7s %7s %6s %6s\n",
+ const char *header =
+ _("disk- ------------reads------------ ------------writes----------- -----IO------");
+ const char *wide_header =
+ _("disk- -------------------reads------------------- -------------------writes------------------ ------IO-------");
+ const char *timestamp_header = _(" -----timestamp-----");
+
+ const char format[] =
+ "%5s %6s %6s %7s %7s %6s %6s %7s %7s %6s %6s";
+ const char wide_format[] =
+ "%5s %9s %9s %11s %11s %9s %9s %11s %11s %7s %7s";
+
+ printf(w_option ? wide_header : header);
+
+ if (t_option) {
+ printf(timestamp_header);
+ }
+
+ printf("\n");
+
+ printf(w_option ? wide_format : format,
" ",
/* Translation Hint: max 6 chars */
_("total"),
@@ -479,25 +558,53 @@ static void diskheader(void)
_("cur"),
/* Translation Hint: max 6 chars */
_("sec"));
+
+ if (t_option) {
+ (void) time( &the_time );
+ tm_ptr = localtime( &the_time );
+ if (strftime(timebuf, sizeof(timebuf), "%Z", tm_ptr)) {
+ timebuf[strlen(timestamp_header) - 1] = '\0';
+ } else {
+ timebuf[0] = '\0';
+ }
+ printf(" %*s", (int)(strlen(timestamp_header) - 1), timebuf);
+ }
+
+ printf("\n");
}
static void diskformat(void)
{
+ const char format[] =
+ "%-5s %6u %6u %7llu %7u %6u %6u %7llu %7u %6u %6u";
+ const char wide_format[] =
+ "%-5s %9u %9u %11llu %11u %9u %9u %11llu %11u %7u %7u";
+
FILE *fDiskstat;
struct disk_stat *disks;
struct partition_stat *partitions;
unsigned long ndisks, i, j, k;
- const char format[] = "%-5s %6u %6u %7llu %7u %6u %6u %7llu %7u %6u %6u\n";
+ struct tm *tm_ptr;
+ time_t the_time;
+ char timebuf[32];
+
if ((fDiskstat = fopen("/proc/diskstats", "rb"))) {
fclose(fDiskstat);
ndisks = getdiskstat(&disks, &partitions);
+
+ if (t_option) {
+ (void) time( &the_time );
+ tm_ptr = localtime( &the_time );
+ strftime(timebuf, sizeof(timebuf), "%Y-%m-%d %H:%M:%S", tm_ptr);
+ }
+
if (!moreheaders)
diskheader();
for (k = 0; k < ndisks; k++) {
if (moreheaders && ((k % height) == 0))
diskheader();
- printf(format,
+ printf(w_option ? wide_format : format,
disks[k].disk_name,
disks[k].reads,
disks[k].merged_reads,
@@ -510,31 +617,51 @@ static void diskformat(void)
disks[k].inprogress_IO ? disks[k].inprogress_IO / 1000 : 0,
disks[k].milli_spent_IO ? disks[k].
milli_spent_IO / 1000 : 0);
+
+ if (t_option) {
+ printf(" %s", timebuf);
+ }
+
+ printf("\n");
fflush(stdout);
}
free(disks);
free(partitions);
+
for (j = 1; infinite_updates || j < num_updates; j++) {
sleep(sleep_time);
ndisks = getdiskstat(&disks, &partitions);
- for (i = 0; i < ndisks; i++, k++) {
- if (moreheaders && ((k % height) == 0))
- diskheader();
- printf(format,
- disks[i].disk_name,
- disks[i].reads,
- disks[i].merged_reads,
- disks[i].reads_sectors,
- disks[i].milli_reading,
- disks[i].writes,
- disks[i].merged_writes,
- disks[i].written_sectors,
- disks[i].milli_writing,
- disks[i].inprogress_IO ? disks[i].inprogress_IO / 1000 : 0,
- disks[i].milli_spent_IO ? disks[i].
- milli_spent_IO / 1000 : 0);
- fflush(stdout);
- }
+
+ if (t_option) {
+ (void) time( &the_time );
+ tm_ptr = localtime( &the_time );
+ strftime(timebuf, sizeof(timebuf), "%Y-%m-%d %H:%M:%S", tm_ptr);
+ }
+
+ for (i = 0; i < ndisks; i++, k++) {
+ if (moreheaders && ((k % height) == 0))
+ diskheader();
+ printf(w_option ? wide_format : format,
+ disks[i].disk_name,
+ disks[i].reads,
+ disks[i].merged_reads,
+ disks[i].reads_sectors,
+ disks[i].milli_reading,
+ disks[i].writes,
+ disks[i].merged_writes,
+ disks[i].written_sectors,
+ disks[i].milli_writing,
+ disks[i].inprogress_IO ? disks[i].inprogress_IO / 1000 : 0,
+ disks[i].milli_spent_IO ? disks[i].
+ milli_spent_IO / 1000 : 0);
+
+ if (t_option) {
+ printf(" %s", timebuf);
+ }
+
+ printf("\n");
+ fflush(stdout);
+ }
free(disks);
free(partitions);
}
@@ -740,6 +867,7 @@ int main(int argc, char *argv[])
{"partition", required_argument, NULL, 'p'},
{"unit", required_argument, NULL, 'S'},
{"wide", no_argument, NULL, 'w'},
+ {"timestamp", no_argument, NULL, 't'},
{"help", no_argument, NULL, 'h'},
{"version", no_argument, NULL, 'V'},
{NULL, 0, NULL, 0}
@@ -754,7 +882,7 @@ int main(int argc, char *argv[])
atexit(close_stdout);
while ((c =
- getopt_long(argc, argv, "afmnsdDp:S:whV", longopts,
+ getopt_long(argc, argv, "afmnsdDp:S:wthV", longopts,
NULL)) != EOF)
switch (c) {
case 'V':
@@ -820,6 +948,9 @@ int main(int argc, char *argv[])
case 'w':
w_option = 1;
break;
+ case 't':
+ t_option = 1;
+ break;
default:
/* no other aguments defined yet. */
usage(stderr);
--
1.7.9.2
++++++ 0040-watch-Don-t-leak-extra-fds-to-the-child.patch ++++++
From 835b6294d18a6ad79ff56aaeb0038bc6d006384b Mon Sep 17 00:00:00 2001
From: Josh Stone
Date: Tue, 4 Feb 2014 09:46:58 -0800
Subject: [PATCH] watch: Don't leak extra fds to the child
Once the write side of the pipe has been duped to stdout for the child,
the original pipefd is no longer needed, so it can be closed to avoid
leaking to the child.
The leak can easily be seen with "watch ls -l /proc/self/fd", but I
found this due to "watch lvs" diagnosing itself:
File descriptor 4 (pipe:[3163616]) leaked on lvs invocation.
Signed-off-by: Josh Stone
---
watch.c | 1 +
1 file changed, 1 insertion(+)
diff --git watch.c watch.c
index 032dfb7..f0a3ec3 100644
--- watch.c
+++ watch.c
@@ -387,6 +387,7 @@ static int run_command(char *restrict command, char **restrict command_argv)
if (dup2(pipefd[1], 1) < 0) { /* replace stdout with write side of pipe */
xerr(3, _("dup2 failed"));
}
+ close(pipefd[1]); /* once duped, the write fd isn't needed */
dup2(1, 2); /* stderr should default to stdout */
if (flags & WATCH_EXEC) { /* pass command to exec instead of system */
--
1.7.9.2
++++++ 0041-vmstat-Fixing-format-security-flaws.patch ++++++
From dc072aced7250fed9b01fb05f0d672678752a63e Mon Sep 17 00:00:00 2001
From: Jaromir Capik
Date: Wed, 5 Feb 2014 17:09:45 +0100
Subject: [PATCH] vmstat: Fixing format-security flaws
Previously the headers were printed directly without
the format specifier. That way is considered insecure
and leads to build errors with -Werror=format-security
flag set.
---
vmstat.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git vmstat.c vmstat.c
index a84d2d2..a2fd351 100644
--- vmstat.c
+++ vmstat.c
@@ -204,10 +204,10 @@ static void new_header(void)
"%2s %2s %12s %12s %12s %12s %4s %4s %5s %5s %4s %4s %3s %3s %3s %3s %3s";
- printf(w_option ? wide_header : header);
+ printf("%s", w_option ? wide_header : header);
if (t_option) {
- printf(timestamp_header);
+ printf("%s", timestamp_header);
}
printf("\n");
@@ -528,10 +528,10 @@ static void diskheader(void)
const char wide_format[] =
"%5s %9s %9s %11s %11s %9s %9s %11s %11s %7s %7s";
- printf(w_option ? wide_header : header);
+ printf("%s", w_option ? wide_header : header);
if (t_option) {
- printf(timestamp_header);
+ printf("%s", timestamp_header);
}
printf("\n");
--
1.7.9.2
++++++ 0043-Added-get-trans-target-to-Makefile.patch ++++++
From 2ade4b082b8c970bb1e1a6711d79f82b90075431 Mon Sep 17 00:00:00 2001
From: Craig Small
Date: Sat, 22 Feb 2014 11:34:53 +1100
Subject: [PATCH] Added get-trans target to Makefile
The get-trans target rsyncs the latest copies of translation files
from the translation project. I put this target in because I always
forget the exact syntax of the command.
Signed-off-by: Craig Small
---
Makefile.am | 2 ++
1 file changed, 2 insertions(+)
diff --git Makefile.am Makefile.am
index 7075e67..335fbc5 100644
--- Makefile.am
+++ Makefile.am
@@ -123,3 +123,5 @@ $(top_srcdir)/.version:
dist-hook:
echo $(VERSION) > $(distdir)/.tarball-version
+get-trans:
+ rsync -Lrtvz translationproject.org::tp/latest/procps/ po
--
1.7.9.2
++++++ 0045-library-properly-handle-memory-used-by-tmpfs.patch ++++++
Based on 3569c0351fae7797e8d62feae7229d2d6d2aa0a1 Mon Sep 17 00:00:00 2001
From: Jakob Unterwurzacher
Date: Tue, 18 Feb 2014 22:12:21 +0100
Subject: [PATCH] library: properly handle memory used by tmpfs
tmpfs has become much more widely used since distributions use it for
/tmp (Fedora 18+). In /proc/meminfo, memory used by tmpfs is accounted
into "Cached" (aka "NR_FILE_PAGES",
http://lxr.free-electrons.com/source/mm/shmem.c#L301 ).
The tools just pass it on, so what top, free and vmstat report as
"cached" is the sum of page cache and tmpfs.
free has the extremely useful "-/+ buffers/cache" output. However, now
that tmpfs is accounted into "cached", those numbers are way off once
you have big files in /tmp.
Fortunately, kernel 2.6.32 introduces "Shmem", which makes tmpfs memory
usage accessible from userspace (
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=4... ).
This patch substracts Shmem from Cached to get the actual page cache
memory. This makes both issues mentioned above disappear. For older
kernels, Shmem is not available (hence zero) and this patch is no-op.
Additionally:
* Update the man pages of free and vmstat to explain what is happening
* Finally drop "MemShared" from the /proc/meminfo parser, it has been
dead for 10+ years and is only causing confusion ( removed in kernel
2.5.54, see
https://git.kernel.org/cgit/linux/kernel/git/tglx/history.git/commit/?id=fe0... )
---
free.1 | 29 ++++++++++++++++++++++++-----
proc/sysinfo.c | 8 ++++----
proc/sysinfo.h | 3 +--
vmstat.8 | 3 ++-
4 files changed, 31 insertions(+), 12 deletions(-)
diff --git free.1 free.1
index 1e8e7ef..21cce28 100644
--- free.1
+++ free.1
@@ -11,11 +11,30 @@ free \- Display amount of free and used memory in the system
.SH DESCRIPTION
.B free
displays the total amount of free and used physical and swap memory in the
-system, as well as the buffers used by the kernel.
-The shared memory column represents either the MemShared value (2.4 series
-kernels) or the Shmem value (2.6 series kernels and later) taken from the
-/proc/meminfo file. The value is zero if none of the entries is exported
-by the kernel.
+system, as well as the buffers and caches used by the kernel. The
+information is gathered by parsing /proc/meminfo. The displayed
+columns are:
+.TP
+\fBtotal\fR
+Total installed memory (MemTotal and SwapTotal in /proc/meminfo)
+.TP
+\fBused\fR
+Used memory (calculated as total - free)
+.TP
+\fBfree\fR
+Unused memory (MemFree and SwapFree in /proc/meminfo)
+.TP
+\fBshared\fR
+Memory used (mostly) by tmpfs (Shmem in /proc/meminfo, available on
+kernels 2.6.32, displayed as zero if not available)
+.TP
+\fBbuffers\fR
+Memory used by kernel buffers (Buffers in /proc/meminfo)
+.TP
+\fBcached\fR
+Memory used by the page cache (calculated as Cached - Shmem in
+/proc/meminfo - the Cached value is actually the sum of page cache and
+tmpfs memory)
.SH OPTIONS
.TP
\fB\-b\fR, \fB\-\-bytes\fR
diff --git proc/sysinfo.c proc/sysinfo.c
index 1680cc4..e07ca86 100644
--- proc/sysinfo.c
+++ proc/sysinfo.c
@@ -531,7 +531,6 @@ static int compare_mem_table_structs(const void *a, const void *b){
*
* MemTotal: 61768 kB old
* MemFree: 1436 kB old
- * MemShared: 0 kB old (now always zero; not calculated)
* Buffers: 1312 kB old
* Cached: 20932 kB old
* Active: 12464 kB new
@@ -560,7 +559,7 @@ static int compare_mem_table_structs(const void *a, const void *b){
* Hugepagesize: 4096 kB 2.5.??+
*/
-/* obsolete since 2.6.x, but reused for shmem in 2.6.32+ */
+/* Shmem in 2.6.32+ */
unsigned long kb_main_shared;
/* old but still kicking -- the important stuff */
unsigned long kb_main_buffers;
@@ -631,14 +630,13 @@ void meminfo(void){
{"LowTotal", &kb_low_total},
{"Mapped", &kb_mapped}, // kB version of vmstat nr_mapped
{"MemFree", &kb_main_free}, // important
- {"MemShared", &kb_main_shared}, // obsolete since kernel 2.6! (sharing the variable with Shmem replacement)
{"MemTotal", &kb_main_total}, // important
{"NFS_Unstable", &kb_nfs_unstable},
{"PageTables", &kb_pagetables}, // kB version of vmstat nr_page_table_pages
{"ReverseMaps", &nr_reversemaps}, // same as vmstat nr_page_table_pages
{"SReclaimable", &kb_swap_reclaimable}, // "swap reclaimable" (dentry and inode structures)
{"SUnreclaim", &kb_swap_unreclaimable},
- {"Shmem", &kb_main_shared}, // kernel 2.6 and later (sharing the output variable with obsolete MemShared)
+ {"Shmem", &kb_main_shared}, // kernel 2.6.32 and later
{"Slab", &kb_slab}, // kB version of vmstat nr_slab
{"SwapCached", &kb_swap_cached},
{"SwapFree", &kb_swap_free}, // important
@@ -690,6 +688,8 @@ nextline:
kb_main_used = 0;
}
kb_main_cached += kb_swap_reclaimable + kb_swap_cached + kb_nfs_unstable;
+ /* "Cached" includes "Shmem" - we want only the page cache here */
+ kb_main_cached -= kb_main_shared;
}
/*****************************************************************/
diff --git proc/sysinfo.h proc/sysinfo.h
index 1eb3472..2291631 100644
--- proc/sysinfo.h
+++ proc/sysinfo.h
@@ -20,8 +20,7 @@ extern int uptime (double *uptime_secs, double *idle_secs);
extern unsigned long getbtime(void);
extern void loadavg(double *av1, double *av5, double *av15);
-
-/* obsolete */
+/* Shmem in 2.6.32+ */
extern unsigned long kb_main_shared;
/* old but still kicking -- the important stuff */
extern unsigned long kb_main_buffers;
diff --git vmstat.8 vmstat.8
index 420d9f3..2782a42 100644
--- vmstat.8
+++ vmstat.8
@@ -102,7 +102,8 @@ b: The number of processes in uninterruptible sleep.
swpd: the amount of virtual memory used.
free: the amount of idle memory.
buff: the amount of memory used as buffers.
-cache: the amount of memory used as cache.
+cache: the amount of memory used as cache (excluding tmpfs memory for
+kernels 2.6.32+)
inact: the amount of inactive memory. (\-a option)
active: the amount of active memory. (\-a option)
.fi
--
1.7.9.2
++++++ 0046-Minor-i18n-fixes.patch ++++++
From 2ec9f5c22e3eeaf4da514e0e6ec9374cfdbb9a99 Mon Sep 17 00:00:00 2001
From: Yuri Chornoivan
Date: Mon, 3 Mar 2014 21:58:56 +1100
Subject: [PATCH] Minor i18n fixes
Minor fixes that the translator (Yuri) has found in some of the
strings. You only know how many typos and thinkos you have when
someone is trying to translate it.
Signed-off-by: Craig Small
---
ps/help.c | 4 ++--
skill.c | 2 +-
slabtop.c | 4 ++++
top/top.c | 2 +-
top/top_nls.c | 2 +-
5 files changed, 9 insertions(+), 5 deletions(-)
diff --git ps/help.c ps/help.c
index 1b98b73..8bde12b 100644
--- ps/help.c
+++ ps/help.c
@@ -120,7 +120,7 @@ void do_help (const char *opt, int rc) {
fputs(_("\n"
" The selection options take as their argument either:\n"
" a comma-separated list e.g. '-u root,nobody' or\n"
- " or a blank-separated list e.g. '-p 123 4567'\n"), out);
+ " a blank-separated list e.g. '-p 123 4567'\n"), out);
}
if (section == HELP_OUT || section == HELP_ALL) {
fputs(_("\nOutput formats:\n"), out);
@@ -141,7 +141,7 @@ void do_help (const char *opt, int rc) {
fputs(_(" u user-oriented format\n"), out);
fputs(_(" v virtual memory format\n"), out);
fputs(_(" X register format\n"), out);
- fputs(_(" -y do not show flags, show rrs vs. addr (used with -l)\n"), out);
+ fputs(_(" -y do not show flags, show rss vs. addr (used with -l)\n"), out);
fputs(_(" --context display security context (for SELinux)\n"), out);
fputs(_(" --headers repeat header lines, one per page\n"), out);
fputs(_(" --no-headers do not print header at all\n"), out);
diff --git skill.c skill.c
index 9f3b4fc..2b1ce2f 100644
--- skill.c
+++ skill.c
@@ -751,7 +751,7 @@ int main(int argc, char ** argv)
kill_main(argc, argv);
break;
default:
- fprintf(stderr, _("skill: \"%s\" is not support\n"),
+ fprintf(stderr, _("skill: \"%s\" is not supported\n"),
program_invocation_short_name);
fprintf(stderr, USAGE_MAN_TAIL("skill(1)"));
return EXIT_FAILURE;
diff --git slabtop.c slabtop.c
index c135ec5..4be35b9 100644
--- slabtop.c
+++ slabtop.c
@@ -376,15 +376,19 @@ int main(int argc, char *argv[])
" %-35s: %.2fK / %.2fK / %.2fK\n\n",
/* Translation Hint: Next five strings must not
* exceed 35 length in characters. */
+ /* xgettext:no-c-format */
_("Active / Total Objects (% used)"),
stats.nr_active_objs, stats.nr_objs,
100.0 * stats.nr_active_objs / stats.nr_objs,
+ /* xgettext:no-c-format */
_("Active / Total Slabs (% used)"),
stats.nr_active_slabs, stats.nr_slabs,
100.0 * stats.nr_active_slabs / stats.nr_slabs,
+ /* xgettext:no-c-format */
_("Active / Total Caches (% used)"),
stats.nr_active_caches, stats.nr_caches,
100.0 * stats.nr_active_caches / stats.nr_caches,
+ /* xgettext:no-c-format */
_("Active / Total Size (% used)"),
stats.active_size / 1024.0, stats.total_size / 1024.0,
100.0 * stats.active_size / stats.total_size,
diff --git top/top.c top/top.c
index ca3d24a..d767495 100644
--- top/top.c
+++ top/top.c
@@ -779,7 +779,7 @@ static int show_pmt (const char *str) {
* Our special formatting consists of:
* "some text <_delimiter_> some more text <_delimiter_>...\n"
* Where <_delimiter_> is a two byte combination consisting of a
- * tilde followed by an ascii digit in the the range of 1 - 8.
+ * tilde followed by an ascii digit in the range of 1 - 8.
* examples: ~1, ~5, ~8, etc.
* The tilde is effectively stripped and the next digit
* converted to an index which is then used to select an
diff --git top/top_nls.c top/top_nls.c
index 0f37d89..b47459a 100644
--- top/top_nls.c
+++ top/top_nls.c
@@ -404,7 +404,7 @@ static void build_norm_nlstab (void) {
Norm_nlstab[YINSP_demo01_txt] = _("Open Files");
Norm_nlstab[YINSP_demo02_txt] = _("NUMA Info");
Norm_nlstab[YINSP_demo03_txt] = _("Log");
- Norm_nlstab[YINSP_deqfmt_txt] = _("the '=' key will eventually show the actual file read or command(s) excuted ...");
+ Norm_nlstab[YINSP_deqfmt_txt] = _("the '=' key will eventually show the actual file read or command(s) executed ...");
Norm_nlstab[YINSP_deqtyp_txt] = _("demo");
Norm_nlstab[YINSP_dstory_txt] = _(""
"This is simulated output representing the contents of some file or the output\n"
--
1.7.9.2
++++++ 0046-top-miscellaneous-accumulated-changes-to-program-cod.patch ++++++
--- /var/tmp/diff_new_pack.rjAhlH/_old 2014-05-27 07:09:03.000000000 +0200
+++ /var/tmp/diff_new_pack.rjAhlH/_new 2014-05-27 07:09:03.000000000 +0200
@@ -1,4 +1,4 @@
-Based on 0caa6d6e676c8d28b933066d19c112b02ed59245 Mon Sep 17 00:00:00 2001
+From 0caa6d6e676c8d28b933066d19c112b02ed59245 Mon Sep 17 00:00:00 2001
From: Jim Warner
Date: Wed, 7 May 2014 00:00:00 -0500
Subject: [PATCH] top: miscellaneous accumulated changes to program code
@@ -8,8 +8,9 @@
Signed-off-by: Jim Warner
---
- top/top.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
+ top/top.c | 5 ++---
+ top/top_nls.c | 28 ++++++++++++++--------------
+ 2 files changed, 16 insertions(+), 17 deletions(-)
diff --git top/top.c top/top.c
index 9f33a05..bc755f3 100644
@@ -31,3 +32,111 @@
break;
default: // what we REALLY wanted (maybe)
if (isprint(key) && logCOL < bufMAX && phyCOL < Screen_cols) {
+@@ -4624,7 +4624,6 @@ static void keys_task (int ch) {
+ if (*str != kbd_ESC
+ && (errmsg = user_certify(w, str, ch)))
+ show_msg(errmsg);
+-
+ }
+ break;
+ case 'V':
+diff --git top/top_nls.c top/top_nls.c
+index 01c8d1e..ea1c088 100644
+--- top/top_nls.c
++++ top/top_nls.c
+@@ -129,31 +129,31 @@ static void build_two_nlstabs (void) {
+ /* Translation Hint: maximum 'UID' = 5 */
+ Head_nlstab[EU_UED] = _("UID");
+ Desc_nlstab[EU_UED] = _("Effective User Id");
+-/* Translation Hint: maximum 'USER' = 8 */
++/* Translation Hint: maximum 'USER' = 7 */
+ Head_nlstab[EU_UEN] = _("USER");
+ Desc_nlstab[EU_UEN] = _("Effective User Name");
+ /* Translation Hint: maximum 'RUID' = 5 */
+ Head_nlstab[EU_URD] = _("RUID");
+ Desc_nlstab[EU_URD] = _("Real User Id");
+-/* Translation Hint: maximum 'RUSER' = 8 */
++/* Translation Hint: maximum 'RUSER' = 7 */
+ Head_nlstab[EU_URN] = _("RUSER");
+ Desc_nlstab[EU_URN] = _("Real User Name");
+ /* Translation Hint: maximum 'SUID' = 5 */
+ Head_nlstab[EU_USD] = _("SUID");
+ Desc_nlstab[EU_USD] = _("Saved User Id");
+-/* Translation Hint: maximum 'SUSER' = 8 */
++/* Translation Hint: maximum 'SUSER' = 7 */
+ Head_nlstab[EU_USN] = _("SUSER");
+ Desc_nlstab[EU_USN] = _("Saved User Name");
+ /* Translation Hint: maximum 'GID' = 5 */
+ Head_nlstab[EU_GID] = _("GID");
+ Desc_nlstab[EU_GID] = _("Group Id");
+-/* Translation Hint: maximum 'GROUP' = 8 */
++/* Translation Hint: maximum 'GROUP' = 7 */
+ Head_nlstab[EU_GRP] = _("GROUP");
+ Desc_nlstab[EU_GRP] = _("Group Name");
+ /* Translation Hint: maximum 'PGRP' = 5 */
+ Head_nlstab[EU_PGD] = _("PGRP");
+ Desc_nlstab[EU_PGD] = _("Process Group Id");
+-/* Translation Hint: maximum 'TTY' = 8 */
++/* Translation Hint: maximum 'TTY' = 7 */
+ Head_nlstab[EU_TTY] = _("TTY");
+ Desc_nlstab[EU_TTY] = _("Controlling Tty");
+ /* Translation Hint: maximum 'TPGID' = 5 */
+@@ -180,7 +180,7 @@ static void build_two_nlstabs (void) {
+ /* Translation Hint: maximum '' = 6 */
+ Head_nlstab[EU_TME] = _("TIME");
+ Desc_nlstab[EU_TME] = _("CPU Time");
+-/* Translation Hint: maximum 'TIME+' = 9 */
++/* Translation Hint: maximum 'TIME+' = 7 */
+ Head_nlstab[EU_TM2] = _("TIME+");
+ Desc_nlstab[EU_TM2] = _("CPU Time, hundredths");
+ /* Translation Hint: maximum '%MEM' = 4 */
+@@ -222,7 +222,7 @@ static void build_two_nlstabs (void) {
+ /* Translation Hint: maximum 'WCHAN' = 7 */
+ Head_nlstab[EU_WCH] = _("WCHAN");
+ Desc_nlstab[EU_WCH] = _("Sleeping in Function");
+-/* Translation Hint: maximum 'Flags' = 8 */
++/* Translation Hint: maximum 'Flags' = 7 */
+ Head_nlstab[EU_FLG] = _("Flags");
+ Desc_nlstab[EU_FLG] = _("Task Flags ");
+ /* Translation Hint: maximum 'CGROUPS' = 7 */
+@@ -241,7 +241,7 @@ static void build_two_nlstabs (void) {
+ /* Translation Hint: maximum 'Adj' = 3 */
+ Head_nlstab[EU_OOA] = _("Adj");
+ Desc_nlstab[EU_OOA] = _("oom_adjustment (2^X)");
+-/* Translation Hint: maximum 'Badness' = 8 */
++/* Translation Hint: maximum 'Badness' = 7 */
+ Head_nlstab[EU_OOM] = _("Badness");
+ Desc_nlstab[EU_OOM] = _("oom_score (badness)");
+ #endif
+@@ -259,22 +259,22 @@ static void build_two_nlstabs (void) {
+ /* Translation Hint: maximum 'USED' = 4 */
+ Head_nlstab[EU_USE] = _("USED");
+ Desc_nlstab[EU_USE] = _("Res+Swap Size (KiB)");
+-/* Translation Hint: maximum 'nsIPC' = 10 */
++/* Translation Hint: maximum 'nsIPC' = 7 */
+ Head_nlstab[EU_NS1] = _("nsIPC");
+ Desc_nlstab[EU_NS1] = _("IPC namespace Inode");
+-/* Translation Hint: maximum 'nsMNT' = 10 */
++/* Translation Hint: maximum 'nsMNT' = 7 */
+ Head_nlstab[EU_NS2] = _("nsMNT");
+ Desc_nlstab[EU_NS2] = _("MNT namespace Inode");
+-/* Translation Hint: maximum 'nsNET' = 10 */
++/* Translation Hint: maximum 'nsNET' = 7 */
+ Head_nlstab[EU_NS3] = _("nsNET");
+ Desc_nlstab[EU_NS3] = _("NET namespace Inode");
+-/* Translation Hint: maximum 'nsPID' = 10 */
++/* Translation Hint: maximum 'nsPID' = 7 */
+ Head_nlstab[EU_NS4] = _("nsPID");
+ Desc_nlstab[EU_NS4] = _("PID namespace Inode");
+-/* Translation Hint: maximum 'nsUSER' = 10 */
++/* Translation Hint: maximum 'nsUSER' = 7 */
+ Head_nlstab[EU_NS5] = _("nsUSER");
+ Desc_nlstab[EU_NS5] = _("USER namespace Inode");
+-/* Translation Hint: maximum 'nsUTS' = 10 */
++/* Translation Hint: maximum 'nsUTS' = 7 */
+ Head_nlstab[EU_NS6] = _("nsUTS");
+ Desc_nlstab[EU_NS6] = _("UTS namespace Inode");
+ }
+--
+1.7.9.2
+
++++++ 0047-sysctl-increase-max-supported-line-length-of-the-con.patch ++++++
From 9c7e8b82f872e2d46ce866255ff132e0e6a0f937 Mon Sep 17 00:00:00 2001
From: Sami Farin
Date: Fri, 14 Mar 2014 00:00:00 -0600
Subject: [PATCH] sysctl: increase max supported line length of the conf file
I ran into this limit with net.ipv4.ip_local_reserved_ports ,
sysctl complained about the line after the long line, further
slowing down my error hunting.
Due to fgets usage, increase buffer size to 4096 chars with
minimum amount of code changes.
Signed-off-by: Sami Farin
---
sysctl.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git sysctl.c sysctl.c
index 51af15d..fc224e5 100644
--- sysctl.c
+++ sysctl.c
@@ -483,14 +483,16 @@ static int pattern_match(const char *string, const char *pat)
return (1);
}
+#define LINELEN 4096
+
/*
* Preload the sysctl's from the conf file. We parse the file and then
* reform it (strip out whitespace).
*/
static int Preload(const char *restrict const filename)
{
- char oneline[256];
- char buffer[256];
+ char oneline[LINELEN];
+ char buffer[LINELEN];
FILE *fp;
char *t;
int n = 0;
--
1.7.9.2
++++++ 0049-fix-url-for-rsync.patch ++++++
From 0b3f63456a1265e13274fd7c6ba0903e4cb3db5a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tr=E1=BA=A7n=20Ng=E1=BB=8Dc=20Qu=C3=A2n?=
Date: Thu, 17 Apr 2014 14:12:01 +0700
Subject: [PATCH] fix url for rsync
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Trần Ngọc Quân
---
Makefile.am | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git Makefile.am Makefile.am
index 335fbc5..b32e9ce 100644
--- Makefile.am
+++ Makefile.am
@@ -124,4 +124,4 @@ dist-hook:
echo $(VERSION) > $(distdir)/.tarball-version
get-trans:
- rsync -Lrtvz translationproject.org::tp/latest/procps/ po
+ rsync -Lrtvz translationproject.org::tp/latest/procps-ng/ po
--
1.7.9.2
++++++ 0051-top-update-copyright-dates-plus-1-preprocessor-chang.patch ++++++
From e2868da34e6d2085fdafcd9b28cdbf01c69361c5 Mon Sep 17 00:00:00 2001
From: Jim Warner
Date: Fri, 25 Apr 2014 00:00:00 -0600
Subject: [PATCH] top: update copyright dates plus 1 preprocessor change
Signed-off-by: Jim Warner
---
top/top.c | 4 ++--
top/top.h | 2 +-
top/top_nls.c | 2 +-
top/top_nls.h | 2 +-
4 files changed, 5 insertions(+), 5 deletions(-)
diff --git top/top.c top/top.c
index cbcb152..0428496 100644
--- top/top.c
+++ top/top.c
@@ -1,6 +1,6 @@
/* top.c - Source file: show Linux processes */
/*
- * Copyright (c) 2002-2013, by: James C. Warner
+ * Copyright (c) 2002-2014, by: James C. Warner
* All rights reserved. 8921 Hilloway Road
* Eden Prairie, Minnesota 55347 USA
*
@@ -3464,7 +3464,7 @@ static void configs_read (void) {
if (2 != fscanf(fp, "%3s\tfieldscur=%79s\n"
, w->rc.winname, w->rc.fieldscur))
goto default_or_error;
-#if PFLAGSSIZ > 80
+#if PFLAGSSIZ != 80
// too bad fscanf is not as flexible with his format string as snprintf
# error Hey, fix the above fscanf 'PFLAGSSIZ' dependency !
#endif
diff --git top/top.h top/top.h
index 5d1aead..836b9fb 100644
--- top/top.h
+++ top/top.h
@@ -1,6 +1,6 @@
/* top.h - Header file: show Linux processes */
/*
- * Copyright (c) 2002-2013, by: James C. Warner
+ * Copyright (c) 2002-2014, by: James C. Warner
* All rights reserved. 8921 Hilloway Road
* Eden Prairie, Minnesota 55347 USA
*
diff --git top/top_nls.c top/top_nls.c
index b47459a..01c8d1e 100644
--- top/top_nls.c
+++ top/top_nls.c
@@ -1,6 +1,6 @@
/* top_nls.c - provide the basis for future nls translations */
/*
- * Copyright (c) 2011-2013, by: James C. Warner
+ * Copyright (c) 2011-2014, by: James C. Warner
* All rights reserved. 8921 Hilloway Road
* Eden Prairie, Minnesota 55347 USA
*
diff --git top/top_nls.h top/top_nls.h
index 1b6d575..9010263 100644
--- top/top_nls.h
+++ top/top_nls.h
@@ -1,6 +1,6 @@
/* top_nls.h - provide the basis for future nls translations */
/*
- * Copyright (c) 2011-2013, by: James C. Warner
+ * Copyright (c) 2011-2014, by: James C. Warner
* All rights reserved. 8921 Hilloway Road
* Eden Prairie, Minnesota 55347 USA
*
--
1.7.9.2
++++++ 0052-top-refactor-man-document-so-as-to-allow-translation.patch ++++++
From f3e55ee661d54bb667b3c0cf07411094ad7fc980 Mon Sep 17 00:00:00 2001
From: Jim Warner
Date: Wed, 23 Apr 2014 00:00:01 -0500
Subject: [PATCH] top: refactor man document so as to allow translations
The majority of changes in this commit are intended to
enable translation of top's man page. There were three
kinds of errors as seen by that po4a-updatepo program.
. a valid but unrecognized request concerning no-break
. an internally defined macro with a groff .de request
. occasional apostrophe at the beginning of some lines
With respect to the apostrophe, some have been changed
to back-tic since line placement could not be assured.
And other parts were re-flowed to avoid temptations to
escape as \' (technically an acute accent). Of course,
the opening back-tic with closing apostrophe looks odd
when ASCII, but should be rendered correctly as UTF-8.
It may yet be necessary to change the remaining single
'opening' quotes to back-tics as translation proceeds.
Should that become necessary, I intend to reduce quote
usage to the bare minimum throughout the man document.
There were also some formatting changes to enhance the
man2html output and then to other formats via htmldoc.
And, I wish to acknowledge that my meager groff skills
do not serve those programs very well at all. In other
words groff yet remains mostly incomprehensible to me.
Lastly a few content plus copyright updates were made.
Message(s):
. Unknown macro '.c2 `'. Remove it from the document, or refer to the Locale::Po4a::Man manpage to see how po4a can handle new macros.
. This page defines a new macro with '.de'. Since po4a is not a real groff parser, this is not supported.
. Unknown macro ''real time' scheduling priority.'. Remove it from the document, or refer to the Locale::Po4a::Man manpage to see how po4a can handle new macros.
Reference(s):
. oriiginal post/patch
http://www.freelists.org/post/procps/Translations-for-man-pages
Signed-off-by: Jim Warner
---
top/top.1 | 138 ++++++++++++++++++++++++++++++-------------------------------
1 file changed, 69 insertions(+), 69 deletions(-)
diff --git top/top.1 top/top.1
index f25acff..644ae46 100644
--- top/top.1
+++ top/top.1
@@ -1,7 +1,7 @@
.ig
. manual page for NEW and IMPROVED linux top
.
-. Copyright (c) 2002-2013, by: James C. Warner
+. Copyright (c) 2002-2014, by: James C. Warner
. All rights reserved. 8921 Hilloway Road
. Eden Prairie, Minnesota 55347 USA
.
@@ -13,14 +13,6 @@
.
.ll +(\n[half_xtra] + \n[half_xtra])
.
-\# ** we use single quote char (') a lot, so change the no-break ctrl char
-.c2 `
-.
-\# Our own Bullet style(s) --------------------------
-.de jBu
-.IP "o" 3
-..
-.
\# Commonly used strings (for consistency) ----------
\# - our em-dashes
.ds Em \fR\ \-\-\ \fR
@@ -32,11 +24,11 @@
.ds F \fIOff\fR
.ds O \fIOn\fR
.
-.ds AK asterisk (\'*\')
+.ds AK asterisk (`*')
.ds AM alternate\-display mode
.ds AS auxiliary storage
.ds CF configuration file
-.ds CG \'current\' window/field group
+.ds CG `current' window/field group
.ds CI interactive command
\# - Note: our 'Command Line' used in 2 places
\# ( and managed to fit in an 80x24 terminal )
@@ -44,7 +36,7 @@
\-\fBu\fR|\fBU\fR user \-\fBp\fR pid \-\fBo\fR fld \-\fBw\fR [cols] \fR
.ds CO command\-line option
.ds CT command toggle
-.ds CW \'current\' window
+.ds CW `current' window
.ds FG field group
.ds FM full\-screen mode
.ds KA arrow key
@@ -76,7 +68,7 @@
.
.\" Document /////////////////////////////////////////////////////////////
.\" ----------------------------------------------------------------------
-.TH TOP 1 "November 2013" "procps-ng" "User Commands"
+.TH TOP 1 "April 2014" "procps-ng" "User Commands"
.\" ----------------------------------------------------------------------
.\" ----------------------------------------------------------------------
@@ -646,8 +638,8 @@ The process ID (pid) of a task's parent.
.TP 4
16.\fB PR \*(Em Priority \fR
The scheduling priority of the task.
-If you see 'rt' in this field, it means the task is running under
-'real time' scheduling priority.
+If you see 'rt' in this field, it means the task is running
+under 'real time' scheduling priority.
Under linux, real time priority is somewhat misleading since traditionally
the operating itself was not preemptible.
@@ -880,27 +872,27 @@ Entries marked with an asterisk are the currently displayed fields,
screen width permitting.
.RS +4
-.jBu
+.IP \(bu 3
As the on screen instructions indicate, you navigate among the fields with
the\fB Up\fR and\fB Down\fR \*(KAs.
The PgUp, PgDn, Home and End keys can also be used to quickly reach the
first or last available field.
-.jBu
+.IP \(bu 3
The\fB Right\fR \*(KA selects a field for repositioning and
the\fB Left\fR \*(KA or the <\fBEnter\fR> key commits that field's
placement.
-.jBu
+.IP \(bu 3
The '\fBd\fR' key or the <\fBSpace\fR> bar toggles a field's display
status, and thus the presence or absence of the asterisk.
-.jBu
+.IP \(bu 3
The '\fBs\fR' key designates a field as the sort field.
\*(XT 4c. TASK AREA Commands, SORTING for additional information regarding
your selection of a sort field.
-.jBu
+.IP \(bu 3
The '\fBa\fR' and '\fBw\fR' keys can be used to cycle through all available
windows and the '\fBq\fR' or <\fBEsc\fR> keys exit Fields Management.
.RS -4
@@ -982,8 +974,8 @@ those \*(CIs applicable to \*(AM.
Removes restrictions on which tasks are shown.
This command will reverse any 'i' (idle tasks) and 'n' (max tasks)
commands that might be active.
-It also provides for an exit from pid monitoring, 'user' filtering and
-'other' filtering.
+It also provides for an exit from pid monitoring, 'user' filtering
+and 'other' filtering.
See the '\-p' \*(CO for a discussion of PID monitoring, the 'U' or 'u'
\*(CIs for user filtering and the 'O' or 'o' \*(CIs for 'other' filtering.
@@ -1138,7 +1130,7 @@ This \*(CI can be used to alter the widths of the following fields:
SUID 5 SUSER 8 nsMNT 10
UID 5 USER 8 nsNET 10
TTY 8 nsPID 10
- nsUSR 10
+ nsUSER 10
nsUTS 10
.fi
@@ -1268,10 +1260,10 @@ The \*(TA \*(CIs are\fB always\fR available in \*(FM.
The \*(TA \*(CIs are\fB never available\fR in \*(AM\fI if\fR the \*(CW's
\*(TD has been toggled \*F (\*(Xt 5. ALTERNATE\-DISPLAY Provisions).
-.TP 2
+.PP
.\" ..................................................
.B APPEARANCE\fR of \*(TW
-.PD 0
+
.TP 7
\ \ \ \fBJ\fR\ \ :\fIJustify-Numeric-Columns\fR toggle \fR
Alternates between right-justified (the default) and
@@ -1330,7 +1322,7 @@ the state of the 'x', 'y' or 'b' toggles.
.PP
.\" ..................................................
.B CONTENT\fR of \*(TW
-.PD 0
+
.TP 7
\ \ \ \fBc\fR\ \ :\fICommand-Line/Program-Name\fR toggle \fR
This command will be honored whether or not the 'COMMAND' column
@@ -1400,7 +1392,7 @@ mode in the \*(CW.
.PP
.\" ..................................................
.B SIZE\fR of \*(TW
-.PD 0
+
.TP 7
\ \ \ \fBi\fR\ \ :\fIIdle-Process\fR toggle \fR
Displays all tasks or just active tasks.
@@ -1425,10 +1417,12 @@ already been painted.
\*(NT If you wish to increase the size of the last visible \*(TD when in \*(AM,
simply decrease the size of the \*(TD(s) above it.
+.PP
-.TP 2
.\" ..................................................
.B SORTING\fR of \*(TW
+.PP
+.RS +3
For compatibility, this \*(We supports most of the former \*(We sort keys.
Since this is primarily a service to former \*(We users, these commands do
not appear on any help screen.
@@ -1462,10 +1456,8 @@ Moves the sort column to the right unless the current sort field is
the last field being displayed.
.PP
-.in +2
The following \*(CIs will\fB always\fR be honored whether or not
the current sort field is visible.
-.in
.TP 7
\ \ \ \fBf\fR | \fBF\fR\ \ :\fIFields-Management \fR
@@ -1479,10 +1471,9 @@ when running \*(We with column highlighting turned \*F.
Using this \*(CI you can alternate between high-to-low and low-to-high sorts.
.PP
-.in +2
\*(NT Field sorting uses internal values, not those in column display.
Thus, the TTY and WCHAN fields will violate strict ASCII collating sequence.
-.in
+.RE
.\" ......................................................................
.SS 4d. COLOR Mapping
@@ -1515,6 +1506,7 @@ The Color Mapping screen can also be used to change the \*(CG in
either \*(FM or \*(AM.
Whatever was targeted when 'q' or <Enter> was pressed will be made current
as you return to the \*(We display.
+.PP
.\" ----------------------------------------------------------------------
.SH 5. ALTERNATE\-DISPLAY Provisions
@@ -1537,6 +1529,7 @@ The \*(SA will always exist, even if it's only the message line.
At any given time only\fI one\fR \*(SA can be displayed.
However, depending on your commands, there could be from\fI zero \fR
to\fI four\fR separate \*(TDs currently showing on the screen.
+.PP
.TP 3
.B Current Window\fR:
@@ -1578,9 +1571,9 @@ and horizontal scrolling.
The '+' key does the same for all windows.
The four \*(TDs will reappear, evenly balanced.
-They will also have retained any customizations you had previously applied,
-except for the 'i' (idle tasks), 'n' (max tasks), 'u'/'U' (user filter),
-'o'/'O' (other filter) and scrolling \*(CIs.
+They will also have retained any customizations you had previously
+applied, except for the 'i' (idle tasks), 'n' (max tasks), 'u'/'U'
+(user filter), 'o'/'O' (other filter) and scrolling \*(CIs.
.TP 7
*\ \ \fBA\fR\ \ :\fIAlternate-Display-Mode\fR toggle \fR
@@ -1619,9 +1612,9 @@ It does not require that the window name be visible
.IP "*" 3
The \*(CIs shown with an \*(AK have use beyond \*(AM.
.nf
- \'=', 'A', 'g' are always available
- \'a', 'w' act the same with color mapping
- \ and fields management
+ '=', 'A', 'g' are always available
+ 'a', 'w' act the same with color mapping
+ and fields management
.fi
.\" ......................................................................
@@ -1790,28 +1783,31 @@ a mistake, command recall will be your friend.
Remember the Up/Down \*(KAs or their aliases when prompted for input.
.B Filter Basics
-.IP " . " 6
-field names are case sensitive and spelled as in the header
-.IP " . " 6
-selection values need not comprise the full displayed field
-.IP " . " 6
-a selection is either case insensitive or sensitive to case
-.IP " . " 6
-the default is inclusion, prepending '!' denotes exclusions
-.IP " . " 6
-multiple selection criteria can be applied to a \*(TW
-.IP " . " 6
-inclusion and exclusion criteria can be used simultaneously
-.IP " . " 6
-the 1 equality and 2 relational filters can be freely mixed
-.IP " . " 6
-separate unique filters are maintained for each \*(TW
-.RE
+.RS +3
+.TP 3
+1. field names are case sensitive and spelled as in the header
+.TP 3
+2. selection values need not comprise the full displayed field
+.TP 3
+3. a selection is either case insensitive or sensitive to case
+.TP 3
+4. the default is inclusion, prepending '!' denotes exclusions
+.TP 3
+5. multiple selection criteria can be applied to a \*(TW
+.TP 3
+6. inclusion and exclusion criteria can be used simultaneously
+.TP 3
+7. the 1 equality and 2 relational filters can be freely mixed
+.TP 3
+8. separate unique filters are maintained for each \*(TW
+.PP
If a field is not turned on or is not currently in view, then your selection
criteria will not affect the display.
Later, should a filtered field become visible, the selection criteria will
then be applied.
+.PP
+.RE
.B Keyboard Summary
.TP 6
@@ -1838,6 +1834,7 @@ It also has additional impact so please \*(Xt 4a. GLOBAL Commands.
This clears the selection criteria in all windows, assuming you are in \*(AM.
As with the '=' \*(CI, it too has additional consequences so you might wish to
\*(Xt 5b. COMMANDS for Windows.
+.PP
.RE
.B Input Requirements
@@ -1867,16 +1864,17 @@ with homogeneous data.
When some field's numeric amounts have been subjected to \fIscaling\fR
while others have not, that data is no longer homogeneous.
-If you establish a relational filter and you \fBhave\fR changed the default
-'Numeric' or 'Character' \fIjustification\fR, that filter is likely to fail.
+If you establish a relational filter and you \fBhave\fR changed the
+default 'Numeric' or 'Character' \fIjustification\fR, that filter is likely to fail.
When a relational filter is applied to a memory field and you \fBhave not\fR
changed the \fIscaling\fR, it may produce misleading results.
-This happens, for example, because '100.0m' (MiB) would appear greater than
-'1.000g' (GiB) when compared as strings.
+This happens, for example, because '100.0m' (MiB) would appear greater
+than '1.000g' (GiB) when compared as strings.
If your filtered results appear suspect, simply altering justification or
scaling may yet achieve the desired objective.
See the 'j', 'J' and 'e' \*(CIs for additional information.
+.PP
.RE
.B Potential Problems
@@ -1904,6 +1902,7 @@ So while amounts greater than 9999 exist, they will appear as 2.6m, 197k, etc.
.nf
nMin>9999 ( always a blank \*(TW )
.fi
+.PP
.RE
.B Potential Solutions
@@ -1940,13 +1939,14 @@ achieve the failed '9999' objective discussed above.
'PR>20' + '!PR=-' ( 2 for right result )
'!nMin=0 ' + '!nMin=1 ' + '!nMin=2 ' + '!nMin=3 ' ...
.fi
-.RE
+.RS -3
\*(NT When 'Other Filtering' is active, \*(We turns column highlighting
\*F to prevent false matches on internal non-display escape sequences.
Such highlighting will be restored when a window is no longer subject
to filtering.
\*(XC 'x' \*(CI for additional information on sort column highlighting.
+.RE
.\" ----------------------------------------------------------------------
.SH 6. FILES
@@ -1990,7 +1990,7 @@ Here is the general layout:
per ea # line a: winname,fieldscur
window # line b: winflags,sortindx,maxtasks
" # line c: summclr,msgsclr,headclr,taskclr
- global # line 15: fixed-width incr
+ global # line 15: width, memory scaling & zeroes overrides
" # any remaining lines are devoted to the
" # generalized 'inspect' provisions
" # discussed below
@@ -2132,7 +2132,7 @@ the authority.
For these stupid tricks, \*(We needs \*(FM.
.\" ( apparently AM static was a potential concern )
-.jBu
+.IP \(bu 3
The user interface, through prompts and help, intentionally implies
that the delay interval is limited to tenths of a second.
However, you're free to set any desired delay.
@@ -2155,7 +2155,7 @@ Then do the following:
What you'll see is a very busy Linux doing what he's always done for you,
but there was no program available to illustrate this.
-.jBu
+.IP \(bu 3
Under an xterm using 'white-on-black' colors, on \*(We's Color Mapping screen
set the task color to black and be sure that task highlighting is set to bold,
not reverse.
@@ -2164,7 +2164,7 @@ Then set the delay interval to around .3 seconds.
After bringing the most active processes into view, what you'll see are
the ghostly images of just the currently running tasks.
-.jBu
+.IP \(bu 3
Delete the existing rcfile, or create a new symlink.
Start this new version then type 'T' (a secret key,
\*(Xt 4c. Task Area Commands, SORTING) followed by 'W' and 'q'.
@@ -2180,19 +2180,19 @@ on whether or not \*(We will ever reach the \*(We.
.\" ----------------------------------------------------------------------
For these stupid tricks, \*(We needs \*(AM.
-.jBu
+.IP \(bu 3
With 3 or 4 \*(TDs visible, pick any window other than the last
and turn idle processes \*F using the 'i' \*(CT.
Depending on where you applied 'i', sometimes several \*(TDs are bouncing and
sometimes it's like an accordion, as \*(We tries his best to allocate space.
-.jBu
+.IP \(bu 3
Set each window's summary lines differently: one with no memory ('m'); another
with no states ('t'); maybe one with nothing at all, just the message line.
Then hold down 'a' or 'w' and watch a variation on bouncing windows \*(Em
hopping windows.
-.jBu
+.IP \(bu 3
Display all 4 windows and for each, in turn, set idle processes to \*F using
the 'i' \*(CT.
You've just entered the "extreme bounce" zone.
@@ -2202,7 +2202,7 @@ You've just entered the "extreme bounce" zone.
.\" ----------------------------------------------------------------------
This stupid trick also requires \*(AM.
-.jBu
+.IP \(bu 3
Display all 4 windows and make sure that 1:Def is the \*(CW.
Then, keep increasing window size with the 'n' \*(CI until all the other
\*(TDs are "pushed out of the nest".
@@ -2219,7 +2219,7 @@ Then ponder this:
This stupid trick works best without \*(AM, since justification is active
on a per window basis.
-.jBu
+.IP \(bu 3
Start \*(We and make COMMAND the last (rightmost) column displayed.
If necessary, use the 'c' \*(CT to display command lines and ensure
that forest view mode is active with the 'V' \*(CT.
--
1.7.9.2
++++++ 0053-top-minimize-the-usage-of-apostrophes-in-man-documen.patch ++++++
++++ 614 lines (skipped)
++++++ 0054-top-swap-opening-quotes-for-back-tics-in-man-documen.patch ++++++
++++ 1056 lines (skipped)
++++++ 0055-misc-fix-man-doc-spelling-and-grammar-for-translatio.patch ++++++
From ada443268e7f8c4526e6b048c98457679665b727 Mon Sep 17 00:00:00 2001
From: Jim Warner
Date: Wed, 23 Apr 2014 00:00:04 -0500
Subject: [PATCH] misc: fix man doc spelling and grammar for translation
Signed-off-by: Jim Warner
---
ps/ps.1 | 2 +-
sysctl.8 | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git ps/ps.1 ps/ps.1
index cdb7536..90f12ac 100644
--- ps/ps.1
+++ ps/ps.1
@@ -1683,7 +1683,7 @@ number of kernel threads owned by the process.
T}
tid TID T{
-the unique number representing a dispatacable entity (alias
+the unique number representing a dispatchable entity (alias
.BR lwp , \ spid ).
This value may also appear as: a process ID (pid); a process group ID (pgrp);
a session ID for the session leader (sid); a thread group ID for the thread
diff --git sysctl.8 sysctl.8
index faf2255..a74b2d7 100644
--- sysctl.8
+++ sysctl.8
@@ -63,8 +63,8 @@ Load in sysctl settings from the file specified or /etc/sysctl.conf if none
given. Specifying \- as filename means reading data from standard input.
Using this option will mean arguments to
.B sysctl
-are files, which are read in order they are specified. The file argument can
-may be specified as reqular expression.
+are files, which are read in the order they are specified.
+The file argument may be specified as reqular expression.
.TP
\fB\-a\fR, \fB\-\-all\fR
Display all values currently available.
@@ -112,10 +112,10 @@ Alias of \fB\-p\fR
Alias of \fB\-a\fR
.TP
\fB\-o\fR
-Does nothing in favour of BSD compatibility.
+Does nothing, exists for BSD compatibility.
.TP
\fB\-x\fR
-Does nothing in favour of BSD compatibility.
+Does nothing, exists for BSD compatibility.
.TP
\fB\-h\fR, \fB\-\-help\fR
Display help text and exit.
--
1.7.9.2
++++++ 0058-library-reverting-tmpfs-subtraction-from-cached-18-F.patch ++++++
Based on 2f96eef7f86a12b81badef1c91ec2d503ae4029d Mon Sep 17 00:00:00 2001
From: Jaromir Capik
Date: Wed, 30 Apr 2014 13:59:34 +0200
Subject: [PATCH] library: reverting tmpfs subtraction from cached
(18-FEB-2014)
The subtraction was marked as reinforcing the misconception,
that memory in the page cache can be considered free.
The Cached value is not a sum of page cache and tmpfs,
as the tmpfs memory lives in the page cache and therefore
it's an inseparable part of it.
---
free.1 | 4 +---
proc/sysinfo.c | 2 --
vmstat.8 | 3 +--
3 files changed, 2 insertions(+), 7 deletions(-)
diff --git free.1 free.1
index 21cce28..85efef8 100644
--- free.1
+++ free.1
@@ -32,9 +32,7 @@ kernels 2.6.32, displayed as zero if not available)
Memory used by kernel buffers (Buffers in /proc/meminfo)
.TP
\fBcached\fR
-Memory used by the page cache (calculated as Cached - Shmem in
-/proc/meminfo - the Cached value is actually the sum of page cache and
-tmpfs memory)
+Memory used by the page cache (Cached in /proc/meminfo)
.SH OPTIONS
.TP
\fB\-b\fR, \fB\-\-bytes\fR
diff --git proc/sysinfo.c proc/sysinfo.c
index e07ca86..85fb0a4 100644
--- proc/sysinfo.c
+++ proc/sysinfo.c
@@ -688,8 +688,6 @@ nextline:
kb_main_used = 0;
}
kb_main_cached += kb_swap_reclaimable + kb_swap_cached + kb_nfs_unstable;
- /* "Cached" includes "Shmem" - we want only the page cache here */
- kb_main_cached -= kb_main_shared;
}
/*****************************************************************/
diff --git vmstat.8 vmstat.8
index 2782a42..420d9f3 100644
--- vmstat.8
+++ vmstat.8
@@ -102,8 +102,7 @@ b: The number of processes in uninterruptible sleep.
swpd: the amount of virtual memory used.
free: the amount of idle memory.
buff: the amount of memory used as buffers.
-cache: the amount of memory used as cache (excluding tmpfs memory for
-kernels 2.6.32+)
+cache: the amount of memory used as cache.
inact: the amount of inactive memory. (\-a option)
active: the amount of active memory. (\-a option)
.fi
--
1.7.9.2
++++++ 0060-top-miscellaneous-accumulated-changes-to-man-documen.patch ++++++
From 444fa7102b7f130734e35b45ce86fcc15d307a71 Mon Sep 17 00:00:00 2001
From: Jim Warner
Date: Wed, 7 May 2014 00:00:00 -0500
Subject: [PATCH] top: miscellaneous accumulated changes to man document
Signed-off-by: Jim Warner
---
top/top.1 | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git top/top.1 top/top.1
index 67b8b35..5ce405e 100644
--- top/top.1
+++ top/top.1
@@ -1062,7 +1062,7 @@ Otherwise, \*(We displays a summation of all threads in each process.
.TP 7
\ \ \ \fBI\fR\ \ :\fIIrix/Solaris-Mode\fR toggle \fR
-When operating in Solaris mode ('I' toggled \*F), a task's \*(Pu usage
+When operating in Solaris mode (`I' toggled \*F), a task's \*(Pu usage
will be divided by the total number of \*(PUs.
After issuing this command, you'll be told the new state of this toggle.
@@ -1216,7 +1216,7 @@ This command affects from 2 to many \*(SA lines, depending on the state
of the `1', `2' or `3' \*(CTs and whether or not \*(We is running under
true SMP.
-This portion of the \*(SA is also influenced by the 'H' \*(CI toggle,
+This portion of the \*(SA is also influenced by the `H' \*(CI toggle,
as reflected in the total label which shows either Tasks or Threads.
.TP 7
@@ -1856,7 +1856,7 @@ These examples use spaces for clarity but your input generally would not.
Items #1, #3 and #4 should be self\-explanatory.
Item \fB#2\fR represents both a required \fIdelimiter\fR and the \fIoperator\fR
-which must be one of either equality ('=') or relation ('<' or `>').
+which must be one of either equality (`=') or relation (`<' or `>').
The `=' equality operator requires only a partial match and that
can reduce your `if\-value' input requirements.
@@ -2229,7 +2229,7 @@ If necessary, use the `c' \*(CT to display command lines and ensure
that forest view mode is active with the `V' \*(CT.
Then use the up/down arrow keys to position the display so that some
-truncated command lines are shown ('+' in last position).
+truncated command lines are shown (`+' in last position).
You may have to resize your xterm to produce truncation.
Lastly, use the `j' \*(CT to make the COMMAND column right justified.
--
1.7.9.2
++++++ procps-ng-3.3.8-bnc634071_procstat2.diff ++++++
--- /var/tmp/diff_new_pack.rjAhlH/_old 2014-05-27 07:09:03.000000000 +0200
+++ /var/tmp/diff_new_pack.rjAhlH/_new 2014-05-27 07:09:03.000000000 +0200
@@ -1,232 +1,62 @@
---- proc/ksym.c
-+++ proc/ksym.c 2012-06-04 10:06:03.792202072 +0000
-@@ -41,7 +41,7 @@
- #define KSYMS_FILENAME "/would/be/nice/to/have/this/file"
- #define SYSMAP_FILENAME "/home/albert/ps/45621/System.map-hacked"
- #define linux_version_code 131598 /* ? */
--#define smp_num_cpus 2
-+#define smp_num_cpus() 2
- #endif
-
- #if 0
-@@ -49,7 +49,7 @@
- #define KSYMS_FILENAME "/home/albert/ps/45621/ksyms-2.3.12"
- #define SYSMAP_FILENAME "/home/albert/ps/45621/System.map-2.3.12"
- #define linux_version_code 131852 /* 2.3.12 */
--#define smp_num_cpus 2
-+#define smp_num_cpus() 2
- #endif
-
- #if 0
-@@ -57,7 +57,7 @@
- #define KSYMS_FILENAME "/home/albert/ps/45621/ksyms-2.3.18ac8-MODVERS"
- #define SYSMAP_FILENAME "/home/albert/ps/45621/System.map-2.3.18ac8-MODVERS"
- #define linux_version_code 131858 /* 2.3.18ac8 */
--#define smp_num_cpus 2
-+#define smp_num_cpus() 2
- #endif
-
- #if 0
-@@ -65,7 +65,7 @@
- #define KSYMS_FILENAME "/home/albert/ps/45621/ksyms-2.3.18ac8-NOMODVERS"
- #define SYSMAP_FILENAME "/home/albert/ps/45621/System.map-2.3.18ac8-NOMODVERS"
- #define linux_version_code 131858 /* 2.3.18ac8 */
--#define smp_num_cpus 2
-+#define smp_num_cpus() 2
- #endif
-
- /* These are the symbol types, with relative popularity:
+--- proc/libprocps.sym
++++ proc/libprocps.sym 2014-05-16 10:01:38.446310070 +0000
+@@ -57,6 +57,7 @@ global:
+ signal_name_to_number;
+ signal_number_to_name;
+ smp_num_cpus;
++ __smp_num_cpus;
+ sprint_uptime;
+ strtosig;
+ tty_to_dev;
--- proc/sysinfo.c
+++ proc/sysinfo.c 2013-05-29 11:26:47.797640941 +0000
-@@ -37,8 +37,6 @@
+@@ -37,7 +37,8 @@
#include /* htons */
#endif
-long smp_num_cpus; /* number of CPUs */
--
++#undef smp_num_cpus
++long smp_num_cpus = -1; /* number of CPUs */
+
#define BAD_OPEN_MESSAGE \
"Error: /proc must be mounted\n" \
- " To mount /proc at boot you need an /etc/fstab line like:\n" \
-@@ -200,7 +198,7 @@ static void old_Hertz_hack(void){
- free(savelocale);
- jiffies = user_j + nice_j + sys_j + other_j + wait_j + hirq_j + sirq_j + stol_j ;
- seconds = (up_1 + up_2) / 2;
-- h = (unsigned)( (double)jiffies/seconds/smp_num_cpus );
-+ h = (unsigned)( (double)jiffies/seconds/smp_num_cpus() );
- /* actual values used by 2.4 kernels: 32 64 100 128 1000 1024 1200 */
- switch(h){
- case 9 ... 11 : Hertz = 10; break; /* S/390 (sometimes) */
-@@ -271,8 +269,6 @@ static void init_libproc(void){
- have_privs = check_for_privs();
- init_Linux_version(); /* Must be called before we check code */
-
-- cpuinfo();
--
- #ifdef __linux__
- if(linux_version_code > LINUX_VERSION(2, 4, 0)){
- Hertz = find_elf_note(AT_CLKTCK);
-@@ -1012,7 +1008,12 @@ out:
+@@ -1012,7 +1012,11 @@ out:
///////////////////////////////////////////////////////////////////////////
-void cpuinfo (void) {
-+long smp_num_cpus (void) {
-+ static long _smp_num_cpus=-1;
++long __smp_num_cpus (void) {
+
-+ if (_smp_num_cpus != -1)
-+ return(_smp_num_cpus);
++ if (smp_num_cpus != -1)
++ return(smp_num_cpus);
+
// ought to count CPUs in /proc/stat instead of relying
// on glibc, which foolishly tries to parse /proc/cpuinfo
// note: that may have been the case but now /proc/stat
-@@ -1024,7 +1025,9 @@ void cpuinfo (void) {
+@@ -1024,7 +1029,11 @@ void cpuinfo (void) {
// _SC_NPROCESSORS_CONF returns 2, resulting in HZ=512
// _SC_NPROCESSORS_ONLN returns 1, which should work OK
- smp_num_cpus = sysconf(_SC_NPROCESSORS_ONLN);
- if (smp_num_cpus<1) /* SPARC glibc is buggy */
- smp_num_cpus=1;
-+ _smp_num_cpus = sysconf(_SC_NPROCESSORS_ONLN);
-+ if (_smp_num_cpus<1) /* SPARC glibc is buggy */
-+ _smp_num_cpus=1;
++ smp_num_cpus = sysconf(_SC_NPROCESSORS_ONLN);
++ if (smp_num_cpus<1) /* SPARC glibc is buggy */
++ smp_num_cpus=1;
+
-+ return _smp_num_cpus;
++ return smp_num_cpus;
}
++
++void cpuinfo (void) { (void)__smp_num_cpus(); }
--- proc/sysinfo.h
+++ proc/sysinfo.h 2012-06-04 10:04:15.812509959 +0000
-@@ -7,7 +7,7 @@
+@@ -7,7 +7,8 @@
EXTERN_C_BEGIN
extern unsigned long long Hertz; /* clock tick frequency */
-extern long smp_num_cpus; /* number of CPUs */
-+extern long smp_num_cpus(void); /* number of CPUs */
++extern long __smp_num_cpus(void); /* number of CPUs */
++#define smp_num_cpus __smp_num_cpus()
extern int have_privs; /* boolean, true if setuid or similar */
#if 0
-@@ -137,7 +137,5 @@ extern unsigned int getslabinfo (struct
-
- extern unsigned get_pid_digits(void) FUNCTION;
-
--extern void cpuinfo (void);
--
- EXTERN_C_END
- #endif /* SYSINFO_H */
---- top/top.c
-+++ top/top.c 2013-05-29 11:28:34.945439635 +0000
-@@ -411,7 +411,7 @@ static void bye_bye (const char *str) {
- , LINUX_VERSION_PATCH(linux_version_code)
- , procps_version
- , (unsigned)Hertz, (unsigned)sizeof(Hertz), (unsigned)sizeof(Hertz) * 8
-- , Page_size, Cpu_faux_tot, (int)smp_num_cpus, (unsigned)sizeof(CPU_t)
-+ , Page_size, Cpu_faux_tot, (int)smp_num_cpus(), (unsigned)sizeof(CPU_t)
- , (unsigned)sizeof(HST_t), Page_size / (unsigned)sizeof(HST_t), HHist_siz
- , (unsigned)sizeof(proc_t), (unsigned)sizeof(p->cmd), (unsigned)sizeof(proc_t*)
- , (long)Frames_libflags
-@@ -2230,7 +2230,7 @@ static void zap_fieldstab (void) {
- /*** hotplug_acclimated ***/
-
- Fieldstab[P_CPN].width = 1;
-- if (1 < (digits = (unsigned)snprintf(buf, sizeof(buf), "%u", (unsigned)smp_num_cpus))) {
-+ if (1 < (digits = (unsigned)snprintf(buf, sizeof(buf), "%u", (unsigned)smp_num_cpus()))) {
- if (5 < digits) error_exit(N_txt(FAIL_widecpu_txt));
- Fieldstab[P_CPN].width = digits;
- }
-@@ -2238,9 +2238,9 @@ static void zap_fieldstab (void) {
- #ifdef BOOST_PERCNT
- Cpu_pmax = 99.9;
- Fieldstab[P_CPU].width = 5;
-- if (Rc.mode_irixps && smp_num_cpus > 1 && !Thread_mode) {
-- Cpu_pmax = 100.0 * smp_num_cpus;
-- if (smp_num_cpus > 10) {
-+ if (Rc.mode_irixps && smp_num_cpus() > 1 && !Thread_mode) {
-+ Cpu_pmax = 100.0 * smp_num_cpus();
-+ if (smp_num_cpus() > 10) {
- if (Cpu_pmax > 99999.0) Cpu_pmax = 99999.0;
- } else {
- if (Cpu_pmax > 999.9) Cpu_pmax = 999.9;
-@@ -2249,9 +2249,9 @@ static void zap_fieldstab (void) {
- #else
- Cpu_pmax = 99.9;
- Fieldstab[P_CPU].width = 4;
-- if (Rc.mode_irixps && smp_num_cpus > 1 && !Thread_mode) {
-- Cpu_pmax = 100.0 * smp_num_cpus;
-- if (smp_num_cpus > 10) {
-+ if (Rc.mode_irixps && smp_num_cpus() > 1 && !Thread_mode) {
-+ Cpu_pmax = 100.0 * smp_num_cpus();
-+ if (smp_num_cpus() > 10) {
- if (Cpu_pmax > 99999.0) Cpu_pmax = 99999.0;
- } else {
- if (Cpu_pmax > 999.9) Cpu_pmax = 999.9;
-@@ -2294,8 +2294,8 @@ static void zap_fieldstab (void) {
- * 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) {
-- #define sumSLOT ( smp_num_cpus )
-- #define totSLOT ( 1 + smp_num_cpus + Numa_node_tot)
-+ #define sumSLOT ( smp_num_cpus() )
-+ #define totSLOT ( 1 + smp_num_cpus() + Numa_node_tot)
- static FILE *fp = NULL;
- static int siz, sav_slot = -1;
- static char *buf;
-@@ -2358,7 +2358,7 @@ static CPU_t *cpus_refresh (CPU_t *cpus)
- we'll force it to be treated as 'idle' so as not to present misleading
- percentages. */
- cpus[sumSLOT].edge =
-- ((cpus[sumSLOT].cur.tot - cpus[sumSLOT].sav.tot) / smp_num_cpus) / (100 / TICS_EDGE);
-+ ((cpus[sumSLOT].cur.tot - cpus[sumSLOT].sav.tot) / smp_num_cpus()) / (100 / TICS_EDGE);
- #endif
-
- #ifndef NUMA_DISABLE
-@@ -2496,7 +2496,7 @@ static void procs_hlp (proc_t *this) {
- oldtimev.tv_usec = timev.tv_usec;
-
- // if in Solaris mode, adjust our scaling for all cpus
-- Frame_etscale = 100.0f / ((float)Hertz * (float)et * (Rc.mode_irixps ? 1 : smp_num_cpus));
-+ Frame_etscale = 100.0f / ((float)Hertz * (float)et * (Rc.mode_irixps ? 1 : smp_num_cpus()));
- #ifdef OFF_HST_HASH
- maxt_sav = Frame_maxtask;
- #endif
-@@ -2649,8 +2649,7 @@ static void sysinfo_refresh (int forced)
- #ifndef PRETEND8CPUS
- /*** hotplug_acclimated ***/
- if (300 <= cur_secs - cpu_secs) {
-- cpuinfo();
-- Cpu_faux_tot = smp_num_cpus;
-+ Cpu_faux_tot = smp_num_cpus();
- cpu_secs = cur_secs;
- #ifndef NUMA_DISABLE
- if (Libnuma_handle)
-@@ -3219,9 +3219,8 @@ static void before (char *me) {
-
- // establish cpu particulars
- #ifdef PRETEND8CPUS
-- smp_num_cpus = 8;
-+ Cpu_faux_tot = 8;
- #endif
-- Cpu_faux_tot = smp_num_cpus;
- Cpu_States_fmts = N_unq(STATE_lin2x4_fmt);
- if (linux_version_code > LINUX_VERSION(2, 5, 41))
- Cpu_States_fmts = N_unq(STATE_lin2x5_fmt);
-@@ -5020,19 +5019,19 @@ 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(&smpcpu[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++) {
- if (!isROOM(anyFLG, 1)) break;
- snprintf(tmp, sizeof(tmp), N_fmt(NUMA_nodenam_fmt), i);
-- summary_hlp(&smpcpu[1 + smp_num_cpus + i], tmp);
-+ summary_hlp(&smpcpu[1 + smp_num_cpus() + i], tmp);
- Msg_row += 1;
- }
- } 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(&smpcpu[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) {
++++++ procps-ng-3.3.8-top.1.diff ++++++
--- /var/tmp/diff_new_pack.rjAhlH/_old 2014-05-27 07:09:03.000000000 +0200
+++ /var/tmp/diff_new_pack.rjAhlH/_new 2014-05-27 07:09:03.000000000 +0200
@@ -9,37 +9,3 @@
.
.ll +(\n[half_xtra] + \n[half_xtra])
.
-@@ -32,11 +32,11 @@
- .ds F \fIOff\fR
- .ds O \fIOn\fR
- .
--.ds AK asterisk (\'*\')
-+.ds AK asterisk ('*')
- .ds AM alternate\-display mode
- .ds AS auxiliary storage
- .ds CF configuration file
--.ds CG \'current\' window/field group
-+.ds CG 'current' window/field group
- .ds CI interactive command
- \# - Note: our 'Command Line' used in 2 places
- \# ( and managed to fit in an 80x24 terminal )
-@@ -44,7 +44,7 @@
- \-\fBu\fR|\fBU\fR user \-\fBp\fR pid \-\fBo\fR fld \-\fBw\fR [cols] \fR
- .ds CO command\-line option
- .ds CT command toggle
--.ds CW \'current\' window
-+.ds CW 'current' window
- .ds FG field group
- .ds FM full\-screen mode
- .ds KA arrow key
-@@ -1578,8 +1578,8 @@ It does not require that the window name
- .IP "*" 3
- The \*(CIs shown with an \*(AK have use beyond \*(AM.
- .Bd -literal -compact
-- \'=', 'A', 'g' are always available
-- \'a', 'w' act the same with color mapping
-+ '=', 'A', 'g' are always available
-+ 'a', 'w' act the same with color mapping
- \ and fields management
- .Ed
-
++++++ procps-ng-3.3.9-w-notruncate.diff ++++++
--- w.c
+++ w.c 2014-05-15 13:26:57.162238550 +0000
@@ -451,6 +451,7 @@ static void __attribute__ ((__noreturn__
fputs(_(" -h, --no-header do not print header\n"),out);
fputs(_(" -u, --no-current ignore current process username\n"),out);
fputs(_(" -s, --short short format\n"),out);
+ fputs(_(" -n, --no-truncat non truncated listing (large)\n"),out);
fputs(_(" -f, --from show remote hostname field\n"),out);
fputs(_(" -o, --old-style old style output\n"),out);
fputs(_(" -i, --ip-addr display IP address instead of hostname (if possible)\n"), out);
@@ -487,6 +488,7 @@ int main(int argc, char **argv)
{"no-header", no_argument, NULL, 'h'},
{"no-current", no_argument, NULL, 'u'},
{"short", no_argument, NULL, 's'},
+ {"no-truncat", no_argument, NULL, 'n'},
{"from", no_argument, NULL, 'f'},
{"old-style", no_argument, NULL, 'o'},
{"ip-addr", no_argument, NULL, 'i'},
++++++ procps-ng-3.3.8-watch.patch -> procps-ng-3.3.9-watch.patch ++++++
--- /work/SRC/openSUSE:Factory/procps/procps-ng-3.3.8-watch.patch 2013-06-05 13:35:01.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.procps.new/procps-ng-3.3.9-watch.patch 2014-05-27 07:09:00.000000000 +0200
@@ -1,6 +1,6 @@
--- configure.ac
-+++ configure.ac 2013-05-29 10:45:47.473939111 +0000
-@@ -69,7 +69,7 @@ AC_FUNC_MMAP
++++ configure.ac 2013-05-29 10:45:47.000000000 +0000
+@@ -70,7 +70,7 @@ AC_FUNC_MMAP
AC_FUNC_REALLOC
AC_FUNC_STRTOD
@@ -10,10 +10,10 @@
AM_GNU_GETTEXT_VERSION([0.14.1])
--- proc/libprocps.sym
-+++ proc/libprocps.sym 2013-05-29 10:46:13.165439719 +0000
-@@ -12,6 +12,7 @@ global:
- free_slabinfo;
- freeproc;
++++ proc/libprocps.sym 2014-05-15 13:16:40.950235845 +0000
+@@ -14,6 +14,7 @@ global:
+ get_ns_id;
+ get_ns_name;
get_pid_digits;
+ get_proc_stats;
get_slabinfo;
++++++ procps-ng-3.3.8.tar.xz -> procps-ng-3.3.9.tar.xz ++++++
++++ 17205 lines of diff (skipped)
++++++ procps-v3.3.4-large_pcpu.patch ++++++
--- /var/tmp/diff_new_pack.rjAhlH/_old 2014-05-27 07:09:03.000000000 +0200
+++ /var/tmp/diff_new_pack.rjAhlH/_new 2014-05-27 07:09:03.000000000 +0200
@@ -2,16 +2,16 @@
+++ top/top.c 2012-10-30 11:34:42.634844811 +0000
@@ -1910,8 +1910,15 @@ static void zap_fieldstab (void) {
Fieldstab[P_CPU].width = 5;
- if (Rc.mode_irixps && smp_num_cpus() > 1 && !Thread_mode) {
- Cpu_pmax = 100.0 * smp_num_cpus();
-- if (smp_num_cpus() > 10) {
-+ if (smp_num_cpus() > 1000) {
+ if (Rc.mode_irixps && smp_num_cpus > 1 && !Thread_mode) {
+ Cpu_pmax = 100.0 * smp_num_cpus;
+- if (smp_num_cpus > 10) {
++ if (smp_num_cpus > 1000) {
+ if (Cpu_pmax > 9999999.0) Cpu_pmax = 9999999.0;
+ Fieldstab[P_CPU].width = 8;
-+ } else if (smp_num_cpus() > 100) {
++ } else if (smp_num_cpus > 100) {
+ if (Cpu_pmax > 999999.0) Cpu_pmax = 999999.0;
+ Fieldstab[P_CPU].width = 7;
-+ } else if (smp_num_cpus() > 10) {
++ } else if (smp_num_cpus > 10) {
if (Cpu_pmax > 99999.0) Cpu_pmax = 99999.0;
+ Fieldstab[P_CPU].width = 6;
} else {
@@ -19,16 +19,16 @@
}
@@ -1921,12 +1928,18 @@ static void zap_fieldstab (void) {
Fieldstab[P_CPU].width = 4;
- if (Rc.mode_irixps && smp_num_cpus() > 1 && !Thread_mode) {
- Cpu_pmax = 100.0 * smp_num_cpus();
-- if (smp_num_cpus() > 10) {
-+ if (smp_num_cpus() > 1000) {
+ if (Rc.mode_irixps && smp_num_cpus > 1 && !Thread_mode) {
+ Cpu_pmax = 100.0 * smp_num_cpus;
+- if (smp_num_cpus > 10) {
++ if (smp_num_cpus > 1000) {
+ if (Cpu_pmax > 9999999.0) Cpu_pmax = 9999999.0;
+ Fieldstab[P_CPU].width = 7;
-+ } else if (smp_num_cpus() > 100) {
++ } else if (smp_num_cpus > 100) {
+ if (Cpu_pmax > 999999.0) Cpu_pmax = 999999.0;
+ Fieldstab[P_CPU].width = 6;
-+ } else if (smp_num_cpus() > 10) {
++ } else if (smp_num_cpus > 10) {
if (Cpu_pmax > 99999.0) Cpu_pmax = 99999.0;
+ Fieldstab[P_CPU].width = 5;
} else {
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org