Commit Graph

64 Commits

Author SHA1 Message Date
Ran Benita 08feb8585b Add pressure stall information (PSI) meters on Linux
The pressure stall information (PSI) metrics provide useful information
on delays caused by waiting for CPU, IO and memory. Particularly on busy
servers it can provide a quick overview of what's "slowing things down".

This feature is supported on Linux >= 4.20.
The interface is documented here:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/plain/Documentation/accounting/psi.txt
These links provide rationale:
https://lwn.net/Articles/759781/
https://facebookmicrosites.github.io/psi/

The following metrics are added, corresponding to the currently exposed
lines (see `head /proc/pressure/*`):
- PressureStallCPUSome
- PressureStallIOSome
- PressureStallIOFull
- PressureStallMemorySome
- PressureStallMemoryFull

The color scheme is the same as that used for Load Average, however I
gave it separate entries just in case someone wants to change them
specifically.

Tested on 4.20.7-arch1-1-ARCH, on the linux platform.
Also tested that other platforms still compile (changed configure to use
the unsupported platform).

Closes #879.
2019-02-13 22:38:10 +02:00
Explorer09 103f1a497a Disable 'make dist' when pkg.m4 is unused in configure
This would prevent a careless future package maintainer from creating a
release tarball with a defective configure script. :)

Also, add a warning in the autogen.sh phase if pkg.m4 is unused.

Signed-off-by: Kang-Che Sung <explorer09@gmail.com>
2018-05-22 23:21:42 -03:00
Explorer09 442b0d2576 New makefile targets to rebuild and clean htop headers.
`make htop-headers` will regenerate all '.h' headers in htop source for
all platforms.
`make clean-htop-headers` will delete all generated htop headers.

Because of the introduction of these two targets, I slightly changed
the style of platform-specific portions of makefile rules.
Please comment if you accept such a style, or need me to revert to old
style.

Signed-off-by: Kang-Che Sung <explorer09@gmail.com>
2018-03-26 15:14:12 -03:00
Kang-Che Sung (宋岡哲) 2e3c35d66d Use AM_CFLAGS and AM_LDFLAGS in Makefile.am (#760)
This reduces generated Makefile.in size by 74%.
(217319 bytes -> 56326 bytes)

Automake considers that <prog>_CFLAGS and <prog>_LDFLAGS are
program-specific build rules, and when such are specified, Automake
will generate additional code just to avoid the "generic" and
package-wide AM_CFLAGS or AM_LDFLAGS. (Especially for <prog>_CFLAGS,
Automake will rename generated object files to become "prog-foo.o" and
such, and it's _a lot_ of code to achieve this in Makefile.)

There's no reason for htop to rename intermediate object files. It's
better to make things simpler.

Signed-off-by: Kang-Che Sung <explorer09@gmail.com>
2018-03-16 11:31: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
Diederik de Groot cb7a06379d Enh: Add support for backtrace using execinfo 2017-04-21 16:36:19 +02:00
Diederik de Groot b258d6e53e Initial addition of dragonflybsd (based on FreeBSD) 2017-04-19 16:19:32 +02:00
Hisham a8a5e62760 Force -lgcov harder when running `make coverage`.
Shouldn't be needed, but I had to make this tweak to make this work again.
2016-02-19 13:40:21 -02:00
Hisham b54d2dde40 Check for failure in allocations. 2016-02-02 15:53:02 +01:00
Hisham Muhammad 466d4da0c6 refactor *Screen classes, add InfoScreen superclass 2016-01-12 06:00:58 -02: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 McConville a9a5a539cf (Very) initial working OpenBSD port 2015-09-18 00:46:48 -04:00
David Hunt 70e7c8db59 Added darwin with working battery meter 2015-08-19 13:47:26 -03:00
David Hunt 5e602f18d5 Rename String to StringUtils.
Fixes building on case-insensitive filesystems where String.h gets confused with <string.h>.

From d734dacea0a10d0465dad4e95b3421511e7da112 Mon Sep 17 00:00:00 2001
From: David Hunt <dhunt@iolanthe.attlocal.net>
Date: Sat, 11 Jul 2015 20:56:31 -0500
Subject: [PATCH 1/8] Rename String to StringUtils
2015-08-19 13:45:20 -03:00
Hisham Muhammad 80ef119fe7 Add coverage testing rules 2015-03-25 17:14:40 -03:00
Hisham Muhammad adbfe3c3f1 Get FreeBSD tree to compile again with latest changes. 2015-03-16 03:14:20 -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 5ca9b8e002 Work on fixing build of "unsupported" platform 2015-02-23 00:59:24 -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 d4c26a3932 Merge branch 'master' into freebsd 2014-11-27 21:05:30 -02:00
Hisham Muhammad 430c7c9a9b Move platform-dependent parts of Linux battery meter. 2014-11-27 21:04:57 -02:00
Hisham Muhammad 3ba3d6fa6f Add uptime calculation code. 2014-11-27 19:44:20 -02:00
Hisham Muhammad 1dd165c14b Merge branch 'master' into freebsd 2014-11-27 19:41:31 -02:00
Hisham Muhammad ca03094bb2 Make UptimeMeter cross-platform again. 2014-11-27 19:41:14 -02:00
Hisham Muhammad a9f05c2a8b Uptime meter for FreeBSD.
This will produce too much replicated code.
I think I'll use a lighter abstraction in things like this.
2014-11-27 19:33:37 -02:00
Hisham Muhammad 79662291fa Merge branch 'master' into freebsd 2014-11-27 19:19:54 -02:00
Hisham Muhammad 357e7a3243 Move UptimeMeter into platform-dependent area.
Set up environment to move other meters.
2014-11-27 19:18:14 -02:00
Hisham Muhammad 8915b29395 Beginnings of FreeBSD port! 2014-11-27 16:27:34 -02:00
Hisham Muhammad aaaaf063a1 Builds on Linux again! 2014-11-24 19:22:50 -02:00
Hisham Muhammad eb229d9aef Changes for supporting separate platform subdirectories. 2014-11-24 18:55:03 -02:00
Robert Rosengren 5aac1733a6 Possible to regenerate headers outside of srcdir 2014-01-17 09:33:52 +01:00
Hisham Muhammad 2a73405cd0 search and filter for the strace and lsof screens! 2012-11-10 00:31:37 +00:00
Hisham Muhammad 47e881f460 Add IO priority support ('i' key) 2012-10-04 23:59:45 +00:00
Hisham Muhammad 5b3cc559b2 remove old reference to hwloc directory 2011-12-26 22:09:59 +00:00
Hisham Muhammad 45f7a4fc8d Remove old memory debugging routines. We have Valgrind nowadays. 2011-12-26 22:04:29 +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 e204861de5 Allow typing to select items in various panels (sort, user, signal).
Factored code from the SignalsPanel to apply to all selections from main screen.
Closes feature request #3425304.
2011-11-05 04:19:47 +00:00
Hisham Muhammad c18ccdb910 store cppcheck rule for future use 2011-10-25 00:46:37 +00:00
Hisham Muhammad d1b1cbc757 cleanups and fixes, thanks to cppcheck and gcc -Wextra 2011-10-25 00:05:46 +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 5fd1436a92 Build fixes. BTW, we're going for 0.9 now. 2010-11-20 18:54:39 +00:00
Hisham Muhammad 6486229308 add support for steal/guest CPU time measurement
simplify processor data accounting (add CPUData structure)
remove Process_clone trick
2010-08-24 23:20:38 +00:00
Hisham Muhammad 6501432ef6 upgrade PLPA to 1.3.2 2010-03-29 19:08:14 +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 ac5cecb6fc Option to display hostname in the meters area 2009-02-17 18:33:32 +00:00
Hisham Muhammad 11931f1bc8 ACPI Battery meter
contributed by Ian Hands
2008-09-23 06:21:28 +00:00