]> granicus.if.org Git - procps-ng/log
procps-ng
13 years agosysctl: add --system switch
Ludwig Nussel [Fri, 7 Oct 2011 07:10:49 +0000 (09:10 +0200)]
sysctl: add --system switch

instead of requiring distributions to construct a loop around sysctl
in boot scripts just scan a set of default directories if the --system
switch is used.

Config files are applied in alphabetic order of their base name.
Each base name is only applied once according to the directory
preference. /etc/sysctl.conf is always applied last.

Signed-off-by: Ludwig Nussel <ludwig.nussel@suse.de>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agops: new usage function
Sami Kerola [Sun, 2 Oct 2011 11:07:35 +0000 (13:07 +0200)]
ps: new usage function

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agodocs: clean up kill and skill man pages
Sami Kerola [Sat, 1 Oct 2011 23:15:12 +0000 (01:15 +0200)]
docs: clean up kill and skill man pages

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agoskill: new usage function
Sami Kerola [Sat, 1 Oct 2011 22:24:52 +0000 (00:24 +0200)]
skill: new usage function

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agodocs: mention long options in man vmstat.8
Sami Kerola [Wed, 28 Sep 2011 20:54:05 +0000 (22:54 +0200)]
docs: mention long options in man vmstat.8

This commit includes generic manual clean ups as well.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agovmstat: add long options & new usage function
Sami Kerola [Wed, 28 Sep 2011 20:23:33 +0000 (22:23 +0200)]
vmstat: add long options & new usage function

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agodocs: fix free.1 groff syntax
Sami Kerola [Tue, 27 Sep 2011 21:04:35 +0000 (23:04 +0200)]
docs: fix free.1 groff syntax

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agodocs: mention long options in man pgrep.1
Sami Kerola [Tue, 27 Sep 2011 20:42:51 +0000 (22:42 +0200)]
docs: mention long options in man pgrep.1

This commit includes generic manual clean ups as well.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agow: new usage & fix coding style
Sami Kerola [Sun, 5 Jun 2011 12:34:42 +0000 (14:34 +0200)]
w: new usage & fix coding style

Coding style fixed and more readable help output.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agoinclude/devname.h: add missing header
Sami Kerola [Sun, 5 Jun 2011 11:23:15 +0000 (13:23 +0200)]
include/devname.h: add missing header

The devname.h requires readproc.h header which has dev_t. Unless
header is included the includes in program files must be in
correct order. I also added FIXME item to remind that for uid &
gid value int not correct data type but uid_t or gid_t from
pwd.h.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agotload: new usage & fix coding style
Sami Kerola [Sun, 5 Jun 2011 11:19:35 +0000 (13:19 +0200)]
tload: new usage & fix coding style

Coding style fixed and more readable help output.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agouptime: new usage & fix coding style
Sami Kerola [Sat, 4 Jun 2011 19:33:11 +0000 (21:33 +0200)]
uptime: new usage & fix coding style

Coding style fixed and more readable help output.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agoslabtop: new usage & fix coding style
Sami Kerola [Sat, 4 Jun 2011 16:58:25 +0000 (18:58 +0200)]
slabtop: new usage & fix coding style

Coding style fixed and more readable help output.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agopwdx.c: new usage & fix coding style
Sami Kerola [Sat, 4 Jun 2011 16:56:08 +0000 (18:56 +0200)]
pwdx.c: new usage & fix coding style

Coding style fixed and new help output.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agopgrep: add long options & new usage
Sami Kerola [Mon, 26 Sep 2011 20:03:43 +0000 (22:03 +0200)]
pgrep: add long options & new usage

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agofree: do not mix declarations and code [smatch scan]
Sami Kerola [Sat, 24 Sep 2011 06:41:26 +0000 (08:41 +0200)]
free: do not mix declarations and code [smatch scan]

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agodocs: mention long options in man sysctl.8
Sami Kerola [Mon, 6 Jun 2011 21:17:20 +0000 (23:17 +0200)]
docs: mention long options in man sysctl.8

The commit includes few generic manual clean ups as well.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agodocs: mention long options in man pmap.1
Sami Kerola [Mon, 6 Jun 2011 21:08:36 +0000 (23:08 +0200)]
docs: mention long options in man pmap.1

Also add range option to manual page. The commit includes few generic manual
clean ups as well.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agodocs: mention long options in man watch.1
Sami Kerola [Mon, 6 Jun 2011 21:02:14 +0000 (23:02 +0200)]
docs: mention long options in man watch.1

This patch also changed a little the manual page structure, and wording.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agodocs: mention long options in man w.1
Sami Kerola [Mon, 6 Jun 2011 20:53:59 +0000 (22:53 +0200)]
docs: mention long options in man w.1

The commit includes few generic manual clean ups as well.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agodocs: mention long options in man tload.1
Sami Kerola [Mon, 6 Jun 2011 20:48:26 +0000 (22:48 +0200)]
docs: mention long options in man tload.1

The commit includes few generic manual clean ups as well.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agodocs: mention long options in man uptime.1
Sami Kerola [Mon, 6 Jun 2011 20:44:05 +0000 (22:44 +0200)]
docs: mention long options in man uptime.1

The commit includes few generic manual clean ups as well.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agodocs: small nroff fixes to man slabtop.1
Sami Kerola [Mon, 6 Jun 2011 20:40:58 +0000 (22:40 +0200)]
docs: small nroff fixes to man slabtop.1

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agodocs: mention long options in man pwdx.1
Sami Kerola [Mon, 6 Jun 2011 20:34:52 +0000 (22:34 +0200)]
docs: mention long options in man pwdx.1

The commit includes few generic manual clean ups as well.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agosysctl: options handling & usage output
Sami Kerola [Sun, 5 Jun 2011 17:46:49 +0000 (19:46 +0200)]
sysctl: options handling & usage output

The sysctl now uses getopt_long and has help screen which be user
friendly. Rest of the modernization is left later, since this is
a command is used in scripts, and changing for instance error
printing to use warn & warnx could break stuff.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agopmap: new usage & fix coding style
Sami Kerola [Sun, 5 Jun 2011 16:05:26 +0000 (18:05 +0200)]
pmap: new usage & fix coding style

Coding style fixed and more readable help output.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agowatch: new usage & fix coding style
Sami Kerola [Sun, 5 Jun 2011 13:05:47 +0000 (15:05 +0200)]
watch: new usage & fix coding style

Coding style fixed and more readable help output.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agoRemoved xalloc type functions from library
Craig Small [Tue, 20 Dec 2011 11:56:17 +0000 (22:56 +1100)]
Removed xalloc type functions from library

These xalloc functions are a private function for the library. If using
programs need them, then they should make their own error reporting or
use a common file.

13 years agoAdded news item for top search capability
Craig Small [Tue, 20 Dec 2011 11:16:40 +0000 (22:16 +1100)]
Added news item for top search capability

13 years agotop: update man document for new search capability
Jim Warner [Fri, 16 Dec 2011 20:03:44 +0000 (14:03 -0600)]
top: update man document for new search capability

This commit documents the top search provisons as a
new section entitled:
   5d. SEARCHING in a window

It also adds minor unrelated content and tweaks some
miscellaneous formatting and spacing inconsistencies.

13 years agotop: add a search capability
Jim Warner [Fri, 16 Dec 2011 20:04:38 +0000 (14:04 -0600)]
top: add a search capability

13 years agoFixed watch 8 bit so its optional
Craig Small [Tue, 20 Dec 2011 11:12:37 +0000 (22:12 +1100)]
Fixed watch 8 bit so its optional

You can make watch 8bit clean by using the configure option
--enable-watch8bit

13 years agowatch: support unicode
Jarrod Lowe [Tue, 3 Nov 2009 19:24:27 +0000 (19:24 +0000)]
watch: support unicode

A patch from Debian.

Bug-Debian: http://bugs.debian.org/240989
Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/procps/+bug/318221
Backported-by: Sami Kerola <kerolasa@iki.fi>
13 years agowatch: add precision wait time option -p
Anthony DeRobertis [Tue, 24 Nov 2009 00:00:46 +0000 (11:00 +1100)]
watch: add precision wait time option -p

A patch from Debian.

Bug-Debian: http://bugs.debian.org/183486
Reviewed-by: Craig Small <csmall@debian.org>
Backported-by: Sami Kerola <kerolasa@iki.fi>
13 years agowatch: interpret ANSI color code sequences
Craig Small [Mon, 1 Mar 2010 06:17:11 +0000 (06:17 +0000)]
watch: interpret ANSI color code sequences

A patch from Debian.

Bug-Debian: http://bugs.debian.org/129334
Backported-by: Sami Kerola <kerolasa@iki.fi>
13 years agowatch: add -exec and -beep flags and has better quoting
Mordechai T. Abzug [Tue, 24 Nov 2009 00:00:43 +0000 (11:00 +1100)]
watch: add -exec and -beep flags and has better quoting

Additionally add -errexit flag (#183346).

A patch from Debian.

Bug-Debian: http://bugs.debian.org/410967
Bug-Debian: http://bugs.debian.org/183346
Reviewed-by: Craig Small <csmall@debian.org>
Backported-by: Sami Kerola <kerolasa@iki.fi>
13 years agow: use environment to set user and from/host column widths
Craig Small [Tue, 24 Nov 2009 00:00:44 +0000 (11:00 +1100)]
w: use environment to set user and from/host column widths

A patch from Debian.

Bug-Debian: http://bugs.debian.org/396423
Bug-Debian: http://bugs.debian.org/341439
Backported-by: Sami Kerola <kerolasa@iki.fi>
13 years agow: use COLUMNS environment if TIOCGWINSZ fails
Craig Small [Tue, 24 Nov 2009 00:00:43 +0000 (11:00 +1100)]
w: use COLUMNS environment if TIOCGWINSZ fails

A patch from Debian.

Backported-by: Sami Kerola <kerolasa@iki.fi>
13 years agow: bassman emulation with -o option
Craig Small [Tue, 24 Nov 2009 00:00:39 +0000 (11:00 +1100)]
w: bassman emulation with -o option

A patch from Debian.

Bug-Debian: http://bugs.debian.org/414906
Backported-by: Sami Kerola <kerolasa@iki.fi>
13 years agovmstat: do not scale si/so just like bi/bo
Michael Tokarev [Thu, 26 Nov 2009 16:55:22 +0000 (19:55 +0300)]
vmstat: do not scale si/so just like bi/bo

Use strtoull insteadof strtoul for some counters.

A patch from Debian.

Bug-Debian: http://bugs.debian.org/558361
Bug-Debian: http://bugs.debian.org/558134
Backported-by: Sami Kerola <kerolasa@iki.fi>
13 years agolibprocps-ng: sysinfo.c: truncate the vmstat figure to 32 bits
David Fries [Sat, 2 Apr 2011 17:59:17 +0000 (12:59 -0500)]
libprocps-ng: sysinfo.c: truncate the vmstat figure to 32 bits

A patch from Debian.

Bug-Debian: http://bugs.debian.org/620557
Backported-by: Sami Kerola <kerolasa@iki.fi>
13 years agotload: remote unneeded optarg and optind variables
Craig Small [Tue, 24 Nov 2009 00:00:42 +0000 (11:00 +1100)]
tload: remote unneeded optarg and optind variables

A patch from Debian.

Backported-by: Sami Kerola <kerolasa@iki.fi>
13 years agosysctl: fix up some option processing
Craig Small [Tue, 24 Nov 2009 00:00:33 +0000 (11:00 +1100)]
sysctl: fix up some option processing

A patch from Debian.

Backported-by: Sami Kerola <kerolasa@iki.fi>
13 years agoskill: kill prints perror
Justin Pryzby [Thu, 28 Feb 2008 15:59:37 +0000 (10:59 -0500)]
skill: kill prints perror

A patch from Debian.

Bug-Debian: http://bugs.debian.org/468363
Backported-by: Sami Kerola <kerolasa@iki.fi>
13 years agoskill: do not treat skill null parameter as 0
WANG Yunfeng [Fri, 16 Oct 2009 10:39:31 +0000 (18:39 +0800)]
skill: do not treat skill null parameter as 0

A patch from Debian.

Bug-Debian: http://bugs.debian.org/551173
Backported-by: Sami Kerola <kerolasa@iki.fi>
13 years agoskill: fix too greedy option parser
Craig Small [Wed, 10 Feb 2010 11:00:26 +0000 (11:00 +0000)]
skill: fix too greedy option parser

Patch based on submitted patch by Yoshio Nakamura

A patch from Debian.

Bug-Debian: http://bugs.debian.org/331419
Bug-Debian: http://bugs.debian.org/569030
Backported-by: Sami Kerola <kerolasa@iki.fi>
13 years agolibprocps-ng: readproc.c: some type conversion help
Craig Small [Tue, 24 Nov 2009 00:00:41 +0000 (11:00 +1100)]
libprocps-ng: readproc.c: some type conversion help

Return if unable to open /proc

A patch from Debian.

Backported-by: Sami Kerola <kerolasa@iki.fi>
13 years agops: rename SZ to SIZE
Craig Small [Mon, 5 Oct 2009 10:49:04 +0000 (10:49 +0000)]
ps: rename SZ to SIZE

Means we do not follow SCO but less confusion.

A patch from Debian.

Bug-Debian: http://bugs.debian.org/541061
Backported-by: Sami Kerola <kerolasa@iki.fi>
13 years agops: add sorting to %mem for ps
Jessica McKellar [Mon, 4 Oct 2010 00:17:19 +0000 (20:17 -0400)]
ps: add sorting to %mem for ps

A patch from Debian.

Bug-Debian: http://bugs.debian.org/599043
Backported-by: Sami Kerola <kerolasa@iki.fi>
13 years agopmap: provide information for -x option
Craig Small [Sun, 31 Jan 2010 11:06:04 +0000 (12:06 +0100)]
pmap: provide information for -x option

A patch from Debian.

Similiar idea to pmap written by Robert Love.

Bug-Debian: http://bugs.debian.org/347476
Bug-Debian: http://bugs.debian.org/505571
Backported-by: Sami Kerola <kerolasa@iki.fi>
13 years agopgrep: distinguish between invalid commandline parameters and '-?'
Jan Christoph Nordholz [Tue, 24 Nov 2009 00:00:49 +0000 (11:00 +1100)]
pgrep: distinguish between invalid commandline parameters and '-?'

A patch from Debian.

Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=413383
Backported-by: Sami Kerola <kerolasa@iki.fi>
13 years agopgrep: fix compiler warning saved_start_time might be used uninitialized
Craig Small [Tue, 24 Nov 2009 00:00:41 +0000 (11:00 +1100)]
pgrep: fix compiler warning saved_start_time might be used uninitialized

A patch from Debian.

Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=197342
Backported-by: Sami Kerola <kerolasa@iki.fi>
13 years agopgrep: add -c option for counting number of matched proceesses
Craig Small [Tue, 24 Nov 2009 10:00:45 +0000 (11:00 +0100)]
pgrep: add -c option for counting number of matched proceesses

A patch from Debian.

Bug-Debian: http://bugs.debian.org/375791
Backported-by: Sami Kerola <kerolasa@iki.fi>
13 years agopwdx & libprocps-ng: Hurd does not have MAX_PATH defined
Daniel Novotny [Wed, 18 Feb 2009 12:05:22 +0000 (13:05 +0100)]
pwdx & libprocps-ng: Hurd does not have MAX_PATH defined

A patch from Debian.

Bug-Redhat: https://bugzilla.redhat.com/show_bug.cgi?id=485243
Bug-Debian: http://bugs.debian.org/588677
Backported-by: Sami Kerola <kerolasa@iki.fi>
13 years agops: --sort does not work with time argument
Alfredo Esteban [Tue, 24 Nov 2009 10:00:30 +0000 (11:00 +0100)]
ps: --sort does not work with time argument

A patch from Debian.

Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508435
Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508435
Backported-by: Sami Kerola <kerolasa@iki.fi>
13 years agoskill: add CR to warning line
Craig Small [Tue, 24 Nov 2009 00:00:37 +0000 (11:00 +1100)]
skill: add CR to warning line

A patch from Debian.

Bug-Debian: http://bugs.debian.org/331419
Bug-Debian: http://bugs.debian.org/331419
Backported-by: Sami Kerola <kerolasa@iki.fi>
13 years agocontrib: minimal ps: define mips PAGE_SIZE
Ciaran McCreesh [Fri, 20 Aug 2004 06:01:35 +0000 (08:01 +0200)]
contrib: minimal ps: define mips PAGE_SIZE

A patch from Gentoo.

Bug-Gentoo: http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/sys-process/procps/files/procps-mips-define-pagesize.patch?revision=1.1&view=markup
Backported-by: Sami Kerola <kerolasa@iki.fi>
13 years agolibproc-ng: prettyfy proc mount messages
Armin van Buuren [Tue, 27 Jun 2006 03:07:09 +0000 (03:07 +0000)]
libproc-ng: prettyfy proc mount messages

A patch from Gentoo.

Bug-Gentoo: https://bugs.gentoo.org/138029?id=138029
Bug-Gentoo: http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/sys-process/procps/files/procps-3.2.7-proc-mount.patch?revision=1.1&view=markup
Bug-Gentoo: http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/sys-process/procps/files/procps-3.2.7-proc-mount.patch?revision=1.1&view=markup
Backported-by: Sami Kerola <kerolasa@iki.fi>
13 years agops: add build option to disable ps option warning
unknown [Mon, 5 Dec 2011 15:35:35 +0000 (16:35 +0100)]
ps: add build option to disable ps option warning

Slackware seems to have this patch, while it is not in use(?) Well,
the upstream procps-ng allows one to disable warnings if that is
wanted. After all having this sort of 'feature' does not cost much,
while lacking it might annoy someone.

A patch from Slackware.

Reference: http://www.ftp.be/packages/slackware/slackware_source/a/procps/procps.nowarning.diff.gz
Backported-by: Sami Kerola <kerolasa@iki.fi>
Conflicts:

proc/ksym.c

13 years agolibproc-ng: support building without WCHAR support
Hamish Moffatt [Tue, 9 Sep 2008 02:06:52 +0000 (02:06 +0000)]
libproc-ng: support building without WCHAR support

The uClibc might not have wchar.

A patch from Buildroot.

Reference: http://git.buildroot.net/buildroot/tree/package/procps/procps-wchar.patch?id=fc333e7d083d144e0f8d1c4bac061b8de2ee7510
Backported-by: Sami Kerola <kerolasa@iki.fi>
13 years agosysctl: remove index() for buildroot
Steven J. Hill [Tue, 5 Dec 2006 02:16:03 +0000 (02:16 +0000)]
sysctl: remove index() for buildroot

The uClibc does not support index() function.

A patch from Buildroot.

Reference: http://git.buildroot.net/buildroot/patch/?id=f460603f02092b4f514d108dd8b4167a7a056213
Backported-by: Sami Kerola <kerolasa@iki.fi>
13 years agoforgot to change the interface name for sym file
Craig Small [Sat, 17 Dec 2011 11:38:19 +0000 (22:38 +1100)]
forgot to change the interface name for sym file

13 years agoRename library and use proper versioning
Craig Small [Sat, 17 Dec 2011 11:35:05 +0000 (22:35 +1100)]
Rename library and use proper versioning

Previously the version of libproc always tracked the version of procps.
This doesn't work when other non-procps programs link to the library as
they are always playing catch up.

This change makes the library version independent of the procps version.
It will only be incremented when needed.

13 years agoupdated to version 3.3.2
Craig Small [Wed, 14 Dec 2011 12:10:55 +0000 (23:10 +1100)]
updated to version 3.3.2

13 years agolibrary: once again properly ignore a final empty cgroup
Jim Warner [Sun, 11 Dec 2011 18:00:50 +0000 (12:00 -0600)]
library: once again properly ignore a final empty cgroup

Commit a5881b5a4e5056d13906ce6128f6aa180d67d60e, addressing
command lines with a trailing space, produced an undesirable
side effect in the fill_cgroup_cvt() function.

This patch restores correct cgroup behavior while still
producing command lines with no trailing space.

13 years agops: exploit enhanced library memory allocation provisions
Jim Warner [Tue, 22 Nov 2011 15:36:00 +0000 (09:36 -0600)]
ps: exploit enhanced library memory allocation provisions

There were numerous ps memory allocation inconsistencies.
Some were checked for failure and others were not.

The program was modified to utilize the library memory
rouines which are consistent in dealing with errors.

(a few changes simply removed trailing whitespace)

13 years agotop: correct man doc max header width (new fields added)
Jim Warner [Tue, 15 Nov 2011 22:49:09 +0000 (16:49 -0600)]
top: correct man doc max header width (new fields added)

13 years agotop: provide own SIGRTMAX, if not already defined
Jim Warner [Tue, 6 Dec 2011 22:24:04 +0000 (16:24 -0600)]
top: provide own SIGRTMAX, if not already defined

Protect against a compile failure, as on HURD.

Reference:
  https://buildd.debian.org/status/package.php?p=procps&suite=sid
  top.c:2102:13: error: 'SIGRTMAX' undeclared (first use in this function)

13 years agotop: circumvent a false positive smatch error
Jim Warner [Thu, 8 Dec 2011 19:13:59 +0000 (13:13 -0600)]
top: circumvent a false positive smatch error

  The smatch error --------------
top.c +1414 calibrate_fields(78) error: buffer overflow 'Fieldstab' 39 <= 39

  The code -----------------------
if (P_MAXPFLGS < f) { w->endpflg = i; continue; }

  The background -----------------
The enum P_MAXPFLGS is strictly a fencepost and can *never* appear in
the arrays pflgsall or procflgs.  Thus it (39th element) cannot be used
in referencing Fieldstab.

However, two enums of higher value (X_XON=40 and X_XOF=41) *can* appear
in those arrays.  But the test against the fencepost ensures that those
two enums are *never* used in referencing Fieldstab.

When the analyzer sees the conditional using '<' and not '<='
it reports a false positive.

The source was changed to accommodate the tool's deficiency

13 years agotop: forest view segmentation fault, the final solution
Jim Warner [Tue, 6 Dec 2011 18:03:15 +0000 (12:03 -0600)]
top: forest view segmentation fault, the final solution

With forest view mode under procps-ng-3.3.0, top would catch
a SEGV and exit.  The problem was thought to be related to
some linux version 3 anamoly.

In procps-ng-3.3.1, top was protected from abnormal exit and
would display the offending processes with the special orphan
notation '?', instead of the usual artwork.

As it turns out, the problem wasn't with linux and could
surface under a 2.6.xx kernel,  The cause was an occasional
abnormal ordering of tid/tgid/ppid which went unresolved
due to a progressive proc table scan in the recursive
function forest_add().

By default the proc table scan now restarts at the beginning.
However, a #define TREE_ONEPASS is provided should one wish
to restore the 3.3.1 behavior with its reduced overhead.

13 years agotop: correct an obscure column highlighting buglet
Jim Warner [Tue, 6 Dec 2011 00:57:46 +0000 (18:57 -0600)]
top: correct an obscure column highlighting buglet

An anomaly would surface whenever the sort column was
made non-display under fields management.

The scroll message would report incorrect x coordinates
and the 'x' toggle would produce an unintentional
horizontal scroll.

This patch forces column highlighting off whenever field
changes are made (as is done for horizontal scrolling).
It also inactivates the 'x' toggle whenever the sort
column is not visible.

This bug has yet to be reported.

13 years agotop: improve the most heavily used library interface
Jim Warner [Thu, 17 Nov 2011 16:31:07 +0000 (10:31 -0600)]
top: improve the most heavily used library interface

In the procs_refresh() function:
. the proctable scan was simplified
. memory allocation is now much more efficient
. window ppts will usually not now need xrealloc

13 years agotop: exploit enhanced library memory allocation provisions
Jim Warner [Mon, 21 Nov 2011 19:43:17 +0000 (13:43 -0600)]
top: exploit enhanced library memory allocation provisions

Now that the library allows for customizing the response to
memory allocation errors, it is no longer necessary for top
to provide its own.

This library extension was necessary since top modifies the
termios structure and there would otherwise be no way to
restore the users tty.

13 years agolibrary: eliminate one redundant 'extern' qualifier
Jim Warner [Tue, 6 Dec 2011 15:19:11 +0000 (09:19 -0600)]
library: eliminate one redundant 'extern' qualifier

13 years agolibrary: create cmdlines consistently with no trailing space
Jim Warner [Thu, 8 Dec 2011 16:19:38 +0000 (10:19 -0600)]
library: create cmdlines consistently with no trailing space

When PROC_FILLARG was used (invoking file2strvec)
command lines contained no trailing space.

When PROC_EDITCMDLCVT was used (invoking read_unvectored)
command lines contained a trailing space.

Now both routes to a cmdline act the same -- no trailing space.

13 years agolibrary: provide for huge cmdlines, like old libproc
Jim Warner [Fri, 2 Dec 2011 09:47:19 +0000 (03:47 -0600)]
library: provide for huge cmdlines, like old libproc

The CodingStyle document suggests programs should allow for
cmdlines of at least 128k.  Only the ps program can display
such a cmdline, and only with multiple -w switches.

The library function file2strvec can essentially return
a cmdline of unlimited length.  However, the library function
fill_cmdline_cvt used an arbitrary upper limit of 2048 for
buffers automatically allocated on the stack.

This patch raises the fill_cmdline_cvt upper limit to 128k via
dymaically acquired utility buffers ensured by the openproc
function.

It also makes indentation consistent in the openproc function.

13 years agolibrary: exploit enhanced library memory allocation provisions
Jim Warner [Fri, 2 Dec 2011 23:17:02 +0000 (17:17 -0600)]
library: exploit enhanced library memory allocation provisions

There were numerous library memory allocation inconsistencies.
Some were checked for failure and others were not.

All library source modules were modified to utilize the alloc.h
memory rouines which are consistent in dealing with errors.

13 years agolibrary: expanded/generalized memory allocation provisions
Jim Warner [Wed, 16 Nov 2011 16:49:02 +0000 (10:49 -0600)]
library: expanded/generalized memory allocation provisions

A callback provision in the form of xalloc_err_handler
(of type message_fn) was added to the alloc module.

This change allowed a program like top, who alters the
termios structure, to override the default fprint(stderr...)
behavior in the event of an error.

The new function xstrdup was also added for symmetry.

13 years agoAdded Debian bug note for pgrep -u and testsuite v3.3.1
Craig Small [Tue, 6 Dec 2011 10:37:45 +0000 (21:37 +1100)]
Added Debian bug note for pgrep -u and testsuite

Makefile.am testsuite needed to explicitly state the files because while
everything else works, make distcheck fails.

NEWS got updated with the Debian bug number for pgrep -u

13 years agotop: avoid potential forest view segmentation fault
Jim Warner [Mon, 5 Dec 2011 20:10:41 +0000 (14:10 -0600)]
top: avoid potential forest view segmentation fault

13 years agorevert sentinel code for top
Craig Small [Mon, 5 Dec 2011 21:51:06 +0000 (08:51 +1100)]
revert sentinel code for top

13 years agotop: forest view contingency sentinal code added
Jim Warner [Sun, 4 Dec 2011 17:50:38 +0000 (11:50 -0600)]
top: forest view contingency sentinal code added

13 years agoslabtop check has optional spaces at start of line
Craig Small [Sun, 4 Dec 2011 11:08:23 +0000 (22:08 +1100)]
slabtop check has optional spaces at start of line

There is a race condition between expect script consuming the output
from slabtop. There were a sequences of lines that looked like
^\d+ ... \s*
with the last \s* consuming the first space on the start of the line.
However if the line takes too long to print, then expect stops there and
the space at the start of the subsquent line does not match.

The solution is a \s* at the start ofthe line.

13 years agotests: clean up kill temporary file
Sami Kerola [Sat, 3 Dec 2011 14:53:47 +0000 (15:53 +0100)]
tests: clean up kill temporary file

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agobuild-sys: site.exp does not need to be in dist package
Sami Kerola [Sat, 3 Dec 2011 13:25:25 +0000 (14:25 +0100)]
build-sys: site.exp does not need to be in dist package

The file is automatically generated by make.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agobuild-sys: simplify tests EXTRA_DIST configuration
Sami Kerola [Sat, 3 Dec 2011 13:15:51 +0000 (14:15 +0100)]
build-sys: simplify tests EXTRA_DIST configuration

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agobuild-sys: make DEJATOOL definition uncondictional
Sami Kerola [Sat, 3 Dec 2011 13:03:48 +0000 (14:03 +0100)]
build-sys: make DEJATOOL definition uncondictional

Fix to ./autogen.sh error bellow.

/usr/share/automake-1.11/am/dejagnu.am: DEJATOOL was already defined in condition LINUX, which is included in condition TRUE ...
testsuite/Makefile.am:6: ... `DEJATOOL' previously defined here

Reference: http://www.freelists.org/post/procps/procpsng-331-nearly-there,5
Reported-by: Jim Warner <james.warner@comcast.net>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agoFixing tests due to some results
Craig Small [Sat, 3 Dec 2011 13:50:36 +0000 (00:50 +1100)]
Fixing tests due to some results

Makefile will now only test for Linux systems, a work around in the
makefile due to some silly redefine restrictions.

uptime and w now won't error due to being one user logged in, thanks to
Sami for the patch

kill processes by pid test commented out due to false negatives

pwdx process 1 check also commented out due to false negatives

13 years agoMinor test fixes for non-linux
Craig Small [Fri, 2 Dec 2011 13:32:14 +0000 (00:32 +1100)]
Minor test fixes for non-linux

procps works well on Linux, on other arches there are some strange
differences due to their emulation of procfs which is not 100%
Disabling checks for non-linux until that can be sorted out.

13 years agoMerge remote-tracking branch 'csmall/testsuite'
Craig Small [Fri, 2 Dec 2011 11:42:46 +0000 (22:42 +1100)]
Merge remote-tracking branch 'csmall/testsuite'

13 years agoAdded slabtop tests
Craig Small [Fri, 2 Dec 2011 11:41:03 +0000 (22:41 +1100)]
Added slabtop tests

13 years agoslabtop prints plain ASCII in once mode
Craig Small [Fri, 2 Dec 2011 11:36:38 +0000 (22:36 +1100)]
slabtop prints plain ASCII in once mode

Using ncurses initscr/endwin clears the screen for xterm/etc it
now prints raw text using printf
Bug-Debian: http://bugs.debian.org/503089
Author: Craig Small <csmall@debian.org>

13 years agoMerge branch 'master' of gitorious.org:procps/procps
Craig Small [Thu, 1 Dec 2011 12:13:15 +0000 (23:13 +1100)]
Merge branch 'master' of gitorious.org:procps/procps

Conflicts:
NEWS

13 years agoMerge remote-tracking branch 'csmall/testsuite'
Craig Small [Thu, 1 Dec 2011 12:01:27 +0000 (23:01 +1100)]
Merge remote-tracking branch 'csmall/testsuite'

13 years ago8 bit patch added to watch
Craig Small [Thu, 1 Dec 2011 12:01:12 +0000 (23:01 +1100)]
8 bit patch added to watch

13 years agofixed small tests for pmap and ps checks
Craig Small [Thu, 1 Dec 2011 11:42:23 +0000 (22:42 +1100)]
fixed small tests for pmap and ps checks

13 years agoMore testing added for procps
Craig Small [Wed, 30 Nov 2011 12:11:35 +0000 (23:11 +1100)]
More testing added for procps

13 years agobuild-sys: add symbol map file to autotools distribution
Sami Kerola [Mon, 28 Nov 2011 14:04:38 +0000 (15:04 +0100)]
build-sys: add symbol map file to autotools distribution

The file became necessary in
commit 901e381256df03f0371cefb8a8693c46522aae61

Signed-off-by: Sami Kerola <sami.kerola@tomtom.com>
13 years agofixed pgrep and added ps tests
Craig Small [Tue, 29 Nov 2011 11:55:03 +0000 (22:55 +1100)]
fixed pgrep and added ps tests

13 years agoAdded news about 8bit char and tests
Craig Small [Mon, 28 Nov 2011 11:41:19 +0000 (22:41 +1100)]
Added news about 8bit char and tests