Commit Graph

1605 Commits

Author SHA1 Message Date
Hisham Muhammad 802e216870 Extend buffer for reading lines from /proc.
Apparently a line longer than 255 chars was spotted in the wild:
http://serverfault.com/questions/577939/linux-ps-htop-show-processes-running-for-hundreds-or-thousands-of-days-though-h#comment676098_577939
2015-12-14 13:27:11 -02:00
Martin "eto" Misuth e0b6e2eef2 enabled swap meter 2015-12-13 04:16:06 +01:00
Martin "eto" Misuth 9d55c56f26 added Support for memory meter, and slightly adjusted process monitor logic 2015-12-13 04:11:35 +01:00
Martin "eto" Misuth 80f594f314 added CPU% for processes in process list 2015-12-13 01:39:54 +01:00
Martin "eto" Misuth c2769985cc added cpu monitoring for both single core and smp systems, some notes in process monitor 2015-12-13 00:21:02 +01:00
Martin "eto" Misuth bc84920b91 added support for effective UID/username change detection 2015-12-11 11:01:24 +01:00
Hisham Muhammad 563abbc44b Merge pull request #319 from acatton/master
Redraw the panel when resizing the window during an incremental search
2015-12-10 18:34:57 -02:00
Antoine Catton 065aab5247 Redraw the panel when resizing the window during an incremental search
KEY_RESIZE wasn't handled by the incremental search. Resulting in this
bug:

  * Set your terminal window to a small size.
  * Press '\' to filter the processes
  * Maximize your terminal window
  * The list of processes didn't resize.

This change fixes this bug.

Thank you Julian Andrews (@julianandrews) for finding this bug.
2015-12-09 23:46:25 -07:00
Hisham Muhammad cccc18dd2f Oops! 2015-12-09 17:34:57 -02:00
Michael Klein 84783bd6f0 Fix fopen mode in Settings_read() 2015-12-09 20:34:11 +01:00
Hisham Muhammad db6828617d More thorough checks for ncurses*-config scripts.
See #198.
2015-12-09 17:17:30 -02:00
Michael Klein ab3a7c2fa8 drop privileges before changing process priority or sending signals
- replaces uid check from d18e9a4895
2015-12-07 20:10:09 +01:00
Hisham Muhammad 6b1b073ae4 Merge branch 'master' of https://github.com/hishamhm/htop 2015-12-06 19:07:16 -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
Michael Klein cc23d13f87 Add Platform_getProcessEnv
- currently implemented for darwin and linux
2015-12-03 22:23:40 +01:00
Michael Klein 42b08f2233 drop privileges during Settings_read()/Settings_write() 2015-12-02 23:42:10 +01:00
Michael Klein 0919ea32f9 'e' displays environment of current process
- uses sysctl(KERN_PROCARGS2) on *BSD
- doesn't work on Linux yet
2015-12-02 23:26:00 +01:00
Michael Klein d18e9a4895 add some security checks when running SUID root
on Darwin, htop needs to run with root privileges to display information
about other users processes. This commit makes running htop SUID root a
bit more safe.
2015-12-02 22:56:01 +01:00
Hisham Muhammad 670a2de692 Merge pull request #313 from hishamhm/sreclaimable
Update calculation of used vs. free memory.
2015-11-30 18:27:33 -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 a84aa2e782 Cached memory calculations, take 2.
Thanks to @OmegaPhil for discussion and reviewing.
2015-11-29 23:55:31 -02:00
Hisham Muhammad 5bc1f5ed04 Account unreclaimable slab and shmem as used memory,
reclaimable slab as cached memory.

Hopefully this presents a more truthful representation of
available vs. used memory on Linux.
See brndnmtthws/conky#82, #242, #67, #263.
2015-11-28 22:22:00 -02:00
Hisham Muhammad d34645f8f1 Array entries have been oddly flipped here for years. 2015-11-23 03:46:43 -02:00
Hisham Muhammad f02d8f4386 Merge pull request #303 from kaefer/desc-load-averages-meter
match load averages description to what it actually shows
2015-11-23 02:55:27 -02:00
Hisham Muhammad aae02bbfc9 Merge pull request #304 from Sworddragon/master
Manpage update
2015-11-23 02:50:30 -02:00
Hisham Muhammad 5521094b1e Merge pull request #309 from hishamhm/travis-ci
Integrate Travis-CI
2015-11-20 15:59:54 -02:00
Hisham Muhammad 347141502b Test for unicode-enabled libncurses 2015-11-19 13:26:11 -02:00
Hisham Muhammad 0837fc5b62 travis-ci should really detect autogen.sh... 2015-11-19 13:14:20 -02:00
Hisham Muhammad d12084b032 ChangeLog updates. 2015-11-19 13:08:23 -02:00
Hisham Muhammad c24270be0a Test on Linux and OSX 2015-11-19 12:58:00 -02:00
Hisham Muhammad d820d11c80 Add initial .travis.yml 2015-11-19 12:56:26 -02:00
Hisham Muhammad 4b83a82dca Minimal stub 'make test' target. 2015-11-19 12:56:01 -02:00
Hisham Muhammad ad5d9c2542 Merge pull request #308 from SaltwaterC/darwin-swap
Add Darwin swap meter
2015-11-19 12:53:47 -02:00
SaltwaterC 8895f09880 Add Darwin swap meter. 2015-11-16 17:32:22 +00:00
Sworddragon f097bdce8f Fixed/enhanced some entries in the manpage 2015-11-04 12:13:16 +01:00
Sworddragon 1e31b63a7e Fixed some typos 2015-11-04 12:09:22 +01:00
kaefer 33cdaf3ac0 match load averages desc. to what it actually shows 2015-11-04 11:53:17 +01:00
Hisham Muhammad bef00a4fd9 Create directory m4 if it doesn't already exist.
(See #292.)
2015-11-03 02:21:53 -05:00
Hisham Muhammad 5e0f1788e6 Fix CRT_fatalError warning. 2015-11-02 10:22:10 -05:00
Hisham Muhammad a7fcbba75a Add missing header, silence warning. Should fix #292. 2015-11-02 10:46:04 -05:00
Hisham Muhammad 3cfbcb72c8 Highlight moving meters in a different color. 2015-11-02 10:33:37 -05:00
Hisham Muhammad f187be9296 Fix moving of meters 2015-11-02 10:33:22 -05:00
Hisham Muhammad fd5dd6605a Merge pull request #299 from mmcco/master
OpenBSD port updates and error exit improvements
2015-11-02 08:46:40 -05:00
Michael McConville cd3d2337f8 Replace all err.h function uses with CRT_fatalError(). Failing with
err.h functions corrupts the terminal when using curses.
2015-11-01 13:26:57 -05:00
Michael McConville 0fb9a8c389 Remove a debugging print 2015-11-01 13:19:01 -05:00
Hisham Muhammad b669540e4e Merge pull request #298 from patrickmarlier/issue202
Fix a case where the usertime calculation can overflow (see issue #202)
2015-10-26 17:55:13 -04:00
Hisham Muhammad ea8a8b2d6b Merge pull request #296 from hishamhm/darwin-cpu-average
Darwin cpu average
2015-10-24 23:29:47 -04:00
Hisham Muhammad bd93b2e1d7 Initialize variables, silence warnings. 2015-10-24 23:28:29 -04:00
Hisham Muhammad 71190654bc Calculate CPU averages on Darwin (See #295). 2015-10-23 13:46:21 -02:00
Hisham Muhammad 9c146393a3 Improve prose a bit. 2015-10-19 17:26:53 -02:00