Hello community,
here is the log from the commit of package procps for openSUSE:Factory checked in at 2012-06-07 15:39:23
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/procps (Old)
and /work/SRC/openSUSE:Factory/.procps.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "procps", Maintainer is "werner@suse.com"
Changes:
--------
--- /work/SRC/openSUSE:Factory/procps/procps.changes 2011-12-21 14:58:19.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.procps.new/procps.changes 2012-06-07 15:39:29.000000000 +0200
@@ -1,0 +2,150 @@
+Wed Jun 6 12:00:54 UTC 2012 - werner@suse.de
+
+- Avoid to be fooled by a former errno due not existing system
+ file as this might cause failing pwdx
+
+-------------------------------------------------------------------
+Wed Jun 6 11:43:55 UTC 2012 - werner@suse.de
+
+- Avoid UNKNOWN version due git checkout, use tag version
+
+-------------------------------------------------------------------
+Wed Jun 6 11:17:37 UTC 2012 - werner@suse.de
+
+- Make our w-notruncate patch file lines dynamically that is use
+ the string and not the umtp field lengths
+
+-------------------------------------------------------------------
+Wed Jun 6 10:35:41 UTC 2012 - werner@suse.de
+
+- Make /bin -> /usr/bin a %bcond
+
+-------------------------------------------------------------------
+Wed Jun 6 09:44:35 UTC 2012 - werner@suse.de
+
+- Allow SUSE specific pmap to list results for more than one pid
+
+-------------------------------------------------------------------
+Wed Jun 6 09:30:13 UTC 2012 - werner@suse.de
+
+- Make SUSE specific pmap smart, that is detect only new entries
+ in smaps if environment variable MALLOC_CHECK_ is set, for
+ older kernels ignore entries which are not found.
+
+-------------------------------------------------------------------
+Tue Jun 5 12:35:19 UTC 2012 - werner@suse.de
+
+- For legacy readd SUSE specific pmap
+
+-------------------------------------------------------------------
+Mon Jun 4 14:17:34 UTC 2012 - werner@suse.de
+
+- Update to procps-ng-3.3.3
+ * watch -g command repeats until something changes
+ * Changed labels of kB etc to KiB Debian #662786
+ * top supports hotplugged memory and cpus Debian #351934, #459287
+ * top %cpu not distorted when switch to/from threads Debian #441166
+ * top can read old toprc configuration files Debian #651213, #651863
+ * top supports input paste once again Debian #663334
+ * top -p avoids SEGV when pid doesn't exist Debian 668335
+ * Various DejaGNU test cases fixed
+ * pgrep.1 graoff syntax fix Debian #665425
+ * sysctl avoid crash when -p file has unexpected input
+ * sysctl .conf off-by-one error Debian #669128
+ * libprocps: protect locale env getting overwrite RedHat #548711
+ * Documentation catch up (fixed prior to 3.3.3)
+ . top repeating "%" wastes space Debian #322984
+ . top -U user name parse error Debian #623200
+ . top memory leaks Debian #627257
+ . top impossible task swap statistics Debian #628462
+ . top forest view segfault Debian #650864
+- Update to procps-ng-3.3.2
+ * Redefined library to use version-info
+ * NLS added! Programs can use po files to localise the output to suite
+ any supported languages.
+ * Imported a bunch of distribution patches:
+ watch: support unicode
+ watch: add precision wait time option -p
+ watch: interpret ANSI color code sequences
+ watch: add -exec and -beep flags and has better quoting
+ w: use environment to set user and from/host column widths
+ w: use COLUMNS environment if TIOCGWINSZ fails
+ w: bassman emulation with -o option
+ vmstat: do not scale si/so just like bi/bo
+ libprocps-ng: sysinfo.c: truncate the vmstat figure to 32 bits
+ tload: remote unneeded optarg and optind variables
+ sysctl: fix up some option processing
+ skill: kill prints perror
+ skill: do not treat skill null parameter as 0
+ skill: fix too greedy option parser
+ libprocps-ng: readproc.c: some type conversion help
+ ps: rename SZ to SIZE
+ ps: add sorting to %mem for ps
+ pmap: provide information for -x option
+ pgrep: distinguish between invalid commandline parameters and '-?'
+ pgrep: fix compiler warning saved_start_time might be used uninitialized
+ pgrep: add -c option for counting number of matched proceesses
+ pwdx & libprocps-ng: Hurd does not have MAX_PATH defined
+ ps: --sort does not work with time argument
+ skill: add CR to warning line
+ contrib: minimal ps: define mips PAGE_SIZE
+ libproc-ng: prettyfy proc mount messages
+ ps: add build option to disable ps option warning
+ libproc-ng: support building without WCHAR support
+ sysctl: remove index() for buildroot
+ * top now has a search capability
+ * User import is validated better to stop negative values for intervals etc
+- Update to procps-ng-3.3.1
+ * Added DejaGNU regression testing
+ * Fixed pgrep -u not finding processes Debian#649591
+ * Fixed pgrep crashing
+ * vmstat -p <part> finds partitions. Was Debian patch vmstat_part_format
+ fixes closed bugs RH#485243 and Debian#588677
+ * watch 8-bit clean, Was Debian patch watch_8bitchar
+ * slabtop prints plain ASCII in once mode
+- Update to procps-ng-3.3.0
+ * Debian, Fedora and openSUSE fork of procps.
+ https://gitorious.org/procps
+ * environment/build changes:
+ . autotools integrated
+ . procps-ng specific options
+ --enable-oomem (add out-of-memory flds)
+ --disable-kill (do not build kill pgm)
+ --enable-w-from (from as default for w)
+ * library changes:
+ . added control groups support
+ . added supplementary groups support
+ . introduced proc_t memory management
+ . enabled hot-plugged cpu support
+ . introduced new api's
+ readeither (readproc.c)
+ readproctab3 (readproc.c)
+ escaped_copy (escape.c)
+ * free changes:
+ . rewritten/modernized
+ improved help
+ includes long options
+ added new processing options
+ . updated manual page
+ * ps changes:
+ . added new fields
+ cgroups,etimes,supgid,supgrp,tgid
+ . exploited new library api's
+ * top changes:
+ . redesigned fields management
+ . added new fields
+ cgroups,gid,nmin,nth,pgrp,ruid,
+ sid,suid,supgids,supgrps,suser,
+ tgid,tpgid
+ . added horizontal/vertical scrolling
+ . added flexible output override via -w
+ . added COMMAND column forest view via V
+ . added hot-plugged cpu/memory support
+ . improved user filtering via u|U
+ . improved signal handling
+ . restored zero delay functionality
+ . introduced true line input editing
+ . exploited new library api's
+ . improved performance up to 300%
+
+-------------------------------------------------------------------
Old:
----
bug-634071_procstat2.diff
bug-634840.patch
procps-3.2.2-100cpus.diff
procps-3.2.2-ia64.diff
procps-3.2.2-top-termsize.patch
procps-3.2.2-w-notruncate.diff
procps-3.2.2-w-simply-work.diff
procps-3.2.3-make.diff
procps-3.2.5-CPU-states.patch
procps-3.2.5-eof.diff
procps-3.2.5-top-rc.patch
procps-3.2.6-xen.dif
procps-3.2.7-accuracy.dif
procps-3.2.7-btime-from-proc-stat.patch
procps-3.2.7-cgroups_flag.diff
procps-3.2.7-cpu_hotplug.patch
procps-3.2.7-large_pcpu.patch
procps-3.2.7-oom.diff
procps-3.2.7-petabytes.patch
procps-3.2.7-readeof.patch
procps-3.2.7-selinux.patch
procps-3.2.7-stealtime.patch
procps-3.2.7-terabyte.dif
procps-3.2.7-top.1.diff
procps-3.2.8-add-system-switch.diff
procps-3.2.8-buffersize.diff
procps-3.2.8-columns.dif
procps-3.2.8-fdleak.dif
procps-3.2.8-fix-unknown-HZ.dif
procps-3.2.8-glibc-2.6.1.dif
procps-3.2.8-implement-pattern-option.diff
procps-3.2.8-integer-overflow.patch
procps-3.2.8-manycpus.diff
procps-3.2.8-pgrep_coption.dif
procps-3.2.8-pmap-smaps-rml-2.patch
procps-3.2.8-procfs-no-perm.patch
procps-3.2.8-read-sysctls-also-from-boot-sysctl.conf-kernelversion.diff
procps-3.2.8-slab.patch
procps-3.2.8-sysctlerr.dif
procps-3.2.8-tinfo.dif
procps-3.2.8-toosmall.dif
procps-3.2.8.dif
procps-3.2.8.tar.gz
pwdx-bufferoverflow.diff
New:
----
procps-pmap-legacy.tar.bz2
procps-v3.3.3-accuracy.dif
procps-v3.3.3-bnc634071_procstat2.diff
procps-v3.3.3-bnc634840.patch
procps-v3.3.3-buffersize.diff
procps-v3.3.3-columns.dif
procps-v3.3.3-fdleak.dif
procps-v3.3.3-ia64.diff
procps-v3.3.3-integer-overflow.patch
procps-v3.3.3-large_pcpu.patch
procps-v3.3.3-petabytes.patch
procps-v3.3.3-pwdx.patch
procps-v3.3.3-read-sysctls-also-from-boot-sysctl.conf-kernelversion.diff
procps-v3.3.3-readeof.patch
procps-v3.3.3-selinux.patch
procps-v3.3.3-slab.patch
procps-v3.3.3-stealtime.patch
procps-v3.3.3-tinfo.dif
procps-v3.3.3-top.1.diff
procps-v3.3.3-w-notruncate.diff
procps-v3.3.3-w-simply-work.diff
procps-v3.3.3-watch.patch
procps-v3.3.3-xen.dif
procps-v3.3.3.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ procps.spec ++++++
--- /var/tmp/diff_new_pack.HImbg7/_old 2012-06-07 15:39:31.000000000 +0200
+++ /var/tmp/diff_new_pack.HImbg7/_new 2012-06-07 15:39:31.000000000 +0200
@@ -1,7 +1,7 @@
#
# spec file for package procps
#
-# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -15,71 +15,50 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
-# norootforbuild
-
+%bcond_with bin2usr
Name: procps
-BuildRequires: ncurses-devel
+BuildRequires: automake
BuildRequires: libselinux-devel
-Url: http://procps.sf.net
+BuildRequires: libtool
+BuildRequires: ncurses-devel
+Url: https://gitorious.org/procps
+PreReq: %fillup_prereq %insserv_prereq
+Version: 3.3.3
+Release: 0
+Summary: The ps utilities for /proc
License: GPL-2.0+ ; LGPL-2.1+
Group: System/Monitoring
-PreReq: %fillup_prereq %insserv_prereq
-AutoReqProv: on
-Version: 3.2.8
-Release: 39
-Summary: ps utilities for /proc
Provides: ps
Obsoletes: ps
-Source: http://procps.sourceforge.net/procps-%version.tar.gz
-Source1: boot.sysctl
-Source2: systat.xinetd
-Source3: sysctl.conf
-Source4: sysctl.conf.s390
-Patch: procps-3.2.3-make.diff
-Patch1: procps-3.2.2-100cpus.diff
-Patch2: procps-3.2.5-eof.diff
-Patch3: procps-3.2.2-ia64.diff
-Patch4: procps-3.2.7-stealtime.patch
-Patch6: procps-3.2.8-manycpus.diff
-Patch7: procps-3.2.2-w-notruncate.diff
-Patch8: procps-3.2.2-w-simply-work.diff
-Patch9: procps-3.2.7-top.1.diff
-Patch10: procps-3.2.2-top-termsize.patch
-Patch11: procps-3.2.8-buffersize.diff
-Patch12: pwdx-bufferoverflow.diff
-Patch13: procps-3.2.8-pmap-smaps-rml-2.patch
-Patch15: procps-3.2.5-top-rc.patch
-Patch16: procps-3.2.7-cpu_hotplug.patch
-Patch17: procps-3.2.5-CPU-states.patch
-Patch18: procps-3.2.7-readeof.patch
-Patch19: procps-3.2.7-btime-from-proc-stat.patch
-Patch20: procps-3.2.8-glibc-2.6.1.dif
-Patch21: procps-3.2.8-slab.patch
-Patch22: procps-3.2.7-selinux.patch
-Patch23: procps-3.2.7-accuracy.dif
-Patch24: procps-3.2.8-toosmall.dif
-Patch25: procps-3.2.7-cgroups_flag.diff
-Patch26: procps-3.2.8-pgrep_coption.dif
-Patch27: procps-3.2.7-terabyte.dif
-Patch28: procps-3.2.6-xen.dif
-Patch29: procps-3.2.8-fdleak.dif
-Patch30: procps-3.2.8-sysctlerr.dif
-Patch31: procps-3.2.8-columns.dif
-Patch32: procps-3.2.7-oom.diff
-Patch33: procps-3.2.8-integer-overflow.patch
-Patch34: bug-634071_procstat2.diff
-Patch35: bug-634840.patch
-Patch36: procps-3.2.8.dif
-# bnc #649501, apparently the initialization is depending on linking order...
-Patch37: procps-3.2.8-fix-unknown-HZ.dif
-Patch38: procps-3.2.8-add-system-switch.diff
-Patch39: procps-3.2.8-implement-pattern-option.diff
-Patch40: procps-3.2.8-read-sysctls-also-from-boot-sysctl.conf-kernelversion.diff
-Patch41: procps-3.2.7-petabytes.patch
-Patch42: procps-3.2.7-large_pcpu.patch
-Patch43: procps-3.2.8-tinfo.dif
-Patch44: procps-3.2.8-procfs-no-perm.patch
+Source: procps-v%version.tar.bz2
+Source1: procps-pmap-legacy.tar.bz2
+Source2: boot.sysctl
+Source3: systat.xinetd
+Source4: sysctl.conf
+Source5: sysctl.conf.s390
+Patch0: procps-v3.3.3-watch.patch
+Patch1: procps-v3.3.3-ia64.diff
+Patch2: procps-v3.3.3-stealtime.patch
+Patch3: procps-v3.3.3-w-notruncate.diff
+Patch4: procps-v3.3.3-w-simply-work.diff
+Patch5: procps-v3.3.3-top.1.diff
+Patch6: procps-v3.3.3-buffersize.diff
+Patch7: procps-v3.3.3-readeof.patch
+Patch8: procps-v3.3.3-slab.patch
+Patch9: procps-v3.3.3-selinux.patch
+Patch10: procps-v3.3.3-accuracy.dif
+Patch11: procps-v3.3.3-xen.dif
+Patch12: procps-v3.3.3-fdleak.dif
+Patch13: procps-v3.3.3-columns.dif
+Patch14: procps-v3.3.3-integer-overflow.patch
+Patch15: procps-v3.3.3-bnc634071_procstat2.diff
+Patch16: procps-v3.3.3-bnc634840.patch
+Patch17: procps-v3.3.3-read-sysctls-also-from-boot-sysctl.conf-kernelversion.diff
+Patch18: procps-v3.3.3-petabytes.patch
+Patch19: procps-v3.3.3-large_pcpu.patch
+Patch20: procps-v3.3.3-tinfo.dif
+Patch21: procps-v3.3.3-pwdx.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
@@ -100,87 +79,119 @@
running program. The vmstat command displays virtual memory statistics
about processes, memory, paging, block I/O, traps, and CPU activity.
+%package devel
+Summary: Include Files and Libraries mandatory for Development
+License: GPL-2.0+ ; LGPL-2.1+
+Group: Development/Libraries/C and C++
-
-Authors:
---------
- Albert Cahalan
- (and many more)
+%description devel
+This package contains all necessary include files and libraries needed
+to develop applications that require these.
+
+%package -n libprocps0
+Summary: The props library
+License: LGPL-2.1+
+Group: System/Libraries
+
+%description -n libprocps0
+The props library can be used to read informations out from /proc
+the process information pseudo-file system,
%prep
-%setup -q
-%patch -p1
-%patch1 -p1
-%patch2 -p1
-%patch3 -p1
-%patch4 -p0
-%patch6 -p0
-%patch7 -p1
-%patch8 -p1
-%patch9 -p1
-%patch10 -p1
-%patch11 -p0
-%patch12 -p1
-%patch13 -p0
-%patch15 -p1
-%patch16 -p1
+%setup -q -n %{name}-v%{version}
+%__tar --strip-components=1 -xjf %{S:1}
+%patch0
+%patch1
+%patch2
+%patch3
+%patch4
+%patch5
+%patch6
+%patch7
+%patch8
+%patch9
+%patch10
+%patch11
+%patch12
+%patch13
+%patch14
+%patch15
+%patch16
%patch17
%patch18
-%patch19 -p1
+%patch19
%patch20
-%patch21 -p0
-%patch22
-%patch23
-%patch24
-%patch25 -p1
-%patch26
-%patch27
-%patch28
-%patch29
-%patch30
-%patch31
-%patch32 -p1
-%patch33 -p1
-%patch34 -p1
-%patch35 -p1
-%patch36
-%patch37 -p1
-%patch38 -p1
-%patch39 -p1
-%patch40 -p1
-%patch41 -p1
-%patch42 -p1
-%patch43
-%patch44 -p1
+%patch21
%build
-make %{?_smp_mflags} CFLAGS="-Wall -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 $RPM_OPT_FLAGS -pipe" \
- CC="%__cc"
+sh po/update-potfiles
+test -s .tarball-version || echo %{version} > .tarball-version
+autoreconf -fi
+export NCURSESW_CFLAGS="$(ncursesw5-config --cflags)"
+export NCURSESW_LIBS="$(ncursesw5-config --libs)"
+%global optflags %{optflags} -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -pipe
+%configure \
+ --disable-static \
+ --disable-nls \
+ --disable-rpath \
+ --disable-kill \
+ --enable-watch8bit \
+ --enable-shared \
+ --enable-skill \
+ --enable-oomem \
+ --enable-w-from \
+ --with-pic=yes \
+ --with-gnu-ld
+make %{?_smp_mflags}
hz="$(ps/ps aux 2>&1 | grep -E '^Unknown HZ value')" || true
test -z "$hz" || exit 1
+./pmap -d $$ || {
+ cat /proc/$$/smaps
+ uname -a
+ exit 1
+}
%install
-make DESTDIR=$RPM_BUILD_ROOT install
-install -d $RPM_BUILD_ROOT/etc/init.d $RPM_BUILD_ROOT/etc/xinetd.d
-install -m 755 %SOURCE1 $RPM_BUILD_ROOT/etc/init.d
-install -m 644 %SOURCE2 $RPM_BUILD_ROOT/etc/xinetd.d/systat
-install -d $RPM_BUILD_ROOT/lib/sysctl.d $RPM_BUILD_ROOT/etc/sysctl.d
-install -m 644 %SOURCE3 $RPM_BUILD_ROOT/lib/sysctl.d/sysctl.conf
+make DESTDIR=%{buildroot} install
+install -d %{buildroot}/etc/init.d
+install -d %{buildroot}/etc/xinetd.d
+install -d %{buildroot}/lib/sysctl.d
+install -d %{buildroot}/etc/sysctl.d
+install -d %{buildroot}/bin
+install -d %{buildroot}/sbin
+install -m 755 %{S:2} %{buildroot}/etc/init.d
+install -m 644 %{S:3} %{buildroot}/etc/xinetd.d/systat
+install -m 644 %{S:4} %{buildroot}/lib/sysctl.d/sysctl.conf
case "$RPM_ARCH" in
-s390*) install -m 644 %SOURCE4 $RPM_BUILD_ROOT/lib/sysctl.d/sysctl-s390.conf ;;
+s390*) install -m 644 %{S:4} %{buildroot}/lib/sysctl.d/sysctl-s390.conf ;;
esac
-# clean unwanted files (coreutils)
-rm -f $RPM_BUILD_ROOT/bin/kill
-rm -f $RPM_BUILD_ROOT/usr/bin/uptime
-rm -f $RPM_BUILD_ROOT%_mandir/man1/kill.1
-rm -f $RPM_BUILD_ROOT%_mandir/man1/uptime.1
-mv $RPM_BUILD_ROOT/usr/bin/{pgrep,pkill} $RPM_BUILD_ROOT/bin/
-ln -s /bin/pgrep $RPM_BUILD_ROOT/usr/bin/pgrep
-ln -s /bin/pkill $RPM_BUILD_ROOT/usr/bin/pkill
+# clean unwanted files (e.g. coreutils)
+rm -f %{buildroot}/usr/bin/kill
+rm -f %{buildroot}/usr/bin/uptime
+rm -f %{buildroot}%{_mandir}/man1/kill.1
+rm -f %{buildroot}%{_mandir}/man1/uptime.1
+rm -f %{buildroot}%{_libdir}/*.la
+rm -rf %{buildroot}%{_datadir}/doc/procps-ng
+
+%if %{with bin2usr}
+ln -s %{_bindir}/ps %{buildroot}/bin/
+ln -s %{_bindir}/pgrep %{buildroot}/bin/
+ln -s %{_bindir}/pkill %{buildroot}/bin/
+ln -s %{_sbindir}/sysctl %{buildroot}/sbin/
+%else
+mv %{buildroot}%{_bindir}/ps %{buildroot}/bin/
+mv %{buildroot}%{_bindir}/pgrep %{buildroot}/bin/
+mv %{buildroot}%{_bindir}/pkill %{buildroot}/bin/
+mv %{buildroot}%{_sbindir}/sysctl %{buildroot}/sbin/
+ln -s /bin/ps %{buildroot}%{_bindir}/ps
+ln -s /bin/pgrep %{buildroot}%{_bindir}/pgrep
+ln -s /bin/pkill %{buildroot}%{_bindir}/pkill
+ln -s /sbin/sysctl %{buildroot}%{_sbindir}/sysctl
+%endif
%clean
-rm -rf $RPM_BUILD_ROOT
+rm -rf %{buildroot}
%post
%{fillup_and_insserv -ny boot.sysctl boot.sysctl}
@@ -210,29 +221,46 @@
%postun
%insserv_cleanup
+%post -n libprocps0 -p /sbin/ldconfig
+
+%postun -n libprocps0 -p /sbin/ldconfig
+
%files
%defattr (-,root,root,755)
-%doc NEWS README COPYING
+%doc NEWS README COPYING Documentation/BUGS Documentation/FAQ top/README.top
%config /etc/init.d/boot.sysctl
%config(noreplace) %ghost %attr(0644,root,root) /etc/sysctl.conf
%config(noreplace) /etc/xinetd.d/systat
+%if %{with bin2usr}
+%verify(link) /bin/ps
+%verify(link) /bin/pgrep
+%verify(link) /bin/pkill
+%verify(link) /sbin/sysctl
+%{_bindir}/ps
+%{_bindir}/pgrep
+%{_bindir}/pkill
+%{_sbindir}/sysctl
+%else
/bin/ps
/bin/pgrep
/bin/pkill
/sbin/sysctl
-/usr/bin/free
-/usr/bin/pgrep
-/usr/bin/pkill
-/usr/bin/pmap
-/usr/bin/pwdx
-/usr/bin/skill
-/usr/bin/slabtop
-/usr/bin/snice
-/usr/bin/tload
-/usr/bin/top
-/usr/bin/vmstat
-/usr/bin/w
-/usr/bin/watch
+%verify(link) %{_bindir}/ps
+%verify(link) %{_bindir}/pgrep
+%verify(link) %{_bindir}/pkill
+%verify(link) %{_sbindir}/sysctl
+%endif
+%{_bindir}/free
+%{_bindir}/pmap
+%{_bindir}/pwdx
+%{_bindir}/skill
+%{_bindir}/slabtop
+%{_bindir}/snice
+%{_bindir}/tload
+%{_bindir}/top
+%{_bindir}/vmstat
+%{_bindir}/w
+%{_bindir}/watch
%dir /etc/sysctl.d
%dir /lib/sysctl.d
/lib/sysctl.d/*.conf
@@ -253,4 +281,27 @@
%_mandir/man8/vmstat.8.gz
%_mandir/man8/sysctl.8.gz
+%files devel
+%defattr (-,root,root,755)
+%dir %{_includedir}/proc
+%{_includedir}/proc/alloc.h
+%{_includedir}/proc/devname.h
+%{_includedir}/proc/escape.h
+%{_includedir}/proc/procps.h
+%{_includedir}/proc/pwcache.h
+%{_includedir}/proc/readproc.h
+%{_includedir}/proc/sig.h
+%{_includedir}/proc/slab.h
+%{_includedir}/proc/sysinfo.h
+%{_includedir}/proc/version.h
+%{_includedir}/proc/wchan.h
+%{_includedir}/proc/whattime.h
+%{_libdir}/libprocps.so
+%{_libdir}/pkgconfig/libprocps.pc
+
+%files -n libprocps0
+%defattr (-,root,root,755)
+%{_libdir}/libprocps.so.0
+%{_libdir}/libprocps.so.0.0.1
+
%changelog
++++++ procps-v3.3.3-accuracy.dif ++++++
--- ps/common.h
+++ ps/common.h 2012-06-01 15:30:43.880009972 +0000
@@ -302,6 +302,7 @@ extern int running_only;
extern int screen_cols;
extern int screen_rows;
extern time_t seconds_since_boot;
+extern unsigned long long jiffies_since_boot;
extern selection_node *selection_list;
extern unsigned simple_select;
extern sort_node *sort_list;
--- ps/global.c
+++ ps/global.c 2012-06-01 15:32:10.488010283 +0000
@@ -79,6 +79,7 @@ int prefer_bsd_defaults = -1
int screen_cols = -1;
int screen_rows = -1;
time_t seconds_since_boot = -1;
+unsigned long long jiffies_since_boot = -1;
selection_node *selection_list = (selection_node *)0xdeadbeef;
unsigned simple_select = 0xffffffff;
sort_node *sort_list = (sort_node *)0xdeadbeef; /* ready-to-use sort list */
@@ -369,6 +370,7 @@ static const char *set_personality(void)
/************ Call this to reinitialize everything ***************/
void reset_global(void){
static proc_t p;
+ double uptime_secs;
reset_selection_list();
look_up_our_self(&p);
set_screen_size();
@@ -392,7 +394,8 @@ void reset_global(void){
negate_selection = 0;
page_size = getpagesize();
running_only = 0;
- seconds_since_boot = uptime(0,0);
+ seconds_since_boot = uptime(&uptime_secs,0);
+ jiffies_since_boot = ((long double)uptime_secs * Hertz);
selection_list = NULL;
simple_select = 0;
sort_list = NULL;
--- ps/output.c
+++ ps/output.c 2012-06-01 15:40:35.160510179 +0000
@@ -471,11 +471,11 @@ static int pr_etimes(char *restrict cons
static int pr_c(char *restrict const outbuf, const proc_t *restrict const pp){
unsigned long long total_time; /* jiffies used by this process */
unsigned pcpu = 0; /* scaled %cpu, 99 means 99% */
- unsigned long long seconds; /* seconds of process life */
+ unsigned long long jiffies; /* jiffies of process life */
total_time = pp->utime + pp->stime;
if(include_dead_children) total_time += (pp->cutime + pp->cstime);
- seconds = seconds_since_boot - pp->start_time / Hertz;
- if(seconds) pcpu = (total_time * 100ULL / Hertz) / seconds;
+ jiffies = jiffies_since_boot - pp->start_time;
+ if(jiffies) pcpu = (total_time * 100ULL) / jiffies;
if (pcpu > 99U) pcpu = 99U;
return snprintf(outbuf, COLWID, "%2u", pcpu);
}
@@ -483,24 +483,24 @@ static int pr_c(char *restrict const out
static int pr_pcpu(char *restrict const outbuf, const proc_t *restrict const pp){
unsigned long long total_time; /* jiffies used by this process */
unsigned pcpu = 0; /* scaled %cpu, 999 means 99.9% */
- unsigned long long seconds; /* seconds of process life */
+ unsigned long long jiffies; /* jiffies of process life */
total_time = pp->utime + pp->stime;
if(include_dead_children) total_time += (pp->cutime + pp->cstime);
- seconds = seconds_since_boot - pp->start_time / Hertz;
- if(seconds) pcpu = (total_time * 1000ULL / Hertz) / seconds;
- if (pcpu > 999U)
- return snprintf(outbuf, COLWID, "%u", pcpu/10U);
+ jiffies = jiffies_since_boot - pp->start_time;
+ if(jiffies) pcpu = (total_time * 1000ULL) / jiffies;
+ if (pcpu/10U >= 100U) /* do not confuse the user by scale effects */
+ return snprintf(outbuf, COLWID, "100");
return snprintf(outbuf, COLWID, "%u.%u", pcpu/10U, pcpu%10U);
}
/* this is a "per-mill" format, like %cpu with no decimal point */
static int pr_cp(char *restrict const outbuf, const proc_t *restrict const pp){
unsigned long long total_time; /* jiffies used by this process */
unsigned pcpu = 0; /* scaled %cpu, 999 means 99.9% */
- unsigned long long seconds; /* seconds of process life */
+ unsigned long long jiffies; /* jiffies of process life */
total_time = pp->utime + pp->stime;
if(include_dead_children) total_time += (pp->cutime + pp->cstime);
- seconds = seconds_since_boot - pp->start_time / Hertz ;
- if(seconds) pcpu = (total_time * 1000ULL / Hertz) / seconds;
+ jiffies = jiffies_since_boot - pp->start_time;
+ if(jiffies) pcpu = (total_time * 1000ULL) / jiffies;
if (pcpu > 999U) pcpu = 999U;
return snprintf(outbuf, COLWID, "%3u", pcpu);
}
++++++ procps-v3.3.3-bnc634071_procstat2.diff ++++++
--- 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/sysinfo.c
+++ proc/sysinfo.c 2012-06-04 10:03:34.464009483 +0000
@@ -36,8 +36,6 @@
#include /* htons */
#endif
-long smp_num_cpus; /* 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" \
@@ -196,7 +194,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) */
@@ -267,8 +265,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);
@@ -1008,7 +1004,12 @@ out:
///////////////////////////////////////////////////////////////////////////
-void cpuinfo (void) {
+long smp_num_cpus (void) {
+ static long _smp_num_cpus=-1;
+
+ 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
@@ -1020,7 +1021,9 @@ 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;
+
+ return _smp_num_cpus;
}
--- proc/sysinfo.h
+++ proc/sysinfo.h 2012-06-04 10:04:15.812509959 +0000
@@ -7,7 +7,7 @@
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 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 2012-06-04 10:08:23.264009898 +0000
@@ -354,7 +354,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
@@ -1764,7 +1764,7 @@ static void zap_fieldstab (void) {
always:
Fieldstab[P_CPN].head = "P ";
Fieldstab[P_CPN].fmts = "%1d ";
- 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));
snprintf(fmts_cpu, sizeof(fmts_cpu), "%%%ud ", digits);
Fieldstab[P_CPN].head = " P " + 5 - digits;
@@ -1773,9 +1773,9 @@ always:
Cpu_pmax = 99.9;
Fieldstab[P_CPU].fmts = " %#4.1f ";
- 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;
Fieldstab[P_CPU].fmts = "%5.0f ";
} else {
@@ -1841,7 +1841,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[Cpu_faux_tot].edge =
- ((cpus[Cpu_faux_tot].cur.tot - cpus[Cpu_faux_tot].sav.tot) / smp_num_cpus) / (100 / TICS_EDGE);
+ ((cpus[Cpu_faux_tot].cur.tot - cpus[Cpu_faux_tot].sav.tot) / smp_num_cpus()) / (100 / TICS_EDGE);
#endif
// now value each separate cpu's tics, maybe
for (i = 0; i < Cpu_faux_tot && i < Screen_rows; i++) {
@@ -1946,7 +1946,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
@@ -2088,8 +2088,7 @@ static void sysinfo_refresh (int forced)
#ifndef PRETEND4CPUS
/*** 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;
}
#endif
@@ -2116,10 +2115,10 @@ static void before (char *me) {
initialize_nls();
// establish cpu particulars
+ Cpu_faux_tot = smp_num_cpus();
#ifdef PRETEND4CPUS
- smp_num_cpus = 4;
+ Cpu_faux_tot = 4;
#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);
++++++ procps-v3.3.3-bnc634840.patch ++++++
Do not setup SIGHUP signal handler if we are in the batch mode
Top enables a signal handler for the SIGHUP signal (loss of terminal). While
this makes sense for top's default interactive mode, it doesn't make any sense
for batch mode. If you run top in nohup just to collect data over time and
disconnect top finishes which is not what one would expect.
Index: procps-3.2.8/top.c
--- top/top.c
+++ top/top.c 2012-06-04 10:13:48.576010662 +0000
@@ -2147,6 +2147,8 @@ static void before (char *me) {
sigemptyset(&sa.sa_mask);
sa.sa_flags = SA_RESTART;
for (i = SIGRTMAX; i; i--) {
+ if (Batch && i == SIGHUP)
+ continue;
switch (i) {
case SIGALRM: case SIGHUP: case SIGINT:
case SIGPIPE: case SIGQUIT: case SIGTERM:
++++++ procps-v3.3.3-buffersize.diff ++++++
--- proc/sysinfo.c
+++ proc/sysinfo.c 2012-06-01 14:33:02.936510627 +0000
@@ -56,7 +56,7 @@ static int vminfo_fd = -1;
// As of 2.6.24 /proc/meminfo seems to need 888 on 64-bit,
// and would need 1258 if the obsolete fields were there.
-static char buf[2048];
+static char buf[4096];
/* This macro opens filename only if necessary and seeks to 0 so
* that successive calls to the functions are more efficient.
++++++ procps-v3.3.3-columns.dif ++++++
--- ps/global.c
+++ ps/global.c 2012-06-01 16:04:18.460510318 +0000
@@ -148,8 +148,11 @@ static void set_screen_size(void){
screen_cols = ws.ws_col; // hmmm, NetBSD subtracts 1
screen_rows = ws.ws_row;
- // TODO: delete this line
- if(!isatty(STDOUT_FILENO)) screen_cols = OUTBUF_SIZE;
+ if(!isatty(STDOUT_FILENO)){
+ screen_cols = OUTBUF_SIZE;
+ screen_rows = OUTBUF_SIZE;
+ if (personality&PER_UNIX_COLS) return; // SysV/UNIX98 based personality
+ }
columns = getenv("COLUMNS");
if(columns && *columns){
@@ -298,6 +301,7 @@ static const char *set_personality(void)
return NULL;
case_aix:
+ personality |= PER_UNIX_COLS;
bsd_j_format = "FB_j";
bsd_l_format = "FB_l";
/* bsd_s_format not used */
@@ -325,6 +329,7 @@ static const char *set_personality(void)
case_sunos4:
personality = PER_NO_DEFAULT_g;
+ personality |= PER_UNIX_COLS;
prefer_bsd_defaults = 1;
bsd_j_format = "FB_j";
bsd_l_format = "FB_l";
@@ -349,12 +354,14 @@ static const char *set_personality(void)
case_hp:
case_hpux:
personality = PER_BROKEN_o | PER_HPUX_x;
+ personality |= PER_UNIX_COLS;
return NULL;
case_svr4:
case_sysv:
case_sco:
personality = PER_BROKEN_o | PER_SVR4_x;
+ personality |= PER_UNIX_COLS;
return NULL;
case_posix:
@@ -373,8 +380,8 @@ void reset_global(void){
double uptime_secs;
reset_selection_list();
look_up_our_self(&p);
- set_screen_size();
set_personality();
+ set_screen_size();
all_processes = 0;
bsd_c_option = 0;
++++++ procps-v3.3.3-fdleak.dif ++++++
--- vmstat.c
+++ vmstat.c 2012-06-01 15:57:49.952010091 +0000
@@ -41,9 +41,9 @@
#include
#include
#include
+#include
#include
#include
-
#include "c.h"
#include "fileutils.h"
#include "nls.h"
@@ -545,13 +545,12 @@ static void slabheader(void)
static void slabformat(void)
{
- FILE *fSlab;
+ struct stat fSlab;
struct slab_cache *slabs;
unsigned long nSlab, i, j, k;
const char format[] = "%-24s %6u %6u %6u %6u\n";
- fSlab = fopen("/proc/slabinfo", "rb");
- if (!fSlab) {
+ if (stat("/proc/slabinfo", &fSlab) < 0) {
xwarnx(_("your kernel does not support slabinfo or your permissions are insufficient"));
return;
}
@@ -583,7 +582,6 @@ static void slabformat(void)
}
free(slabs);
}
- fclose(fSlab);
}
static void disksum_format(void)
++++++ procps-v3.3.3-ia64.diff ++++++
--- proc/devname.c
+++ proc/devname.c 2012-06-01 13:35:43.452010553 +0000
@@ -53,6 +53,10 @@
#define minor <-- do not use -->
#endif
+#ifndef PAGE_SIZE
+# define PAGE_SIZE (sysconf(_SC_PAGESIZE))
+#endif
+
typedef struct tty_map_node {
struct tty_map_node *next;
unsigned short devfs_type; // bool
++++++ procps-v3.3.3-integer-overflow.patch ++++++
--- proc/sysinfo.c
+++ proc/sysinfo.c 2012-06-04 09:45:53.448364904 +0000
@@ -676,8 +676,16 @@ nextline:
if(kb_inactive==~0UL){
kb_inactive = kb_inact_dirty + kb_inact_clean + kb_inact_laundry;
}
- kb_swap_used = kb_swap_total - kb_swap_free;
- kb_main_used = kb_main_total - kb_main_free;
+ if (kb_swap_total > kb_swap_free) {
+ kb_swap_used = kb_swap_total - kb_swap_free;
+ } else {
+ kb_swap_used = 0;
+ }
+ if (kb_main_total > kb_main_free) {
+ kb_main_used = kb_main_total - kb_main_free;
+ } else {
+ kb_main_used = 0;
+ }
kb_main_cached += kb_swap_reclaimable + kb_swap_cached + kb_nfs_unstable;
}
--- free.c
+++ free.c 2012-06-04 09:50:26.588010539 +0000
@@ -310,24 +310,44 @@ int main(int argc, char **argv)
* to print the high info, even if it is zero.
*/
if (flags & FREE_LOHI) {
+ unsigned long kb_low_used;
+ unsigned long kb_high_used;
+
+ if (kb_low_total > kb_low_free)
+ kb_low_used = kb_low_total - kb_low_free;
+ else
+ kb_low_used = 0;
+
+ if (kb_high_total > kb_high_free)
+ kb_high_used = kb_high_total - kb_high_free;
+ else
+ kb_high_used = 0;
+
printf("%-7s", _("Low:"));
printf(" %10s", scale_size(kb_low_total, flags, args));
- printf(" %10s", scale_size(kb_low_total - kb_low_free, flags, args));
+ printf(" %10s", scale_size(kb_low_used, flags, args));
printf(" %10s", scale_size(kb_low_free, flags, args));
printf("\n");
printf("%-7s", _("High:"));
printf(" %10s", scale_size(kb_high_total, flags, args));
- printf(" %10s", scale_size(kb_high_total - kb_high_free, flags, args));
+ printf(" %10s", scale_size(kb_high_used, flags, args));
printf(" %10s", scale_size(kb_high_free, flags, args));
printf("\n");
}
if (!(flags & FREE_OLDFMT)) {
unsigned KLONG buffers_plus_cached = kb_main_buffers + kb_main_cached;
+ unsigned long kb_used_minus_bufcache;
+
+ if (kb_main_used > buffers_plus_cached)
+ kb_used_minus_bufcache = kb_main_used - buffers_plus_cached;
+ else
+ kb_used_minus_bufcache = 0;
+
printf(_("-/+ buffers/cache:"));
printf(" %10s",
- scale_size(kb_main_used - buffers_plus_cached, flags, args));
+ scale_size(kb_used_minus_bufcache, flags, args));
printf(" %10s",
scale_size(kb_main_free + buffers_plus_cached, flags, args));
printf("\n");
++++++ procps-v3.3.3-large_pcpu.patch ++++++
--- top/top.c
+++ top/top.c 2012-06-04 10:36:26.252009786 +0000
@@ -1777,7 +1777,10 @@ always:
Fieldstab[P_CPU].fmts = " %#4.1f ";
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() > 100) {
+ if (Cpu_pmax > 999999.0) Cpu_pmax = 999999.0;
+ Fieldstab[P_CPU].fmts = "%6.0f ";
+ } else if (smp_num_cpus() > 10) {
if (Cpu_pmax > 99999.0) Cpu_pmax = 99999.0;
Fieldstab[P_CPU].fmts = "%5.0f ";
} else {
++++++ procps-v3.3.3-petabytes.patch ++++++
--- top/top.c
+++ top/top.c 2012-06-04 10:32:22.760334019 +0000
@@ -1060,15 +1060,17 @@ static int get_int (const char *prompt)
* SK_Kb (1) it's kilobytes
* SK_Mb (2) it's megabytes
* SK_Gb (3) it's gigabytes
- * SK_Tb (4) it's terabytes */
+ * SK_Tb (4) it's terabytes
+ * SK_Pb (5) it's petabytes
+ * SK_Eb (6) it's exabytes */
static const char *scale_num (unsigned long num, const int width, const int type) {
// kilobytes, megabytes, gigabytes, terabytes, duh!
static double scale[] = { 1024.0, 1024.0*1024, 1024.0*1024*1024, 1024.0*1024*1024*1024, 0 };
// kilo, mega, giga, tera, none
#ifdef CASEUP_SUFIX
- static char nextup[] = { 'K', 'M', 'G', 'T', 0 };
+ static char nextup[] = { 'K', 'M', 'G', 'T', 'P', 'E', 0 };
#else
- static char nextup[] = { 'k', 'm', 'g', 't', 0 };
+ static char nextup[] = { 'k', 'm', 'g', 't', 'p', 'e', 0 };
#endif
static char buf[SMLBUFSIZ];
double *dp;
--- top/top.h
+++ top/top.h 2012-06-04 10:32:43.952010338 +0000
@@ -177,7 +177,7 @@ enum pflag {
/* The scaling 'type' used with scale_num() -- this is how
the passed number is interpreted should scaling be necessary */
enum scale_num {
- SK_no, SK_Kb, SK_Mb, SK_Gb, SK_Tb
+ SK_no, SK_Kb, SK_Mb, SK_Gb, SK_Tb, SK_Pb, SK_Eb
};
/* This typedef just ensures consistent 'process flags' handling */
++++++ procps-v3.3.3-pwdx.patch ++++++
--- pwdx.c
+++ pwdx.c 2012-06-06 11:59:43.166745435 +0000
@@ -107,6 +107,7 @@ int main(int argc, char *argv[])
buflen = 10 + strlen(argv[i]) + 1;
buf = xmalloc(buflen);
+ errno = 0;
if (check_pid_argument(argv[i]))
xerrx(EXIT_FAILURE, _("invalid process id: %s"),
argv[i]);
++++++ procps-v3.3.3-read-sysctls-also-from-boot-sysctl.conf-kernelversion.diff ++++++
--- sysctl.8
+++ sysctl.8 2012-06-04 10:27:39.048010081 +0000
@@ -79,6 +79,8 @@ Print value without new line.
\fB\-\-system\fR
Load settings from all system configuration files.
.br
+/boot/sysctl.conf-<kernelversion>
+.br
/run/sysctl.d/*.conf
.br
/etc/sysctl.d/*.conf
--- sysctl.c
+++ sysctl.c 2012-06-04 10:29:12.944010410 +0000
@@ -39,6 +39,7 @@
#include
#include
#include
+#include
#include
#include "c.h"
@@ -569,6 +570,7 @@ static int sortpairs(const void *A, cons
static int PreloadSystem(void)
{
unsigned di, i;
+ struct utsname uts;
const char *dirs[] = {
"/run/sysctl.d",
"/etc/sysctl.d",
@@ -631,6 +633,16 @@ static int PreloadSystem(void)
}
qsort(cfgs, ncfgs, sizeof(struct cfg *), sortpairs);
+ if (uname(&uts) == 0) {
+ char buf[PATH_MAX];
+ snprintf(buf, sizeof(buf), "/boot/sysctl.conf-%s", uts.release);
+ if (access(buf, R_OK) == 0) {
+ if (!Quiet)
+ printf("* Applying %s ...\n", buf);
+ Preload(buf);
+ }
+ }
+
for (i = 0; i < ncfgs; ++i) {
if (!Quiet)
printf(_("* Applying %s ...\n"), cfgs[i]->value);
++++++ procps-v3.3.3-readeof.patch ++++++
--- proc/readproc.c
+++ proc/readproc.c 2012-06-01 15:00:43.848010122 +0000
@@ -527,7 +527,7 @@ static int file2str(const char *director
int fd, num_read;
sprintf(filename, "%s/%s", directory, what);
- fd = open(filename, O_RDONLY, 0);
+ fd = open(filename, O_RDONLY, O_NOATIME);
if(unlikely(fd==-1)) return -1;
num_read = read(fd, ret, cap - 1);
close(fd);
@@ -538,41 +538,42 @@ static int file2str(const char *director
static char** file2strvec(const char* directory, const char* what) {
char buf[2048]; /* read buf bytes at a time */
- char *p, *rbuf = 0, *endbuf, **q, **ret;
- int fd, tot = 0, n, c, end_of_file = 0;
- int align;
+ char *p, *rbuf = (char*)0, *endbuf, **q, **ret;
+ int fd, c;
+ ssize_t n, align, tot = 0;
sprintf(buf, "%s/%s", directory, what);
- fd = open(buf, O_RDONLY, 0);
+ fd = open(buf, O_RDONLY, O_NOATIME);
if(fd==-1) return NULL;
/* read whole file into a memory buffer, allocating as we go */
- while ((n = read(fd, buf, sizeof buf - 1)) >= 0) {
- if (n < (int)(sizeof buf - 1))
- end_of_file = 1;
- if (n == 0 && rbuf == 0) {
- close(fd);
- return NULL; /* process died between our open and read */
- }
+ do {
+ n = read(fd, buf, sizeof(buf) - 1);
if (n < 0) {
- if (rbuf)
- free(rbuf);
- close(fd);
- return NULL; /* read error */
+ tot = 0;
+ break; /* read error! */
+ }
+ if (n == 0) {
+ if(rbuf == (char*)0)
+ tot = 0; /* process died between our open and read */
+ break; /* we're done */
}
- if (end_of_file && (n == 0 || buf[n-1]))/* last read char not null */
- buf[n++] = '\0'; /* so append null-terminator */
rbuf = xrealloc(rbuf, tot + n); /* allocate more memory */
memcpy(rbuf + tot, buf, n); /* copy buffer into it */
tot += n; /* increment total byte ctr */
- if (end_of_file)
- break;
- }
+ } while (n >= (sizeof(buf) - 1));
+
close(fd);
- if (n <= 0 && !end_of_file) {
+
+ if (tot == 0) {
if (rbuf) free(rbuf);
- return NULL; /* read error */
+ return NULL; /* read error */
+ }
+ if (rbuf[tot-1]) { /* last read char not null */
+ rbuf = xrealloc(rbuf, tot + 1); /* allocate more memory */
+ rbuf[tot++] = '\0'; /* and append null-terminator */
}
+
endbuf = rbuf + tot; /* count space for pointers */
align = (sizeof(char*)-1) - ((tot + sizeof(char*)-1) & (sizeof(char*)-1));
for (c = 0, p = rbuf; p < endbuf; p++) {
@@ -605,7 +606,7 @@ static int read_unvectored(char *restric
unsigned n = 0;
snprintf(path, sizeof(path), "%s/%s", whom, what);
- fd = open(path, O_RDONLY);
+ fd = open(path, O_RDONLY, O_NOATIME);
if(fd==-1) return 0;
for(;;){
++++++ procps-v3.3.3-selinux.patch ++++++
--- ps/Makefile.am
+++ ps/Makefile.am 2012-06-04 12:35:28.896510496 +0000
@@ -3,7 +3,7 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/include \
-DLOCALEDIR=\"$(localedir)\"
-AM_LDFLAGS = ../proc/libprocps.la
+AM_LDFLAGS = ../proc/libprocps.la -ldl
dist_man_MANS = ps.1
--- ps/output.c
+++ ps/output.c 2012-06-01 15:20:53.892510827 +0000
@@ -1164,7 +1164,7 @@ static int pr_sgi_p(char *restrict const
/****************** FLASK & seLinux security stuff **********************/
// move the bulk of this to libproc sometime
-
+#if 0
static int pr_context(char *restrict const outbuf, const proc_t *restrict const pp){
char filename[48];
size_t len;
@@ -1193,7 +1193,7 @@ fail:
return 1;
}
-#if 0
+#else
// This needs more study, considering:
// 1. the static linking option (maybe disable this in that case)
// 2. the -z and -Z option issue
--- ps/parser.c
+++ ps/parser.c 2012-06-01 15:21:29.632010485 +0000
@@ -230,7 +230,7 @@ static const char *parse_sysv_option(voi
// In the meantime, please do not add to it. The list is
// intended to ONLY contain flags defined by the POSIX and UNIX
// standards published by The Open Group, IEEE, and ISO.
- if(!strchr("aAdefgGlnoptuU", *flagptr)) not_pure_unix = 1; // dude, -Z ain't in POSIX
+ if(!strchr("aAdefgGlnoptuUZ", *flagptr)) not_pure_unix = 1; // dude, -Z ain't in POSIX
switch(*flagptr){
case 'A':
--- ps/ps.1
+++ ps/ps.1 2012-06-01 15:22:45.268010363 +0000
@@ -423,6 +423,9 @@ option, which
.B \-F
implies.
.TP
+.BI \-Z
+display security context format (SELinux, etc.)
+.TP
.BI \-\-format \ format
user\-defined format. Identical to
.B \-o
--- w.c
+++ w.c 2012-06-01 15:23:59.596010373 +0000
@@ -235,6 +235,12 @@ static const proc_t *getproc(const utmp_
continue;
best = tmp;
}
+ /*
+ * It is there but SELinux wouldn't allow us to know the detail. Really
+ * w should just be given rights
+ */
+ if(!kill(u->ut_pid, 0) || errno != ESRCH)
+ *found_utpid = 1;
return best ? best : secondbest;
}
++++++ procps-v3.3.3-slab.patch ++++++
--- proc/sysinfo.c
+++ proc/sysinfo.c 2012-06-01 15:12:32.676010123 +0000
@@ -3,6 +3,7 @@
* Copyright (C) 1992-1998 by Michael K. Johnson, johnsonm@redhat.com
* Copyright 1998-2003 Albert Cahalan
* June 2003, Fabian Frederick, disk and slab info
+ * Copyright (c) 2008 Bart Van Assche.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -592,12 +593,12 @@ static unsigned long kb_vmalloc_chunk;
static unsigned long kb_vmalloc_total;
static unsigned long kb_vmalloc_used;
// seen on 2.6.24-rc6-git12
-static unsigned long kb_anon_pages;
-static unsigned long kb_bounce;
-static unsigned long kb_commit_limit;
-static unsigned long kb_nfs_unstable;
-static unsigned long kb_swap_reclaimable;
-static unsigned long kb_swap_unreclaimable;
+unsigned long kb_anon_pages;
+unsigned long kb_bounce;
+unsigned long kb_commit_limit;
+unsigned long kb_nfs_unstable;
+unsigned long kb_swap_reclaimable;
+unsigned long kb_swap_unreclaimable;
void meminfo(void){
char namebuf[16]; /* big enough to hold any row name */
@@ -677,6 +678,7 @@ nextline:
}
kb_swap_used = kb_swap_total - kb_swap_free;
kb_main_used = kb_main_total - kb_main_free;
+ kb_main_cached += kb_swap_reclaimable + kb_swap_cached + kb_nfs_unstable;
}
/*****************************************************************/
--- proc/sysinfo.h
+++ proc/sysinfo.h 2012-06-01 15:10:56.976306140 +0000
@@ -31,6 +31,11 @@ extern unsigned long kb_main_total;
extern unsigned long kb_swap_free;
extern unsigned long kb_swap_total;
/* recently introduced */
+extern unsigned long kb_anon_pages;
+extern unsigned long kb_bounce;
+extern unsigned long kb_nfs_unstable;
+extern unsigned long kb_slab_reclaimable;
+extern unsigned long kb_slab_unreclaimable;
extern unsigned long kb_high_free;
extern unsigned long kb_high_total;
extern unsigned long kb_low_free;
++++++ procps-v3.3.3-stealtime.patch ++++++
--- vmstat.c
+++ vmstat.c 2012-06-01 13:41:09.844010232 +0000
@@ -179,9 +179,9 @@ static void new_header(void)
/* Translation Hint: Translating folloging header & fields
* that follow (marked with max x chars) might not work,
* unless manual page is translated as well. */
- printf(_("procs -----------memory---------- ---swap-- -----io---- -system-- ----cpu----\n"));
+ printf(_("procs -----------memory---------- ---swap-- -----io---- -system-- -----cpu------\n"));
printf
- ("%2s %2s %6s %6s %6s %6s %4s %4s %5s %5s %4s %4s %2s %2s %2s %2s\n",
+ ("%2s %2s %6s %6s %6s %6s %4s %4s %5s %5s %4s %4s %2s %2s %2s %2s %2s\n",
/* Translation Hint: max 2 chars */
_("r"),
/* Translation Hint: max 2 chars */
@@ -217,7 +217,9 @@ static void new_header(void)
/* Translation Hint: max 2 chars */
_("id"),
/* Translation Hint: max 2 chars */
- _("wa"));
+ _("wa"),
+ /* Translation Hint: max 2 chars */
+ _("st"));
}
static unsigned long unitConvert(unsigned int size)
@@ -230,7 +232,7 @@ static unsigned long unitConvert(unsigne
static void new_format(void)
{
const char format[] =
- "%2u %2u %6lu %6lu %6lu %6lu %4u %4u %5u %5u %4u %4u %2u %2u %2u %2u\n";
+ "%2u %2u %6lu %6lu %6lu %6lu %4u %4u %5u %5u %4u %4u %2u %2u %2u %2u %2u\n";
unsigned int tog = 0; /* toggle switch for cleaner code */
unsigned int i;
unsigned int hz = Hertz;
@@ -273,8 +275,8 @@ static void new_format(void)
(unsigned)( (100*duse + divo2) / Div ),
(unsigned)( (100*dsys + divo2) / Div ),
(unsigned)( (100*didl + divo2) / Div ),
- (unsigned)( (100*diow + divo2) / Div )/*,
- (unsigned)( (100*dstl + divo2) / Div ) */
+ (unsigned)( (100*diow + divo2) / Div ),
+ (unsigned)( (100*dstl + divo2) / Div )
);
/* main loop */
@@ -338,9 +342,9 @@ static void new_format(void)
/* id */
(unsigned)( (100*didl+divo2)/Div ),
/* wa */
- (unsigned)( (100*diow+divo2)/Div )/*,
- / * st * /
- (unsigned)( (100*dstl+divo2)/Div ) */
+ (unsigned)( (100*diow+divo2)/Div ),
+ /* st */
+ (unsigned)( (100*dstl+divo2)/Div )
);
}
}
++++++ procps-v3.3.3-tinfo.dif ++++++
--- configure.ac
+++ configure.ac 2012-06-04 10:57:01.592841076 +0000
@@ -170,9 +170,17 @@ else
else
WATCH_NCURSES_LIBS="$NCURSES_LIBS"
fi
+ cf_tinfo=""
+ AC_CHECK_LIB(tinfo, setupterm, [cf_tinfo="tinfo"])
+ if test x$cf_tinfo = xtinfo ; then
+ TOP_NCURSES_LIBS="-ltinfo"
+ else
+ TOP_NCURSES_LIBS="$NCURSES_LIBS"
+ fi
fi
AC_SUBST([NCURSES_LIBS])
AC_SUBST([WATCH_NCURSES_LIBS])
+AC_SUBST([TOP_NCURSES_LIBS])
AC_ARG_ENABLE([kill],
AS_HELP_STRING([--disable-kill], [do not build kill]),
--- top/Makefile.am
+++ top/Makefile.am 2012-06-04 10:58:15.024104602 +0000
@@ -19,7 +19,7 @@ top_SOURCES = \
dist_man_MANS = \
top.1
-top_LDADD = @NCURSES_LIBS@
+top_LDADD = @TOP_NCURSES_LIBS@
endif
EXTRA_DIST =
++++++ procps-v3.3.3-top.1.diff ++++++
--- top/top.1
+++ top/top.1 2012-06-01 14:25:06.216010097 +0000
@@ -23,7 +23,7 @@
..
\# Setup ////////////////////////////////////////////////////////////////
\# ** Comment out '.nr' or set to 0 to eliminate WIDTH fiddlin' !
-.nr half_xtra 4
+.nr half_xtra 0
.
.ll +(\n[half_xtra] + \n[half_xtra])
.
@@ -46,15 +46,15 @@
.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
.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
@@ -818,7 +818,7 @@ Use either of these keys if you have a l
to see current status,
.TP 7
-\ \ \'\fB?\fR\' | \'\fBh\fR\' :\fIHelp \fR
+\ \ '\fB?\fR' | '\fBh\fR' :\fIHelp \fR
There are two help levels available.
The first will provide a reminder of all the basic \*(CIs.
If \*(We is\fI secured\fR, that screen will be abbreviated.
@@ -827,7 +827,7 @@ Typing 'h' or '?' on that help screen wi
those \*(CIs applicable to \*(AM.
.TP 7
-\ \ \'\fB=\fR\' :\fIExit-Task-Limits \fR
+\ \ '\fB=\fR' :\fIExit-Task-Limits \fR
Removes restrictions on which tasks are shown.
This command will reverse any 'i' (idle tasks) and 'n' (max tasks)
commands that might be active.
@@ -843,13 +843,13 @@ vertical and horizontal scrolling.
When operating in \*(AM this command has a broader meaning.
.TP 7
-\ \ \'\fBA\fR\' :\fIAlternate-Display-Mode\fR toggle \fR
+\ \ '\fBA\fR' :\fIAlternate-Display-Mode\fR toggle \fR
This command will switch between \*(FM and \*(AM.
\*(XT 5. ALTERNATE\-DISPLAY Provisions and the 'g' \*(CI for insight
into \*(CWs and \*(FGs.
.TP 7
-\ \ \'\fBB\fR\' :\fIBold-Disable/Enable\fR toggle \fR
+\ \ '\fBB\fR' :\fIBold-Disable/Enable\fR toggle \fR
This command will influence use of the 'bold' terminfo capability and
alters\fB both\fR the \*(SA and \*(TA for the \*(CW.
While it is intended primarily for use with dumb terminals, it can be
@@ -861,7 +861,7 @@ Thus, unless the 'x' and/or 'y' toggles
there will be no visual confirmation that they are even on.
.TP 7
-*\ \'\fBd\fR\' | \'\fBs\fR\' :\fIChange-Delay-Time-interval \fR
+*\ '\fBd\fR' | '\fBs\fR' :\fIChange-Delay-Time-interval \fR
You will be prompted to enter the delay time, in seconds, between
display updates.
@@ -875,26 +875,26 @@ If at any time you wish to know the curr
help and view the system summary on the second line.
.TP 7
-\ \ \'\fBg\fR\' :\fIChoose-Another-Window/Field-Group \fR
+\ \ '\fBg\fR' :\fIChoose-Another-Window/Field-Group \fR
You will be prompted to enter a number between 1 and 4 designating the
\*(FG which should be made the \*(CW.
You will soon grow comfortable with these 4 windows, especially after
experimenting with \*(AM.
.TP 7
-\ \ \'\fBH\fR\' :\fIThreads-mode\fR toggle \fR
+\ \ '\fBH\fR' :\fIThreads-mode\fR toggle \fR
When this toggle is \*O, individual threads will be displayed for all
processes in all visible \*(TWs.
Otherwise, \*(We displays a summation of all threads in each process.
.TP 7
-\ \ \'\fBI\fR\' :\fIIrix/Solaris-Mode\fR toggle \fR
+\ \ '\fBI\fR' :\fIIrix/Solaris-Mode\fR toggle \fR
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.
.TP 7
-*\ \'\fBk\fR\' :\fIKill-a-task \fR
+*\ '\fBk\fR' :\fIKill-a-task \fR
You will be prompted for a PID and then the signal to send.
The default signal, as reflected in the prompt, is SIGTERM.
However, you can send any signal, via number or name.
@@ -905,24 +905,24 @@ depending on your progress:
2) at the signal prompt, type 0
.TP 7
-\ \ \'\fBq\fR\' :\fIQuit \fR
+\ \ '\fBq\fR' :\fIQuit \fR
.TP 7
-*\ \'\fBr\fR\' :\fIRenice-a-Task \fR
+*\ '\fBr\fR' :\fIRenice-a-Task \fR
You will be prompted for a PID and then the value to nice it to.
Entering a positive value will cause a process to lose priority.
Conversely, a negative value will cause a process to be viewed more
favorably by the kernel.
.TP 7
-\ \ \'\fBW\fR\' :\fIWrite-the-Configuration-File \fR
+\ \ '\fBW\fR' :\fIWrite-the-Configuration-File \fR
This will save all of your options and toggles plus the current
display mode and delay time.
By issuing this command just before quitting \*(We, you will be able
restart later in exactly that same state.
.TP 7
-\ \ \'\fBZ\fR\' :\fIChange-Color-Mapping
+\ \ '\fBZ\fR' :\fIChange-Color-Mapping
This key will take you to a separate screen where you can change the
colors for the \*(CW, or for all windows.
For details regarding this \*(CI \*(Xt 4d. COLOR Mapping.
@@ -943,12 +943,12 @@ These commands always impact just the \*
\*(CWs and \*(FGs.
.TP 7
-\ \ \'\fBl\fR\' :\fILoad-Average/Uptime\fR toggle \fR
+\ \ '\fBl\fR' :\fILoad-Average/Uptime\fR toggle \fR
This is also the line containing the program name (possibly an alias)
when operating in \*(FM or the \*(CW name when operating in \*(AM.
.TP 7
-\ \ \'\fBt\fR\' :\fITask/Cpu-States\fR toggle \fR
+\ \ '\fBt\fR' :\fITask/Cpu-States\fR toggle \fR
This command affects from 2 to many \*(SA lines, depending on the state
of the '1' toggle and whether or not \*(We is running under true SMP.
@@ -956,7 +956,7 @@ This portion of the \*(SA is also influe
as reflected in the total label which shows either 'Tasks' or 'Threads'.
.TP 7
-\ \ \'\fB1\fR\' :\fISingle/Separate-Cpu-States\fR toggle \fR
+\ \ '\fB1\fR' :\fISingle/Separate-Cpu-States\fR toggle \fR
This command affects how the 't' command's Cpu States portion is shown.
Although this toggle exists primarily to serve massively-parallel SMP
machines, it is not restricted to solely SMP environments.
@@ -967,7 +967,7 @@ Otherwise, each \*(Pu is displayed separ
up to available screen height.
.TP 7
-\ \ \'\fBm\fR\' :\fIMemory/Swap-Usage\fR toggle \fR
+\ \ '\fBm\fR' :\fIMemory/Swap-Usage\fR toggle \fR
This command affects the two \*(SA lines dealing with physical
and virtual memory.
@@ -992,12 +992,12 @@ The following commands will also be infl
global 'B' (bold enable) toggle.
.TP 7
-\ \ \'\fBb\fR\' :\fIBold/Reverse\fR toggle \fR
+\ \ '\fBb\fR' :\fIBold/Reverse\fR toggle \fR
This command will impact how the 'x' and 'y' toggles are displayed.
Further, it will only be available when at least one of those toggles is \*O.
.TP 7
-\ \ \'\fBx\fR\' :\fIColumn-Highlight\fR toggle \fR
+\ \ '\fBx\fR' :\fIColumn-Highlight\fR toggle \fR
Changes highlighting for the current sort field.
If you forget which field is being sorted this command can serve as a quick
visual reminder, providing the sort field is being displayed.
@@ -1006,7 +1006,7 @@ The sort field might\fI not\fR be visibl
2) the 'f' \*(CI turned it \*F
.TP 7
-\ \ \'\fBy\fR\' :\fIRow-Highlight\fR toggle \fR
+\ \ '\fBy\fR' :\fIRow-Highlight\fR toggle \fR
Changes highlighting for "running" tasks.
For additional insight into this task state,
\*(Xt 3a. DESCRIPTIONS of Fields, the 'S' field (Process Status).
@@ -1015,7 +1015,7 @@ Use of this provision provides important
The only costs will be a few additional tty escape sequences.
.TP 7
-\ \ \'\fBz\fR\' :\fIColor/Monochrome\fR toggle \fR
+\ \ '\fBz\fR' :\fIColor/Monochrome\fR toggle \fR
Switches the \*(CW between your last used color scheme and the older form
of black-on-white or white-on-black.
This command will alter\fB both\fR the \*(SA and \*(TA but does not affect
@@ -1026,20 +1026,20 @@ the state of the 'x', 'y' or 'b' toggles
.B CONTENT\fR of \*(TW
.PD 0
.TP 7
-\ \ \'\fBc\fR\' :\fICommand-Line/Program-Name\fR toggle \fR
+\ \ '\fBc\fR' :\fICommand-Line/Program-Name\fR toggle \fR
This command will be honored whether or not the 'COMMAND' column
is currently visible.
Later, should that field come into view, the change you applied will be seen.
.TP 7
-\ \ \'\fBf\fR\' | \'\fBF\fR\' :\fIFields-Management \fR
+\ \ '\fBf\fR' | '\fBF\fR' :\fIFields-Management \fR
These keys display a separate screen where you can change which fields are
displayed, their order and also designate the sort field.
For additional information on these \*(CIs
\*(Xt 3b. MANAGING Fields.
.TP 7
-\ \ \'\fBS\fR\' :\fICumulative-Time-Mode\fR toggle \fR
+\ \ '\fBS\fR' :\fICumulative-Time-Mode\fR toggle \fR
When 'Cumulative mode' is \*O, each process is listed with the \*(Pu
time that it and its dead children have used.
@@ -1055,7 +1055,7 @@ If you wish to know in advance whether o
effect, simply ask for help and view the window summary on the second line.
.TP 7
-\ \ \'\fBu\fR' | '\fBU\fR' :\fIShow-Specific-User-Only \fR
+\ \ '\fBu\fR' | '\fBU\fR' :\fIShow-Specific-User-Only \fR
You will be prompted for the\fB uid\fR or\fB name\fR of the user to display.
The '-u' option matches on \fB effective\fR user whereas the '-U' option
matches on\fB any\fR user (real, effective, saved, or filesystem).
@@ -1068,7 +1068,7 @@ Later, if you wish to monitor all tasks
command but just press <Enter> at the prompt.
.TP 7
-\ \ \'\fBV\fR' :\fIForest-View-Mode\fR toggle \fR
+\ \ '\fBV\fR' :\fIForest-View-Mode\fR toggle \fR
In this mode, processes are reordered according to their parents and
the layout of the COMMAND column resembles that of a tree.
In forest view mode it is still possible to toggle between program
@@ -1084,7 +1084,7 @@ mode in the \*(CW.
.B SIZE\fR of \*(TW
.PD 0
.TP 7
-\ \ \'\fBi\fR\' :\fIIdle-Process\fR toggle \fR
+\ \ '\fBi\fR' :\fIIdle-Process\fR toggle \fR
Displays all tasks or just active tasks.
When this toggle is \*F, tasks that have not used any \*(PU since the
last update will not be displayed.
@@ -1096,7 +1096,7 @@ If this command is applied to the last \
affect the window's size, as all prior \*(TDs will have already been painted.
.TP 7
-\ \ \'\fBn\fR\' | \'\fB#\fR\' :\fISet-Maximum-Tasks \fR
+\ \ '\fBn\fR' | '\fB#\fR' :\fISet-Maximum-Tasks \fR
You will be prompted to enter the number of tasks to display.
The lessor of your number and available screen rows will be used.
@@ -1134,12 +1134,12 @@ The sort field might\fI not\fR be visibl
2) the 'f' \*(CI turned it \*F
.TP 7
-\ \ \'\fB<\fR\' :\fIMove-Sort-Field-Left \fR
+\ \ '\fB<\fR' :\fIMove-Sort-Field-Left \fR
Moves the sort column to the left unless the current sort field is
the first field being displayed.
.TP 7
-\ \ \'\fB>\fR\' :\fIMove-Sort-Field-Right \fR
+\ \ '\fB>\fR' :\fIMove-Sort-Field-Right \fR
Moves the sort column to the right unless the current sort field is
the last field being displayed.
@@ -1150,14 +1150,14 @@ the current sort field is visible.
.in
.TP 7
-\ \ \'\fBf\fR\' | \'\fBF\fR\' :\fIFields-Management \fR
+\ \ '\fBf\fR' | '\fBF\fR' :\fIFields-Management \fR
These keys display a separate screen where you can change which field
is used as the sort column, among other functions.
This can be a convenient way to simply verify the current sort field,
when running \*(We with column highlighting turned \*F.
.TP 7
-\ \ \'\fBR\fR\' :\fIReverse/Normal-Sort-Field\fR toggle \fR
+\ \ '\fBR\fR' :\fIReverse/Normal-Sort-Field\fR toggle \fR
Using this \*(CI you can alternate between high-to-low and low-to-high sorts.
.PP
@@ -1236,7 +1236,7 @@ know what window is the \*(CW.
.SS 5b. COMMANDS for Windows
.\" ----------------------------------------------------------------------
.TP 7
-\ \ \'\fB-\fR\' | \'\fB_\fR\' :\fIShow/Hide-Window(s)\fR toggles \fR
+\ \ '\fB-\fR' | '\fB_\fR' :\fIShow/Hide-Window(s)\fR toggles \fR
The '-' key turns the \*(CW's \*(TD \*O and \*F.
When \*O, that \*(TA will show a minimum of the columns header you've
established with the 'f' \*(CI.
@@ -1250,7 +1250,7 @@ If all 4 \*(TDs are currently visible, t
as the only display element.
.TP 7
-*\ \'\fB=\fR\' | \'\fB+\fR\' :\fIEqualize-(re-balance)-Window(s) \fR
+*\ '\fB=\fR' | '\fB+\fR' :\fIEqualize-(re-balance)-Window(s) \fR
The '=' key forces the \*(CW's \*(TD to be visible.
It also reverses any 'i' (idle tasks), 'n' (max tasks) and 'u'/'U'
(user filter) commands that might be active.
@@ -1265,7 +1265,7 @@ except for the 'i' (idle tasks), 'n' (ma
and scrolling \*(CIs.
.TP 7
-*\ \'\fBA\fR\' :\fIAlternate-Display-Mode\fR toggle \fR
+*\ '\fBA\fR' :\fIAlternate-Display-Mode\fR toggle \fR
This command will switch between \*(FM and \*(AM.
The first time you issue this command, all four \*(TDs will be shown.
@@ -1273,7 +1273,7 @@ Thereafter when you switch modes, you wi
chosen to make visible.
.TP 7
-*\ \'\fBa\fR\' | \'\fBw\fR\' :\fINext-Window-Forward/Backward \fR
+*\ '\fBa\fR' | '\fBw\fR' :\fINext-Window-Forward/Backward \fR
This will change the \*(CW, which in turn changes the window to which
commands are directed.
These keys act in a circular fashion so you can reach any desired \*(CW
@@ -1284,7 +1284,7 @@ whenever the \*(CW name loses its emphas
the \*(TD is \*F and many commands will be restricted.
.TP 7
-*\ \'\fBg\fR\' :\fIChoose-Another-Window/Field-Group \fR
+*\ '\fBg\fR' :\fIChoose-Another-Window/Field-Group \fR
You will be prompted to enter a number between 1 and 4 designating the
\*(FG which should be made the \*(CW.
@@ -1293,7 +1293,7 @@ In \*(AM, it is simply a less convenient
commands.
.TP 7
-\ \ \'\fBG\fR\' :\fIChange-Window/Field-Group-Name \fR
+\ \ '\fBG\fR' :\fIChange-Window/Field-Group-Name \fR
You will be prompted for a new name to be applied to the \*(CW.
It does not require that the window name be visible
(the 'l' toggle to be \*O).
@@ -1301,8 +1301,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
@@ -1388,7 +1388,7 @@ available in \*(AM if the \*(CW's \*(TD
You can use these \*(CIs to locate a task row containing a particular value.
.TP 4
-'\fBL\fR\' :\fILocate-a-string\fR
+'\fBL\fR' :\fILocate-a-string\fR
You will be prompted for the case-sensitive string to locate starting from
the current window coordinates.
There are no restrictions on search string content.
@@ -1401,7 +1401,7 @@ Keying <Enter> with no input will effect
a new search string is entered.
.TP 4
-'\fB&\fR\' :\fILocate-next\fR
+'\fB&\fR' :\fILocate-next\fR
Assuming a search string has been established, \*(We will attempt to locate
the next occurrence.
++++++ procps-v3.3.3-w-notruncate.diff ++++++
--- w.c
+++ w.c 2012-06-01 14:11:59.508510289 +0000
@@ -239,7 +239,7 @@ static const proc_t *getproc(const utmp_
}
static void showinfo(utmp_t * u, int formtype, int maxcmd, int from,
- const int userlen, const int fromlen)
+ int userlen, int fromlen)
{
unsigned long long jcpu;
int ut_pid_found;
@@ -269,7 +269,13 @@ static void showinfo(utmp_t * u, int for
strncpy(uname, u->ut_user, UT_NAMESIZE);
if (formtype) {
- printf("%-*.*s%-9.8s", userlen + 1, userlen, uname, u->ut_line);
+ int utlnlen = 8;
+ if (formtype > 1) {
+ userlen = strnlen(uname, UT_NAMESIZE);
+ fromlen = strnlen(u->ut_host, UT_HOSTSIZE);
+ utlnlen = strnlen(u->ut_line, UT_LINESIZE);
+ }
+ printf("%-*.*s%-*.*s", userlen + 1, userlen, uname, utlnlen + 1, utlnlen, u->ut_line);
if (from)
print_host(u->ut_host, UT_HOSTSIZE, fromlen);
print_logintime(u->ut_time, stdout);
@@ -319,6 +325,7 @@ static void __attribute__ ((__noreturn__
fputs(_(" -h, --no-header do not print header\n"
" -u, --no-current ignore current process username\n"
" -s, --short short format\n"
+ " -n, --no-truncat non truncated listing (large)\n"
" -f, --from show remote hostname field\n"
" -o, --old-style old style output\n"), out);
fputs(USAGE_SEPARATOR, out);
@@ -347,6 +354,7 @@ int main(int argc, char **argv)
{"no-header", no_argument, NULL, 'h'},
{"no-current", no_argument, NULL, 'u'},
{"sort", no_argument, NULL, 's'},
+ {"no-truncat", no_argument, NULL, 'n'},
{"from", no_argument, NULL, 'f'},
{"old-style", no_argument, NULL, 'o'},
{"help", no_argument, NULL, HELP_OPTION},
@@ -365,7 +373,7 @@ int main(int argc, char **argv)
#endif
while ((ch =
- getopt_long(argc, argv, "husfoV", longopts, NULL)) != -1)
+ getopt_long(argc, argv, "husnfoV", longopts, NULL)) != -1)
switch (ch) {
case 'h':
header = 0;
@@ -376,6 +384,10 @@ int main(int argc, char **argv)
case 's':
longform = 0;
break;
+ case 'n':
+ longform = 2;
+ header = 0;
+ break;
case 'f':
from = !from;
break;
++++++ procps-v3.3.3-w-simply-work.diff ++++++
--- w.c
+++ w.c 2012-06-01 14:18:26.088580533 +0000
@@ -435,9 +435,19 @@ int main(int argc, char **argv)
maxcmd = atoi(p);
else
maxcmd = 80;
+#if 0
+ /*
+ * I have no idea why it shouldn't be allowed to see the result
+ * with a line wrap. The other solution would be to create a
+ * wcat alias, which does w|cat to work around this, but this
+ * would be stupid in my opinion.
+ */
if (maxcmd < 71)
xerrx(EXIT_FAILURE, _("%d column window is too narrow"), maxcmd);
-
+#else
+ if (maxcmd < 71)
+ xwarnx(_("%d column window could be to too narrow"), maxcmd);
+#endif
maxcmd -= 21 + userlen + (from ? fromlen : 0) + (longform ? 20 : 0);
if (maxcmd < 3)
xwarnx(_("warning: screen width %d suboptimal"), win.ws_col);
++++++ procps-v3.3.3-watch.patch ++++++
--- watch.c
+++ watch.c 2012-06-04 15:13:19.484011000 +0200
@@ -53,6 +53,7 @@
#include
#ifdef WITH_WATCH8BIT
# include
+# include
# include
#else
# include
@@ -296,7 +297,11 @@ wint_t my_getwc(FILE * s)
}
#endif /* WITH_WATCH8BIT */
+#ifdef WITH_WATCH8BIT
+void output_header(wchar_t *restrict wcommand, int wcommand_columns, int wcommand_characters, double interval)
+#else
void output_header(char *restrict command, double interval)
+#endif /* WITH_WATCH8BIT */
{
time_t t = time(NULL);
char *ts = ctime(&t);
@@ -434,8 +439,8 @@ int run_command(char *restrict command,
c = carry;
carry = WEOF;
}
- } while (c != WEOF && !isprint(c)
- && c < 12
+ } while (c != WEOF && !iswprint(c)
+ && c < 128
&& wcwidth(c) == 0
&& c != L'\n'
&& c != L'\t'
@@ -718,7 +723,11 @@ int main(int argc, char *argv[])
}
if (show_title)
+#ifdef WITH_WATCH8BIT
+ output_header(wcommand, wcommand_columns, wcommand_characters, interval);
+#else
output_header(command, interval);
+#endif /* WITH_WATCH8BIT */
if (run_command(command, command_argv))
break;
--- skill.c
+++ skill.c 2012-06-04 13:28:45.700010498 +0000
@@ -98,7 +98,8 @@ static void hurt_proc(int tty, int uid,
fprintf(stderr, "%-8s %-8s %5d %-16.16s ? ",
(char *)dn_buf, user_from_uid(uid), pid, cmd);
fflush (stdout);
- getline(&buf, &len, stdin);
+ if (getline(&buf, &len, stdin) == -1)
+ return;
if (rpmatch(buf) < 1) {
free(buf);
return;
--- configure.ac
+++ configure.ac 2012-06-04 13:33:19.308509976 +0000
@@ -125,7 +125,7 @@ AC_CHECK_FUNCS([\
wcwidth
])
-usrbin_execdir='${exec_prefix}/usr/bin'
+usrbin_execdir='${exec_prefix}/bin'
AC_SUBST([usrbin_execdir])
AM_GNU_GETTEXT_VERSION([0.14.1])
--- proc/libprocps.sym
+++ proc/libprocps.sym 2012-06-04 15:01:39.280509970 +0000
@@ -11,6 +11,7 @@ global:
escaped_copy;
free_slabinfo;
get_pid_digits;
+ get_proc_stats;
get_slabinfo;
getbtime;
getdiskstat;
++++++ procps-v3.3.3-xen.dif ++++++
--- vmstat.c
+++ vmstat.c 2012-06-01 15:54:39.388411889 +0000
@@ -244,7 +244,7 @@ static void new_format(void)
unsigned int intr[2], ctxt[2];
unsigned int sleep_half;
unsigned long kb_per_page = sysconf(_SC_PAGESIZE) / 1024ul;
- int debt = 0; /* handle idle ticks running backwards */
+ long long debt = 0; /* handle idle ticks running backwards */
sleep_half = (sleep_time / 2);
new_header();
@@ -261,6 +261,7 @@ static void new_format(void)
dstl = *cpu_zzz;
Div = duse + dsys + didl + diow + dstl;
divo2 = Div / 2UL;
+ if (Div == 0) Div++;
printf(format,
running, blocked,
unitConvert(kb_swap_used), unitConvert(kb_main_free),
@@ -305,16 +306,17 @@ static void new_format(void)
/* idle can run backwards for a moment -- kernel "feature" */
if (debt) {
- didl = (int)didl + debt;
- debt = 0;
+ didl = (long long)didl + debt;
+ debt = 0LL;
}
- if ((int)didl < 0) {
- debt = (int)didl;
- didl = 0;
+ if ((long long)didl < 0) {
+ debt = (long long)didl;
+ didl = 0ULL;
}
Div = duse + dsys + didl + diow + dstl;
divo2 = Div / 2UL;
+ if (Div == 0) continue;
printf(format,
running,
blocked,
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org