summaryrefslogtreecommitdiffstats
path: root/CPUMeter.c
Commit message (Collapse)AuthorAgeFilesLines
* Security review: check results of snprintf.Hisham Muhammad2017-07-271-14/+14
| | | | | Calls marked with xSnprintf shouldn't fail. Abort program cleanly if any of them does.
* Replace all uses of sprintf with snprintfTomasz Kramkowski2016-12-291-12/+12
| | | | | | | | | | | | In all the cases where sprintf was being used within htop, snprintf could have been used. This patch replaces all uses of sprintf with snprintf which makes sure that if a buffer is too small to hold the resulting string, the string is simply cut short instead of causing a buffer overflow which leads to undefined behaviour. `sizeof(variable)` was used in these cases, as opposed to `sizeof variable` which is my personal preference because `sizeof(variable)` was already used in one way or another in other parts of the code.
* Rename Meter.setValues() functions to updateValues()Explorer092016-05-041-2/+2
| | | | | | | | | | | | Rationale (copied from htop issue #471): The function name "setValues" is misleading. For most OOP (object- oriented programming) contexts, setXXX functions mean they will change some member variables of an object into something specified in function arguments. But in the *Meter_setValues() case, the new values are not from the arguments, but from a hard-coded source. The caller is not supposed to change the values[] to anything it likes, but rather to "update" the values from the source. Hence, updateValues is a better name for this family of functions.
* Explicit "maxItems" property of metersExplorer092016-03-111-1/+1
| | | | | | | | | Two changes in this commit: - All meters now explicitly specify "maxItems" property, even for just 1 item. (Exception is "container" CPU meter classes, which use CUSTOM_METERMODE.) - "maxItems" being 0 is now allowed. This will let bar meters and graph meters render an empty meter.
* Check for failure in allocations.Hisham2016-02-021-1/+1
|
* Calculate CPU averages on Darwin (See #295).Hisham Muhammad2015-10-231-15/+29
|
* remove extra space in dual meters without marginsChristian Hesse2015-08-271-2/+3
|
* Add longer descriptions to available meters.Hisham Muhammad2015-02-031-0/+6
|
* Sorry about the mega-patch.Hisham Muhammad2015-01-211-31/+5
| | | | | This is a work-in-progress, code is currently broken. (Some actions, and notably, the header, are missing.)
* Make blue text more readable. Closes #55.Hisham Muhammad2014-04-241-2/+2
|
* Fix order of calloc arguments.Hisham Muhammad2014-01-161-1/+1
| | | | (Patch by Dawid Gajownik)
* BUGFIX: Fix crash when adding meters and toggling detailed CPU time.Hisham Muhammad2014-01-161-7/+1
| | | | | See https://bugzilla.redhat.com/show_bug.cgi?id=987805 for details. (thanks to Dawid Gajownik for the detailed analysis!)
* Make CPU meter optionally account guest time in its percentagesHisham Muhammad2013-12-181-22/+29
|
* Remove explicit calls to curses.h in other filesHisham Muhammad2013-02-261-1/+0
|
* Changes in object model: separate class objects to store vtable. Also, nicer ↵Hisham Muhammad2012-12-051-29/+63
| | | | UTF-8 display of big numbers.
* Remove old memory debugging routines. We have Valgrind nowadays.Hisham Muhammad2011-12-261-1/+0
|
* major header cleanupHisham Muhammad2011-12-261-3/+6
|
* Mega-commit with features and tweaks for 1.0:Hisham Muhammad2011-11-181-14/+138
| | | | | | | | | | | * 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.
* Fix off-by-one error in PROCESSOR displayHisham Muhammad2011-09-081-1/+1
|
* Realign display of text-mode CPU meters. Closes #3369526.Hisham Muhammad2011-09-081-1/+1
|
* Tempus fugit.Hisham Muhammad2011-05-261-1/+1
|
* fix broken height for All CPUs meterHisham Muhammad2011-05-261-1/+1
|
* retain meter state when it is reinit'ed in the Setup screenHisham Muhammad2011-03-311-5/+8
|
* * Option for counting CPUs from zeroHisham Muhammad2011-03-221-5/+5
| | | | | | (thanks to Sean Noonan) * Meters update in every screen (no longer halting while on Setup, etc.)
* Remove arbitrary limit from rich stringsHisham Muhammad2010-11-221-1/+1
| | | | | | | | | Fix subtree hiding Fix reading of CPU values in hidden threads Fix hiding of zombie processes as kernel threads Remove "debug proc" code Code cleanup in processElements
* add support for steal/guest CPU time measurementHisham Muhammad2010-08-241-33/+50
| | | | | | simplify processor data accounting (add CPUData structure) remove Process_clone trick
* Fix display of nan% in CPU metersHisham Muhammad2010-06-301-1/+1
| | | | | (Fix by Steven Hampson)
* Tempus fugit.Hisham Muhammad2010-02-251-1/+1
|
* never show nan%Hisham Muhammad2010-02-251-0/+1
|
* changes for htop 0.8.2Hisham Muhammad2009-06-021-0/+8
|
* Clean up headers by using 'static' whenever possible.Hisham Muhammad2008-03-091-34/+34
| | | | | Reduces resulting code size.
* IO-wait time now counts as idle time, which is a moreHisham Muhammad2007-11-091-10/+10
| | | | | | | accurate description. It is still available in split time, now called detailed CPU time. (thanks to Samuel Thibault for the report)
* Contribution by Philipp Richter: Display IO-Wait, IRQ and Soft-IRQ values in ↵Hisham Muhammad2006-10-041-10/+40
| | | | | | | status bar (minor modifications: default to false, add help)
* Perform RichString operations by hand.Hisham Muhammad2006-07-121-1/+1
| | | | | Avoid unnecessary operations when processing entries on ProcessList.
* Updates for new version of the MakeHeader.py script.Hisham Muhammad2006-06-061-4/+3
|
* Final fixes to make "All CPUs" the default CPU display mode.Hisham Muhammad2006-05-091-2/+10
|
* - Overhaul meters implementation;Hisham Muhammad2006-04-101-38/+73
| | | | | | - add AllCPUsMeter; - because of that, the new .htoprc is incompatible with previous released versions.
* Update copyrights.Hisham Muhammad2006-03-231-1/+1
|
* Initial import.Hisham Muhammad2006-03-041-0/+86

© 2014-2024 Faster IT GmbH | imprint | privacy policy