]> granicus.if.org Git - procps-ng/log
procps-ng
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

13 years agoWatch uses unsigned chars to be 8bit clean
Craig Small [Mon, 28 Nov 2011 11:39:09 +0000 (22:39 +1100)]
Watch uses unsigned chars to be 8bit clean

Taken from the Debian patch watch_8bitchar

13 years agoMerge remote-tracking branch 'csmall/testsuite'
Craig Small [Mon, 28 Nov 2011 11:04:17 +0000 (22:04 +1100)]
Merge remote-tracking branch 'csmall/testsuite'

13 years agoAdd sysctl check and tests to extra_dist
Craig Small [Mon, 28 Nov 2011 11:02:27 +0000 (22:02 +1100)]
Add sysctl check and tests to extra_dist

13 years agoUse real name in NAME section for top manpage
Craig Small [Sun, 27 Nov 2011 11:56:13 +0000 (22:56 +1100)]
Use real name in NAME section for top manpage

Things like lexgrog and whatis and apropos need to look a the line in
the NAME section in the manpage. There used to be a macro there which
they don't understand.
lexgrog top.1
top.1: parse failed

13 years agoMerge remote-tracking branch 'main/master' into testsuite
Craig Small [Sun, 27 Nov 2011 11:49:14 +0000 (22:49 +1100)]
Merge remote-tracking branch 'main/master' into testsuite

13 years agovmstat -p <part> works and updated version to 3.3.1
Craig Small [Sun, 27 Nov 2011 11:47:17 +0000 (22:47 +1100)]
vmstat -p <part> works and updated version to 3.3.1

configure.ac now set to 3.3.1
vmstat -p has not worked for a long time, this applies Debian patch
vmstat_part_format, the details:

Author: Daniel Novotny
Description: The contents of /proc/diskstats have changed since 2.6.25
 Changed PATH_MAX to 32 because its missing on hurd
Bug-Redhat: https://bugzilla.redhat.com/show_bug.cgi?id=485243
Bug-Debian: http://bugs.debian.org/588677
Last-Update: 2010-11-17

13 years agoadded uptime and vmstat tests
Craig Small [Sun, 27 Nov 2011 08:12:56 +0000 (19:12 +1100)]
added uptime and vmstat tests

13 years agorearranged testsuite
Craig Small [Sun, 27 Nov 2011 07:32:10 +0000 (18:32 +1100)]
rearranged testsuite

13 years agomore free tests and pgrep tests
Craig Small [Sun, 27 Nov 2011 04:30:04 +0000 (15:30 +1100)]
more free tests and pgrep tests

Almost fully testing all features of pgrep now.
free had additional tests added to it

13 years agoAdditional tests for free command
Craig Small [Thu, 24 Nov 2011 12:06:06 +0000 (23:06 +1100)]
Additional tests for free command

13 years agonew free commands
Craig Small [Wed, 23 Nov 2011 11:48:49 +0000 (22:48 +1100)]
new free commands

13 years agotestsuite fixes
Craig Small [Wed, 23 Nov 2011 10:44:51 +0000 (21:44 +1100)]
testsuite fixes

13 years agoreversed the frees added to pgrep
Craig Small [Wed, 23 Nov 2011 10:31:43 +0000 (21:31 +1100)]
reversed the frees added to pgrep

13 years agopgrep: core dropped nearly always
Sami Kerola [Sun, 20 Nov 2011 21:16:35 +0000 (22:16 +0100)]
pgrep: core dropped nearly always

The do_regcomp() tries to free command line argument.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agolibproc-ng: add pkg-config support
Sami Kerola [Sat, 5 Nov 2011 12:54:28 +0000 (13:54 +0100)]
libproc-ng: add pkg-config support

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agolibproc-ng: fix ld version script file support
Sami Kerola [Sat, 5 Nov 2011 12:29:54 +0000 (13:29 +0100)]
libproc-ng: fix ld version script file support

Notice that contents of file library.map file are almost certainly
wrong as it is making everything exported.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agobuild-sys: a minimialst approach to ncurses v3.3.0
Jim Warner [Sat, 29 Oct 2011 21:52:46 +0000 (16:52 -0500)]
build-sys: a minimialst approach to ncurses

. 3 pgms require non-wide <curses.h> or <ncurses.h>

This patch represents the tests for a minimal environment
consistent with current ncurses needs.

It should allow a successful configure and build

13 years agobuild-sys: ensure consistent procps-ng ncurses
Jim Warner [Fri, 28 Oct 2011 12:30:48 +0000 (07:30 -0500)]
build-sys: ensure consistent procps-ng ncurses

. 1 program uses curses (top)
. 2 programs use ncurses (slabtop, watch)
. all 3 include non-wide <curses.h> or <ncurses.h>
. those 3 do not currently need wide support
. but anticipating nls, we link against libncursesw

This patch ensures an environment consistent with current
and future ncurses needs.

13 years agoncurses and configure again
Craig Small [Wed, 26 Oct 2011 21:53:55 +0000 (08:53 +1100)]
ncurses and configure again

Another fix to link properly to ncurses
Some minor top fixes
Added *~ to gitignore because these files crop up sometimes

13 years agoSome tweaks for top
Craig Small [Wed, 26 Oct 2011 11:31:48 +0000 (22:31 +1100)]
Some tweaks for top

tweaked signal setup valgrind complaint as nls
some input error messages made more descriptive
eliminated audible escape a from all error messa
added include of proc readproc.h to top.h
optimization for show_special function
remove unnecessary variables clang analyze

13 years agofixed ncurses double linking
Craig Small [Wed, 26 Oct 2011 11:29:44 +0000 (22:29 +1100)]
fixed ncurses double linking

13 years agopmap fix by Jim
Craig Small [Wed, 26 Oct 2011 11:25:21 +0000 (22:25 +1100)]
pmap fix by Jim

13 years agoUpdated NEWS file with what has changed
Craig Small [Wed, 26 Oct 2011 11:24:00 +0000 (22:24 +1100)]
Updated NEWS file with what has changed

13 years agoMerge branch 'master', remote-tracking branch 'sami/ng'
Craig Small [Thu, 20 Oct 2011 11:15:27 +0000 (22:15 +1100)]
Merge branch 'master', remote-tracking branch 'sami/ng'

13 years agoMerge branch 'master', remote-tracking branch 'csmall/kfreebsd-fixes'
Craig Small [Thu, 20 Oct 2011 11:12:30 +0000 (22:12 +1100)]
Merge branch 'master', remote-tracking branch 'csmall/kfreebsd-fixes'

13 years agoAdded tar.gz to gitignore
Craig Small [Thu, 20 Oct 2011 11:08:18 +0000 (22:08 +1100)]
Added tar.gz to gitignore

13 years agotop: redesign show_special strs, in line with nls
Jim Warner [Thu, 20 Oct 2011 00:02:34 +0000 (19:02 -0500)]
top: redesign show_special strs, in line with nls

13 years agodocs: add rh analysis #2 information to contrib
Sami Kerola [Wed, 19 Oct 2011 07:39:36 +0000 (09:39 +0200)]
docs: add rh analysis #2 information to contrib

Reference information.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agorh analysis #2: top
Jim Warner [Wed, 12 Oct 2011 05:55:12 +0000 (00:55 -0500)]
rh analysis #2: top

http://www.freelists.org/post/procps/Scan-results,5

13 years agorh analysis #2: pmap
Jim Warner [Tue, 18 Oct 2011 07:36:22 +0000 (02:36 -0500)]
rh analysis #2: pmap

http://www.freelists.org/post/procps/Scan-results,5

13 years agorh analysis #2: tload
Jim Warner [Tue, 18 Oct 2011 08:43:25 +0000 (03:43 -0500)]
rh analysis #2: tload

http://www.freelists.org/post/procps/Scan-results,5

13 years agoredhat analysis: pwdx
Jim Warner [Thu, 6 Oct 2011 17:21:28 +0000 (12:21 -0500)]
redhat analysis: pwdx

13 years agoredhat analysis: pgrep
Jim Warner [Thu, 6 Oct 2011 20:58:26 +0000 (15:58 -0500)]
redhat analysis: pgrep

13 years agoredhat analysis: vmstat
Jim Warner [Thu, 6 Oct 2011 15:02:06 +0000 (10:02 -0500)]
redhat analysis: vmstat

13 years agoredhat analysis: ps/sortformat
Jim Warner [Thu, 6 Oct 2011 16:20:41 +0000 (11:20 -0500)]
redhat analysis: ps/sortformat

13 years agoredhat analysis: ps/display
Jim Warner [Thu, 6 Oct 2011 16:05:39 +0000 (11:05 -0500)]
redhat analysis: ps/display

13 years agoredhat analysis: ps/parser
Jim Warner [Thu, 6 Oct 2011 15:43:30 +0000 (10:43 -0500)]
redhat analysis: ps/parser

13 years agoredhat analysis: proc/sig
Jim Warner [Thu, 6 Oct 2011 14:31:00 +0000 (09:31 -0500)]
redhat analysis: proc/sig

13 years agoredhat analysis: proc/slab
Jim Warner [Thu, 6 Oct 2011 14:40:36 +0000 (09:40 -0500)]
redhat analysis: proc/slab

13 years agoredhat analysis: proc/sysinfo
Jim Warner [Thu, 6 Oct 2011 14:12:55 +0000 (09:12 -0500)]
redhat analysis: proc/sysinfo

13 years agoredhat analysis: proc/readproc
Jim Warner [Thu, 6 Oct 2011 13:34:26 +0000 (08:34 -0500)]
redhat analysis: proc/readproc

13 years agolibtool accommodation: kill, skill, snice
Jim Warner [Sun, 9 Oct 2011 00:02:58 +0000 (19:02 -0500)]
libtool accommodation: kill, skill, snice

13 years agobuild-sys: add BUGS, FAQ and README.top to distribution
Sami Kerola [Thu, 6 Oct 2011 14:26:24 +0000 (16:26 +0200)]
build-sys: add BUGS, FAQ and README.top to distribution

After `make install' I expect to see some files in
<prefix>/share/doc/procps-ng directory, this commit adds few most
obvious ones to there.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agoUse 7 cpu numbers not 4 for Hertz Hack
Craig Small [Fri, 7 Oct 2011 03:35:16 +0000 (14:35 +1100)]
Use 7 cpu numbers not 4 for Hertz Hack

For the small number of devices that we cannot get Hertz out of ELF
notes but the cpu numbers make sense (ie not kFreeBSD) there is a hack
by using the CPU numbers. The problem is there was 4 numbers, now there
are 7. This fixes the hack by adding all 7 to get a more correct number.

This is from Debian patch sysinfo_7_numbers
Bug-Debian: http://bugs.debian.org/460331

13 years agoFix Hertz calculation for FreeBSD
Craig Small [Thu, 6 Oct 2011 23:22:24 +0000 (10:22 +1100)]
Fix Hertz calculation for FreeBSD

FreeBSD has no good way of finding the Hertz value. ELF notes don't
work, you can't find it in a function and even asm/params.h does
not have it.  Lucky for us, it is always 100.

Based upon Debian patch patch sysinfo_kfreebsd_hertz by Petr Salinger
Bug-Debian: http://bugs.debian.org/460331
Caution, 460331 has lots of overlapping bugs all around the Hertz
problem across many arches.

13 years agoElf note AT_CLKTCK is only found on Linux
Craig Small [Thu, 6 Oct 2011 23:08:42 +0000 (10:08 +1100)]
Elf note AT_CLKTCK is only found on Linux

Suppresses a message about elf notes not found on non-Linux systems.
kFreeBSD systems, for one, don't have this so the message appears
every time you run a procps program otherwise.

Based upon Debian patch sysinfo_elfnote by Petr Salinger
Bug-Debian: http://bugs.debian.org/378157

13 years agoadapt redhat FAQ for procps-ng
jimmy jam [Tue, 4 Oct 2011 17:17:23 +0000 (12:17 -0500)]
adapt redhat FAQ for procps-ng

13 years agoadd the customary redhat FAQ
jimmy jam [Tue, 4 Oct 2011 17:16:30 +0000 (12:16 -0500)]
add the customary redhat FAQ

13 years agobuild-sys: add --enable-w-from build option
Sami Kerola [Tue, 4 Oct 2011 18:40:19 +0000 (20:40 +0200)]
build-sys: add --enable-w-from build option

Some distributions apparently want to have w command to print FROM
field by default.

Reported-by: Jaromir Capik <jcapik@redhat.com>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agobuild-sys: add --disable-kill build option
Sami Kerola [Tue, 4 Oct 2011 18:16:46 +0000 (20:16 +0200)]
build-sys: add --disable-kill build option

The kill from procps-ng is not always wanted. For example RedHat
seems to prefer kill from util-linux package.

Reported-by: Jaromir Capik <jcapik@redhat.com>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agoMerge branch 'master', remote-tracking branch 'sami/ng'
Craig Small [Sat, 1 Oct 2011 13:23:30 +0000 (23:23 +1000)]
Merge branch 'master', remote-tracking branch 'sami/ng'

13 years agobuild-sys: add ./configure --enable-oomem option
Sami Kerola [Thu, 29 Sep 2011 11:37:52 +0000 (13:37 +0200)]
build-sys: add ./configure --enable-oomem option

Add out-of-memory fields to the library and top.

Refrences:
http://www.freelists.org/post/procps/PATCH-12-Add-missed-oom-support-to-libproc
http://www.freelists.org/post/procps/PATCH-22-Initialize-smp-num-cpus-only-if-really-required

Signed-off-by: Jim Warner <james.warner@comcast.net>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agobuild-sys: sensible errors when autogen.sh requirements are is missing
Sami Kerola [Mon, 26 Sep 2011 20:27:34 +0000 (22:27 +0200)]
build-sys: sensible errors when autogen.sh requirements are is missing

<quote="Jim">
I tested the build on several "new" linux installs that didn't yet have any
development tools beyond gcc. On those systems the following error messages
were received:

  ./autogen.sh: line 46: libtoolize: command not found
  ./autogen.sh: line 47: test: =: unary operator expected
</quote>

This commit also removes few unnecessary empty lines, and makes all shell
variables to be wrote in caps & quoted properly.

Cc: Jim Warner <james.warner@comcast.net>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agomiscellaneous top and library cleanup
Craig Small [Sat, 24 Sep 2011 14:27:37 +0000 (00:27 +1000)]
miscellaneous top and library cleanup

top changes
 . refined column header width calculations
 . added error messages for:
     invalid signal ('k')
     invalad max tasks ('n')
 . corrected narrative for summary_show

library changes
 . corrected some comments (only)

13 years agobuild-sys: rename libproc to libprog-ng
Jim Warner [Thu, 22 Sep 2011 09:10:05 +0000 (04:10 -0500)]
build-sys: rename libproc to libprog-ng

The library file version string is taken from configure.ac AC_INIT.

Reference: http://www.freelists.org/archive/procps/09-2011

Signed-off-by: Jim Warner <james.warner@comcast.net>
Signed-off-by: Craig Small <csmall-procps@enc.com.au>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agobuild-sys: check strverscmp
Jim Warner [Thu, 22 Sep 2011 09:10:05 +0000 (04:10 -0500)]
build-sys: check strverscmp

This function is a GNU extension.

Signed-off-by: Jim Warner <james.warner@comcast.net>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agobuild-sys: use AC_HEADER_STDBOOL in configure.ac
Jim Warner [Thu, 22 Sep 2011 09:10:05 +0000 (04:10 -0500)]
build-sys: use AC_HEADER_STDBOOL in configure.ac

The AC_CHECK_HEADER_STDBOOL, which was used earlier, requires
autoconf 2.68 (2010-09-22), without great functional benefit in
comparison AC_HEADER_STDBOOL.  The only thing newer macro does is
a problem for many user who has older autoconf in use.

Reference: http://lists.gnu.org/archive/html/autoconf-commit/2011-02/msg00000.html

Signed-off-by: Jim Warner <james.warner@comcast.net>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agoadded ps etimes, miscellaneous top enhancements
Craig Small [Mon, 12 Sep 2011 12:18:23 +0000 (22:18 +1000)]
added ps etimes, miscellaneous top enhancements

ps program
 . etimes added for ELAPSED expressed in seconds
 . time_t used in place of former unsigned long

top program
 . corrected scroll message bug when 'x' toggle on
 . fixed forest view potential missing libflags bug
 . improved 'k' default signal invocation logic
 . enhanced logic for %CPU maximums displayed
 . made signal handling more robust and efficient

13 years agotop now has a forest view mode
Craig Small [Tue, 30 Aug 2011 12:05:45 +0000 (22:05 +1000)]
top now has a forest view mode

13 years agoadded tgid support plus miscellaneous cleanup
Craig Small [Wed, 17 Aug 2011 11:01:35 +0000 (21:01 +1000)]
added tgid support plus miscellaneous cleanup

 ps
   . added tgid support
   . made process/task naming consistent
 top
   . added tgid support
   . standardized pid related width logic
 documents
   . added tgid to ps & top man documents
 library
   . fixed OOMEM_ENABLE readtask bug
   . corrected header typo for tgid

13 years agorefined library i/f and improved performance
Craig Small [Wed, 10 Aug 2011 21:42:14 +0000 (07:42 +1000)]
refined library i/f and improved performance

 Library changes
   readproc
    . added readeither to more efficiently
      fill both process and thread proc_t
    . added readproctab3, uses readeither
    . included task path support in:
        fill_cgroup_cvt, fill_cmdline_cvt,
        read_unvectored
    . QUICK_THREADS #define allows copying
      process info vs. repeatedly reading
    . simple_nexttid no longer values ppid
    . path var made non-static in readtask
    . documented 'proc_data_t' in .h file
    . tweaked some c comments & formatting
   library.map
    . added new readeither, readproctab3
 Program changes
   ps
    . exploits readproctab3 where possible
    . improved args/comm compliance
   top
    . exploits readeither

13 years agosupgid/supgrp support, improved library interface
Craig Small [Mon, 1 Aug 2011 11:28:46 +0000 (21:28 +1000)]
supgid/supgrp support, improved library interface

 Library changes
   readproc
    . added support for supplementary groups
    . eliminated 2 potential mem leak sources
       . shortcut used for multi-threaded str
         vectors & ptrs was obsoleted
       . freeing of proc_t related dynamic
         memory now rests with the library
    . standardized/normalized many c comments
   sysinfo
    . corrected note regarding glibc & cpuinfo
   library.map
    . made the visible freeproc accessable
 Program changes
   pmap
    . initialized buffer for new readproc i/f
    . eliminated now obsolete free() call
   ps
    . added width aware supgrp support
    . initialized buffers for new readproc i/f
    . eliminated now obsolete free() calls
   top
    . added supgrp support as variable width
    . eliminated now obsolete free() calls
    . expoilted library freeproc function
    . corrected -h|v args text & spacing
    . updated some c comments
 Documentation changes
   ps.1
    . added supgid and supgrp
   top.1
    . added supgid and supgrp
    . addition of above required renumbering
      many fields in section 3a. DESCRIPTIONS

13 years agoRevert -n flag for w
Craig Small [Thu, 14 Jul 2011 22:52:45 +0000 (08:52 +1000)]
Revert -n flag for w

13 years agotop hotplug memory support
Craig Small [Thu, 14 Jul 2011 11:16:02 +0000 (21:16 +1000)]
top hotplug memory support

Another patch from Jim for top to support hot-pluggable memory. Not
fully tested on real hot-pluggable memory because neither of us have
it

13 years agomiscellaneous top program/man document cleanup
Jim Warner [Thu, 23 Jun 2011 13:45:09 +0000 (15:45 +0200)]
miscellaneous top program/man document cleanup

 Program changes
  . corrected eolcap handling if EQUCOLHDRYES defined
  . added missing terminator for OOMEM_ENABLE comment
  . tightened logic in display_fields
  . eliminated some warnings via type or cast
  . updated miscellaneous source comments
 Man Document changes
  . corrected/expanded CGROUPS narrative
  . standardized/normalized PPID narrative

Signed-off-by: Jan Görig <jgorig@redhat.com>
13 years agomiscellaneous library documentation changes
Jim Warner [Thu, 23 Jun 2011 13:39:32 +0000 (15:39 +0200)]
miscellaneous library documentation changes

 Library changes
  . standardized comments in proc_t statm/status memory definitions

Signed-off-by: Jan Görig <jgorig@redhat.com>
13 years agoKernel 3.0 version format support
Jaromír Cápík [Mon, 20 Jun 2011 15:54:06 +0000 (17:54 +0200)]
Kernel 3.0 version format support

13 years agobuild-sys: add contrib directory
Sami Kerola [Sun, 5 Jun 2011 10:17:14 +0000 (12:17 +0200)]
build-sys: add contrib directory

Move files that are not compiled to <build-root>/contrib
directory. The files consist two unmaintained commands,
alternative ps & w, and and broken utmp examination / printing
utility. The dummy.c became unnecessary at the point when
autotools where re-introduced.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>