Commit Graph

191 Commits

Author SHA1 Message Date
Guy M. Broome 45fad05b4a Solaris: get completely out of the file handling business using libproc 2018-04-05 19:38:13 -03:00
Guy M. Broome 76ef3682db Solaris: Link against libmalloc to fix various crashes 2018-03-16 11:43:48 -03:00
gmbroome 697f5bb9c1 Import Solaris support (#741)
This commit adds support for Solaris, squashed from PR #741:

Summary of additions:

* Initial setup of Solaris platform directory
* Add Solaris platform into autoconf template
* Uptime and load averages
* Add dependency on libkstat
* Basic process listing
* Zone name display
* CPU detection
* Per-process memory and CPU usage parsed correctly
* Uses sysconf to discover number of CPUs, instead of more complex libkstat code
* Simple memory display working
* Reduce repetitive calls to the PAGE_SIZE macro when reading memory info
* Add Project, Contract, Task, and Pool into process properties
* Use system major()/minor() implementations and remove extraneous definition of mkdev()
* Get the STARTTIME column working properly, using the Linux implementation as a guide
2018-03-02 18:20:46 -03:00
Jesin d4ea7cd65c Fix bashisms (#749)
The configure script relied on bash-specific extensions to shell syntax
and behavior, causing build failures on systems with other /bin/sh
implementations. This commit replaces those with equivalent constructs
that should work in all POSIX shells.
2018-02-26 20:07:52 -03:00
Michael Klein bc5d46982f use CFLAGS from ncurses*-config, if present (#745)
Fixes #695.
2018-02-26 10:19:01 -03:00
Kang-Che Sung (宋岡哲) c01f40eb3e Fix build failure ('major' undefined) in glibc 2.28. (#746)
glibc 2.28 no longer defines 'major' and 'minor' in <sys/types.h> and
requires us to include <sys/sysmacros.h>. (glibc 2.25 starts
deprecating the macros in <sys/types.h>.) Now do include the latter if
found on the system.

At the moment, let's also utilize AC_HEADER_MAJOR in configure script.
However as Autoconf 2.69 has not yet updated the AC_HEADER_MAJOR macro
to reflect the glibc change [1], so add a workaround code.

Fixes #663. Supersedes pull request #729.

Reference:
[1] https://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=commit;h=e17a30e987d7ee695fb4294a82d987ec3dc9b974

Signed-off-by: Kang-Che Sung <explorer09@gmail.com>
2018-02-26 10:15:05 -03:00
Hisham Muhammad df9922a67e Fix preservation of LDFLAGS value during configure script
Fixes #738.
2018-02-17 14:50:55 -02:00
Hisham Muhammad a32d7528f6 Check for pkgconfig's presence before using it.
Fixes #710.
2018-02-05 10:22:16 +01:00
Hisham Muhammad c50440f165 Bump version to 2.1.0 2018-02-04 20:13:55 +01:00
André Carvalho b7b66b76a5 Adds support for linux delay accounting (#667)
Adds support for showing columns with linux delay accounting.

This information can be read from the netlink interface, and thus we set up a socket to read from that when initializing the LinuxProcessList (LinuxProcessList_initNetlinkSocket). After that, for each process we call LinuxProcessList_readDelayAcctData, which sends a message thru the socket after setting up a callback to get the answer from the Kernel. That callback sets the process total delay time attribute. We then set the delay percent as the percentage of time process cpu time since last scan.
2017-12-04 00:15:29 -02:00
Emil Velikov 4c1230b03b Remove libtool references
The project builds a single standalone binary.

There are no libraries created - be that static or shared ones.
Thus there's no need for libtool.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2017-09-22 16:53:26 +01:00
Hisham Muhammad 543d65c6ab Security review: make privilege dropping-restoring optional.
This is/was necessary only on macOS, because you needed root in order
to read the process list. This was never necessary on Linux, and
it also raises security concerns, so now it needs to be enabled
explicitly at build time.
2017-07-26 15:40:55 -03:00
Hisham Muhammad c39f18a7be Add a clear warning about unsupported platforms.
Closes #648.
2017-07-10 20:14:25 -03:00
Diederik de Groot b258d6e53e Initial addition of dragonflybsd (based on FreeBSD) 2017-04-19 16:19:32 +02:00
Hisham 96157870af Downgrade requirement to Libtool 2.4.0.
Courtesy to OpenWRT environments as requested by @champtar in #540.
2016-09-11 23:28:17 -03:00
Hisham 81552d4ab5 Preparing release 2.0.2, a minor bugfix release. 2016-07-21 16:54:41 -03:00
Hisham Muhammad 265d04821a Merge pull request #524 from ricardo0y/cross_compile_with_ncurses_config
Allow to override ncurses*-config path
2016-07-12 10:02:51 -03:00
Ricardo Martincoski 78b82d0fdc Allow to override ncurses*-config path
This will be used when cross-compiling with ncurses*-config generated for the
target, using constructs like
HTOP_NCURSES_CONFIG_SCRIPT=/path/to/ncurses5-config

Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
2016-07-11 20:17:13 -03:00
Hisham 6c1be63291 Fail early if libtool is not present. 2016-05-19 16:04:04 -03:00
Explorer09 b71b07f5e0 Reorder configure macros to avoid "missing script" warning.
3 effects in this commit, with the first being the main one:

1. Fix the "`missing' script is too old or missing" warning. See:
   <https://lists.gnu.org/archive/html/automake/2010-08/msg00108.html>

2. By moving AC_CANONICAL_TARGET down in order, we are now able to
   set the directory for auxiliary scripts. For now it's still './'.
   I added the line "AC_CONFIG_AUX_DIR([.])" to show that the directory
   change is possible.

3. AC_USE_SYSTEM_EXTENSIONS includes checks from AC_PROG_CC, by moving
   the former macro down, we can save size in 'configure' by not
   generating repeated checks.
2016-05-08 14:35:20 +08:00
Explorer09 f0df28a470 Replace deprecated autoconf macros.
AC_HELP_STRING -> AS_HELP_STRING
AC_TRY_COMPILE -> AC_COMPILE_IFELSE([AC_LANG_PROGRAM([...])],...)
AC_CONFIG_HEADER -> AC_CONFIG_HEADERS
AC_PROG_LIBTOOL -> LT_INIT

Note: There might be more deprecated macros that I haven't noticed.
I just wish to avoid painful highlighting from my text editor (gedit)
that complains about them. :)
2016-05-08 14:35:20 +08:00
Hisham Muhammad cdc91b0b33 Merge pull request #472 from jrtc27/hurd
Use Linux backend on the Hurd
2016-05-04 15:42:16 -03:00
Hisham c37be409a9 Improve reproducible builds.
Use a SOURCE_DATA_EPOCH friendly date.
Suggested by @fasterit in #476.
2016-05-04 15:34:49 -03:00
James Clarke 2de52862a6 Use Linux backend on the Hurd 2016-04-18 23:57:30 +01:00
James Clarke a9508275cc Use $target_os instead of $target in configure.ac 2016-04-18 23:55:55 +01:00
Hisham e2ccc7b240 Prepare for release 2.0.1. 2016-03-07 18:32:06 -03:00
Hisham 474d26cea8 Portable affinity using hwloc 2016-02-14 19:57:29 -02:00
Hisham c148907e7b Try to make threads less confusing. 2016-02-02 16:39:08 +01:00
Christian Hesse 4c23a81d72 use AC_HELP_STRING for proc dir 2016-01-05 10:23:08 +01:00
Hisham Muhammad cccc18dd2f Oops! 2015-12-09 17:34:57 -02:00
Hisham Muhammad db6828617d More thorough checks for ncurses*-config scripts.
See #198.
2015-12-09 17:17:30 -02:00
Hisham Muhammad c23770245e If ncurses*-config script is present, use it in configure
when testing for ncurses library. See #198.
2015-12-06 19:06:23 -02:00
Hisham Muhammad 96c929f82b Use ncurses*-config scripts bundled with ncurses.
Ensure that all necessary libs and flags are passed along,
such as adding -ltinfo when needed.

Closes #198.
2015-11-30 16:36:22 -02:00
Hisham Muhammad 347141502b Test for unicode-enabled libncurses 2015-11-19 13:26:11 -02:00
Michael McConville a9a5a539cf (Very) initial working OpenBSD port 2015-09-18 00:46:48 -04:00
Hisham Muhammad 8bd603cb68 Make Unicode strings safe for ncurses 6 ABI.
Closes #241.
2015-08-20 00:31:48 -03:00
Hisham Muhammad b003636958 Support for NCurses 6.0 and mouse wheel 2015-08-19 18:55:24 -03:00
David Hunt 70e7c8db59 Added darwin with working battery meter 2015-08-19 13:47:26 -03:00
Hisham Muhammad 2f45008477 Enable OOM support unconditionally on Linux.
Read OOM data only if column is enabled.
Make sort ordering more consistent. Closes #182.
2015-04-09 15:41:21 -03:00
Hisham Muhammad d2acffa59a Merge branch 'wip' of https://github.com/hishamhm/htop into freebsd
Conflicts:
	htop.c
	unsupported/Platform.h
2015-03-15 22:53:10 -03:00
Hisham Muhammad f97d1bc54a Merge branch 'master' into wip 2015-02-04 12:19:52 -02:00
Hisham Muhammad aed9b9d18e Test if -Wextra is supported. Closes #155. 2015-02-04 12:19:04 -02:00
Hisham Muhammad 3383d8e556 Sorry about the mega-patch.
This is a work-in-progress, code is currently broken.
(Some actions, and notably, the header, are missing.)
2015-01-21 23:27:31 -02:00
Hisham Muhammad 0aa485cf47 Reading swap data! 2014-11-27 18:31:39 -02:00
Hisham Muhammad 8915b29395 Beginnings of FreeBSD port! 2014-11-27 16:27:34 -02:00
Hisham Muhammad a75161f862 Get Linux "emulation" working again for our FreeBSD folks using linprocfs. 2014-11-24 20:11:33 -02:00
Hisham Muhammad eb229d9aef Changes for supporting separate platform subdirectories. 2014-11-24 18:55:03 -02:00
Hisham Muhammad 300af4b829 Minor reorganization. 2014-11-19 23:17:16 -02:00
Hisham Muhammad 43c3e4d3d9 Preparing release 1.0.3. 2014-04-24 19:54:35 -03:00
Leigh Simpson da236ca318 Added additional column to monitor OOM killer score of each process 2014-01-29 22:41:55 +00:00
Hisham Muhammad 7fd5e80429 New home, new life! 2014-01-14 00:19:44 -02:00
Hisham Muhammad a0810561f3 Add extra checks in configure.ac for different locations of (n)curses.h 2013-02-26 17:10:11 +00:00
Hisham Muhammad 47e881f460 Add IO priority support ('i' key) 2012-10-04 23:59:45 +00:00
Hisham Muhammad 45f7a4fc8d Remove old memory debugging routines. We have Valgrind nowadays. 2011-12-26 22:04:29 +00:00
Hisham Muhammad dfad0afb36 Don't run sched_setaffinity compatibility test when cross compiling 2011-11-23 18:43:35 +00:00
Hisham Muhammad bc87a8ff8c Remove bundled hwloc-1.2.1. Use either native Linux affinity support or an external libhwloc.
(for details see https://sourceforge.net/mailarchive/forum.php?thread_name=CAJpkDYeZpwqcWxZ77wq6bMrnhn-KzkU1xAqb3cU0drfnA3n9FQ%40mail.gmail.com&forum_name=htop-general )
2011-11-21 02:52:41 +00:00
Hisham Muhammad 7ca1081712 Mega-commit with features and tweaks for 1.0:
* Performance improvements
* Support for splitting CPU meters into two or four columns
  (thanks to Wim Heirman)
* Switch from PLPA, which is now deprecated, to HWLOC.
* Bring back support for native Linux sched_setaffinity,
  so we don't have to use HWLOC where we don't need to.
* Support for typing in user names and column fields in selection panels.
2011-11-18 06:08:56 +00:00
Hisham Muhammad 1afef1899d Add flag to allow using the system install of hwloc. 2011-09-26 03:24:22 +00:00
Hisham Muhammad ec17b7029a Convert affinity control from the deprecated PLPA to HWLOC 2011-09-24 00:30:47 +00:00
Hisham Muhammad f1f77653e0 removes some basic checks that succeed on most systems anyway and which cause problems for the uClibc folks. Closes #3204565. 2011-09-08 03:40:26 +00:00
Hisham Muhammad a7bcf1d2e4 Try harder to find the ncurses header, fixes detection in SuSE SLES9.
(thanks to Moritz Barsnick)
2011-09-08 01:45:16 +00:00
Hisham Muhammad 0a81172f62 changelog and future version bump 2011-05-26 16:59:53 +00:00
Hisham Muhammad b561956637 ignore checks for /proc when cross-compiling
(as suggested by Andy Kennedy)
2011-03-22 17:04:39 +00:00
Hisham Muhammad 36ef1a93be make htop friendly to uclibc (thanks to Matt for the report) 2010-12-05 15:43:56 +00:00
Hisham Muhammad 9604e02106 Correct tests for missing libraries and optional use of PLPA 2010-11-22 12:24:46 +00:00
Hisham Muhammad 5fd1436a92 Build fixes. BTW, we're going for 0.9 now. 2010-11-20 18:54:39 +00:00
Hisham Muhammad 84ed4c01f6 Support for cgroups (thanks to Guillaume Zitta and Daniel Lezcano) 2010-10-30 19:24:07 +00:00
Hisham Muhammad 6501432ef6 upgrade PLPA to 1.3.2 2010-03-29 19:08:14 +00:00
Hisham Muhammad a600d5a6e9 Tempus fugit. 2010-02-25 02:08:18 +00:00
Hisham Muhammad dd86b9b646 prepare release 0.8.3 2009-06-23 14:02:14 +00:00
Hisham Muhammad 3e6be2d7f7 fix to minor bug affecting the build process, a maintenance release will follow shortly. 2009-06-08 21:08:02 +00:00
Hisham Muhammad 6330ff3a0a changes for htop 0.8.2 2009-06-02 04:51:23 +00:00
Hisham Muhammad 3b950e4189 BSD related fixes:
* BUGFIX: Correct page size calculation for FreeBSD systems
  (thanks to Andrew Paulsen)
* Allow compilation without PLPA on systems that don't support it
  (thanks to Timothy Redaelli)
2009-03-11 13:15:43 +00:00
Hisham Muhammad 11931f1bc8 ACPI Battery meter
contributed by Ian Hands
2008-09-23 06:21:28 +00:00
Hisham Muhammad a5dfaa2393 Add Linux-VServer support,
contributed by Jonathan Sambrook and Benedikt Bohm
2008-09-23 04:31:13 +00:00
Hisham Muhammad 6beb27d803 Prepare for release 0.8 2008-05-07 23:02:38 +00:00
Hisham Muhammad b09339d643 Enabling taskstats by default since they don't break
on systems that don't have them.
2008-03-16 00:31:31 +00:00
Hisham Muhammad 12f4f09e6e Add support for Linux per-process IO statistics,
enabled with the --enable-taskstats flag, which
requires a kernel compiled with taskstats support.
Thanks to Tobias Oetiker!
2008-03-09 08:02:22 +00:00
Hisham Muhammad 8fa33dc336 Add Unicode support, enabled with the --enable-unicode
flag, which requires libncursesw.
Thanks to Sergej Pupykin!
2008-03-09 02:33:23 +00:00
Hisham Muhammad 4df76d127b Embed PLPA (Portable Linux Processor Affinity) in order to support
conflicting affinity API of different Linux kernel versions.
2008-03-05 09:46:47 +00:00
Hisham Muhammad b70b35ea65 Improve error display on crash to get better bug reports. 2007-11-08 23:53:03 +00:00
Hisham Muhammad 4c51ad0e35 OpenVZ support, contributed by Sergey Lychko 2007-08-10 05:07:14 +00:00
Hisham Muhammad d2f767e607 Getting things ready for a next release 2007-05-17 18:46:40 +00:00
Hisham Muhammad 14808f7f70 Getting ready for 0.6.5... 2006-11-14 17:24:09 +00:00
Hisham Muhammad 0f027ded2c Fix for missing libraries message, as reported by Jon 780 2006-11-13 20:06:31 +00:00
Hisham Muhammad 649419abe5 Prepare for next release 2006-10-04 16:42:15 +00:00
Hisham Muhammad e46f1426b9 Make checks for headers and libraries actually halt configure. 2006-07-12 01:15:14 +00:00
Hisham Muhammad 7b2265b242 Update version numbers. 2006-05-24 00:25:41 +00:00
Hisham Muhammad bd61388c1d Fix checks when using --with-proc 2006-05-18 20:22:36 +00:00
Hisham Muhammad 7d930a21f1 Getting stuff ready for a release 2006-05-09 18:17:13 +00:00
Hisham Muhammad d6231bab89 Initial import. 2006-03-04 18:16:49 +00:00