Commit Graph

61 Commits

Author SHA1 Message Date
Gilles Espinasse
f0b7271810 procps-ng testsuite : simplify DEJAGNU workaround
No need to distribute an empty file
/dev/null is enought to silent global config file warning

Signed-off-by: Gilles Espinasse <g.esp@free.fr>
2013-05-26 07:32:02 +10:00
Jim Warner
2ede50902f top: provide a build option to change memory precision
When summary & task area memory scaling was introduced
in release 3.3.6, the memory field widths were widened
slightly so unscaled KiB values could be provided more
consistently and scaled values (beyond MiB) could show
3 decimal places of precision. However, some users may
prefer the former widths/precisions for memory fields.

This commit will provide a build time configure option
to return top to those former defaults as a compliment
to a new %CPU & %MEM field precision configure option.

Reference(s):
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=707648
commit 21e550bc08

Signed-off-by: Jim Warner <james.warner@comcast.net>
2013-05-19 09:40:42 +10:00
Jim Warner
77abe18d01 top: revert %CPU and %MEM precision to former defaults
When summary & task area memory scaling was introduced
in release 3.3.6, the percentage columns were expanded
to provide 3 decimal places of precision. In hindsight
that may have been overkill, making those columns more
of a distraction than useful, with just too much info.

This patch will revert those columns to the former one
decimal place. And as was true, that decimal point may
be sacrificed depending on the number of cpus present.

And, in case anyone might prefer additional precision,
a build option can provide it (--enable-wide-percent).

Reference(s):
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=707648
http://www.freelists.org/post/procps/What-happened-to-my-top,1
commit 21e550bc08

Signed-off-by: Jim Warner <james.warner@comcast.net>
2013-05-19 09:40:42 +10:00
Jim Warner
25201bc9fe build-sys: allow a build when libdl.so is truly absent
The earlier commit purporting to allow top to be built
in the absence of that dynamic linking library stopped
just a little short of the truth. So this will fix it.

Reference(s):
commit 5686877cd4

Signed-off-by: Jim Warner <james.warner@comcast.net>
2013-05-11 08:23:52 +10:00
Craig Small
dbe27d3ad1 Updated configure.ac
Been a while since we ran a re-scan over the autotools files. This
change modernises the configure file.  Not a great deal of changes
required to bring us up to date, autoscan doesn't understand our
optional things, which is fine.
2013-05-05 10:07:30 +10:00
Jim Warner
5686877cd4 build-sys: eliminate dependencies for the NUMA support
Oh that poor ol' build system. With this patch it will
have gone through three separate incarnations in terms
of NUMA/Node support. Those 3 iterations consisted of:

1. A 'porridge too hot' where the top numa support was
enabled if it was built in the presence of libnuma and
the numa.h header. But if the numa library wasn't part
of core packages, that would have broken poor old top.

2. A 'porridge too cold' where numa support was off by
default and must have been explicitly enabled when the
./configure script was run. This could have meant that
distros might not distribute a numa-aware procps, even
though their numa library would have been distributed.

3. And this 'porridge' where the top numa support will
become a 'plug-in' feature activated when the presence
of libnuma.so can be verified at runtime. We'll do our
own loading and symbol resolution (with some help from
dlopen in libdl). Thus maintainers' responsibility for
enabling numa support and then satisfying that library
dependency is now an entirely optional --disable-numa.

As Goldilocks might say about our current configure.ac
"Ummm, I think this porridge tastes just about right".

Reference(s):
. 1) too-hot
commit 87ac6383bb
. 2) too-cold
commit 53fd7dd1ed
. original idea from: Dr. Fink <werner@suse.de>
http://www.freelists.org/post/procps/top-NUMA-node-CPU-utilization-support,18

Signed-off-by: Jim Warner <james.warner@comcast.net>
2013-05-05 09:12:07 +10:00
Lukas Nykryn
4c1536d5f1 ps: possibility to display machine name for a process
Library systemd-login offers possibility to display
the name of the VM or container which process belongs to.

This patch adds output option "sd_machine" which will
show machine name or "-" when the name can not be determined.

To maintain compatibility with non-systemd systems,
procps must be configured with --with-systemd option
to enable this option.
2013-04-24 09:24:44 +02:00
Lukas Nykryn
7ab5d33c5c ps: possibility to display systemd unit for a process
Library systemd-login offers possibility to display
name of a systemd unit file for specific pid. Note that
not all processes are part of a system unit/service
(e.g. user processes, or kernel threads).

This patch adds output option "sd_unit" which will
show name of systemd unit or "-", when process does not
belong to any unit.

To maintain compatibility with non-systemd systems,
procps must be configured with --with-systemd option
to enable this option.
2013-04-24 09:24:44 +02:00
Jim Warner
53fd7dd1ed build-sys: in top program, enable NUMA/Node extensions
This patch provides the build system support for those
top extensions dealing with the NUMA summary displays.

For providing the initial impetus for this enhancement
I wish to thank Lance Shelton <LShelton@fusionio.com>.

(everything is perfectly justified plus right margins)
(are completely filled, but of course it must be luck)

Signed-off-by: Jim Warner <james.warner@comcast.net>
2013-04-14 22:28:42 +10:00
Jim Warner
87ac6383bb build-sys: in top program, enable NUMA/Node extensions
This patch provides the build system support for those
top extensions dealing with the NUMA summary displays.

For providing the initial impetus for this enhancement
I wish to thank Lance Shelton <LShelton@fusionio.com>.

(everything is perfectly justified plus right margins)
(are completely filled, but of course it must be luck)

Signed-off-by: Jim Warner <james.warner@comcast.net>
Signed-off-by: Lance Shelton <LShelton@fusionio.com>
2013-04-14 22:21:41 +10:00
Rainer Müller
838e5d8941 configure: Check for error.h
For portability, check for error.h during configure and define
HAVE_ERROR_H accordingly.

If this header is not available, emulate the functionality of error()
from glibc with an inline wrapper in include/c.h.
2013-03-20 16:32:06 +01:00
Rainer Müller
6df4fc403d configure: Check for stdio_ext.h
For portability, check for stdio_ext.h during configure and define
HAVE_STDIO_EXT_H accordingly.

If the current system does not provide this header, use a fallback for
__fpending(). This definition will not work on all systems as it relies
on internal data structures of libc. A more portable solution should be
preferred, for example by using gnulib.
2013-03-20 16:32:06 +01:00
Rainer Müller
042776e04c configure: check for program_invocation_name
For portabiliy, check for program_invocation_name during configure and
define HAVE_PROGRAM_INVOCATION_NAME accordingly. Use of this symbol is
now enclosed with the appropriate #ifdef block.

The symbol program_invocation_name is only used for error message
handling using error(), so it's safe to omit this if it is not
available.
2013-03-20 16:32:06 +01:00
Jim Warner
cc61198318 build sys: add configure option for impact of SIGWINCH
Reference(s):
http://www.freelists.org/post/procps/top-won-the-sigwinch-war,3
http://www.freelists.org/post/procps/top-won-the-sigwinch-war,5

Signed-off-by: Jim Warner <james.warner@comcast.net>
2013-01-30 10:53:49 +11:00
Sami Kerola
847bf4c0c1 build-sys: configure option --enable-skill did not work
The commit 1462c4e581 had error in
variable name.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-05-07 09:01:10 +02:00
Sami Kerola
2dbb7a6743 build-sys: allow packagers to choose what is installed
Distribution maintainers may not want to use upstream example files
in their procps-ng package.

Reference: http://permalink.gmane.org/gmane.linux.arch.devel/17440
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-05-01 22:47:06 +10:00
Sami Kerola
bb4ae3d933 build-sys: make buildroot compilation work
Fixes the following error in configure stage.

configure: error: cannot run test program while cross compiling

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-04-17 21:21:20 +02:00
Sami Kerola
be26243f9c build-sys: program_invocation_short_name is defined in errno.h
The autotools check is using argp.h which can be missing in some
environments.

Reference: http://old.nabble.com/-PATCH--argp%3A-fix-program_invocation_name-detection-td30252754.html
Reference: http://lists.linuxtogo.org/pipermail/openembedded-core/2011-June/003772.html
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-04-16 20:43:16 +02:00
Sami Kerola
1462c4e581 skill, snice: do not encourage building these utilities
Both skill and snice are are mentioned in manual page to be 'obsolete
and unportable'.  This commit discourages distributors to keep these
commands part of default system.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-03-16 14:34:21 +01:00
Gilles Espinasse
90c0590b4c build-sys: fix typo
Fix a typo s/unnessary/unnecessary/ in configure --help

Signed-off-by: Gilles Espinasse <g.esp@free.fr>
2012-03-03 18:36:29 +11:00
Sami Kerola
bc3710664c build-sys: require compiler running in C99 mode
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-03-03 18:32:29 +11:00
Craig Small
502a79e02f Merge remote-tracking branch 'sami/to-craig' into sami-merge
Conflicts:
	pgrep.c
	w.c
2012-03-03 13:56:32 +11:00
Jim Warner
42fe8a9f39 build-sys: rename the 'tools' subdirectory to 'misc'
The newer tools/ subdirectory shares a common prefix
with the previously existing top/ subdirectory and
thereby hinders shell command completion.

There was already a minor conflict between testsuite/
and top/.  This patch renames the tools/ subdirecory
to avoid an even greater conflict.

Signed-off-by: Jim Warner <james.warner@comcast.net>
2012-03-02 21:25:38 +11:00
Mike Frysinger
96e86ef1a0 use pkg-config for ncurses by default
Newer ncurses install pkg-config files, so search those first.  If they
aren't found, fall back to existing detection logic.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-01-26 21:17:00 +01:00
Mike Frysinger
061de22bad fix AC_ARG_WITH(ncurses) handling
The third arg is for "the user has specified some flag", not "the user
has disabled things", so use $withval.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-01-26 21:16:59 +01:00
Samuli Suominen
62c0cf67f6 fix basic ncurses check
The first check for ncurses is for the non-wide variant, so drop the "w".
The wide version gets checked later on based on watch8bit.

Signed-off-by: Samuli Suominen <ssuominen@gentoo.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-01-26 21:16:57 +01:00
Sami Kerola
cac93d35d0 build-sys: use dist-xz
Even as conservative project as coreutils has switched to xz distributions so
neither should we have any reason to use gz and waste space & bandwidth.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-01-08 23:02:17 +01:00
Sami Kerola
794298b9f9 build-sys: use git version as package version
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-01-08 21:35:07 +01:00
Craig Small
a99002e3fe Merge branch 'master' into nls
Conflicts:
	configure.ac
	pmap.c
	ps/Makefile.am
2011-12-26 09:11:27 +11:00
Craig Small
2983b30523 Renaming libprocfs to libprocps
The library used to be called libprocps but it was renamed to make sure
there was only one. However the formatting of the library SONAME has
changed so there cannot be any confusion.

libprocps makes it clear that its a library from this project and not a
set of functions directly on the filesystem.
2011-12-23 09:18:43 +11:00
Jim Warner
32a9adbc13 top: provide extensive, generalized nls support
Reviewed-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Jim Warner <james.warner@comcast.net>
2011-12-22 23:48:04 +11:00
Sami Kerola
b40353c91e skill: use rpmatch() to yes/no question
The patch also removes fixed size of input, which can be problematic.
I do not know how long the string `yes' might be in all of the worlds
languages.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-12-20 17:30:53 +01:00
Sami Kerola
b260b11a3b lib: add strtol into utility library
The utility library is for functions which are shared in commands,
but that does not belong to libproc-ng.  The first function is a
wrapper for strtol that performs error checking, and exists if such
happen.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-12-20 17:30:52 +01:00
Jim Warner
364325362d build-sys: we don't need wide-ncurses, what were we thinking?
. 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.
2011-12-20 17:30:52 +01:00
Jim Warner
50fca987cc build-sys: added tabs to AC_CONFIG_FILES for consistency 2011-12-20 17:30:51 +01:00
Jim Warner
326c510e70 build-sys: alphabeticized strverscmp in AC_CHECK_FUNCS 2011-12-20 17:30:51 +01:00
Jim Warner
cb10eb8e18 build-sys: added some missing files to AC_CHECK_HEADERS 2011-12-20 17:30:51 +01:00
Jim Warner
0d48df69a4 build-sys: corrected/simplified ncurses support detection 2011-12-20 17:30:51 +01:00
Sami Kerola
ab3ff3cdab build-sys: add missing files to distribution
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-12-20 17:30:51 +01:00
Sami Kerola
a220ba6770 build-sys: add NLS support
Add GNU gettext internationalization and localization support.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-12-20 17:17:03 +01:00
Craig Small
367b8bb616 Fixed watch 8 bit so its optional
You can make watch 8bit clean by using the configure option
--enable-watch8bit
2011-12-20 22:12:37 +11:00
unknown
fe82a3246a 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
2011-12-18 10:53:44 +11:00
Craig Small
38763ede40 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.
2011-12-17 22:35:05 +11:00
Craig Small
5a991f0444 updated to version 3.3.2 2011-12-14 23:10:55 +11:00
Craig Small
3d807ae853 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.
2011-12-03 00:32:14 +11:00
Craig Small
61dec8f664 Merge remote-tracking branch 'main/master' into testsuite 2011-11-27 22:49:14 +11:00
Craig Small
20463f1a13 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
2011-11-27 22:47:17 +11:00
Craig Small
451f6e6111 testsuite fixes 2011-11-23 21:44:51 +11:00
Sami Kerola
64b420936e libproc-ng: add pkg-config support
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-11-05 14:13:40 +01:00
Jim Warner
fadce3f1b2 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
2011-10-31 22:05:17 +11:00