mirror of
https://github.com/xzeldon/htop.git
synced 2025-07-15 13:34:35 +03:00
Compare commits
7 Commits
3.0.0beta1
...
2.1.0
Author | SHA1 | Date | |
---|---|---|---|
c50440f165 | |||
b0588d90ff | |||
b84ebfd4e8 | |||
b86e14d3cf | |||
b34d76cd41 | |||
87be623eac | |||
b27712181a |
30
ChangeLog
30
ChangeLog
@ -1,4 +1,34 @@
|
||||
|
||||
What's new in version 2.1.0
|
||||
|
||||
* Linux: Delay accounting metrics
|
||||
(thanks to André Carvalho)
|
||||
* DragonFlyBSD support
|
||||
(thanks to Diederik de Groot)
|
||||
* Support for real-time signals
|
||||
(thanks to Kang-Che Sung)
|
||||
* 'c' key now works with threads as well
|
||||
* Session column renamed from SESN to SID
|
||||
(thanks to Kamyar Rasta)
|
||||
* Improved UI for meter style selection
|
||||
(thanks to Kang-Che Sung)
|
||||
* Improved code for constructing process tree
|
||||
(thanks to wangqr)
|
||||
* Compile-time option to disable setuid
|
||||
* Error checking of various standard library operations
|
||||
* Replacement of sprintf with snprintf
|
||||
(thanks to Tomasz Kramkowski)
|
||||
* Linux: performance improvements in battery meter
|
||||
* Linux: update process TTY device
|
||||
* Linux: add support for sorting TASK_IDLE
|
||||
(thanks to Vladimir Panteleev)
|
||||
* Linux: add upper-bound to running process counter
|
||||
(thanks to Lucas Correia Villa Real)
|
||||
* BUGFIX: avoid crash when battery is removed
|
||||
(thanks to Jan Chren)
|
||||
* BUGFIX: macOS: fix infinite loop in tree view
|
||||
(thanks to Wataru Ashihara)
|
||||
|
||||
What's new in version 2.0.2
|
||||
|
||||
* Mac OS X: stop trying when task_for_pid fails for a process,
|
||||
|
2
Meter.c
2
Meter.c
@ -152,7 +152,7 @@ int Meter_humanUnit(char* buffer, unsigned long int value, int size) {
|
||||
if (value / 1024 < powi)
|
||||
break;
|
||||
|
||||
if (prefix[1] == 0)
|
||||
if (prefix[1] == '\0')
|
||||
break;
|
||||
|
||||
powi *= 1024;
|
||||
|
@ -174,6 +174,8 @@ typedef struct ProcessClass_ {
|
||||
|
||||
#define Process_isChildOf(process_, pid_) (process_->tgid == pid_ || (process_->tgid == process_->pid && process_->ppid == pid_))
|
||||
|
||||
#define Process_sortState(state) ((state) == 'I' ? 0x100 : (state))
|
||||
|
||||
}*/
|
||||
|
||||
static int Process_getuid = -1;
|
||||
@ -598,7 +600,7 @@ long Process_compare(const void* v1, const void* v2) {
|
||||
return (p1->starttime_ctime - p2->starttime_ctime);
|
||||
}
|
||||
case STATE:
|
||||
return (p1->state - p2->state);
|
||||
return (Process_sortState(p1->state) - Process_sortState(p2->state));
|
||||
case ST_UID:
|
||||
return (p1->st_uid - p2->st_uid);
|
||||
case TIME:
|
||||
|
@ -153,6 +153,8 @@ typedef struct ProcessClass_ {
|
||||
|
||||
#define Process_isChildOf(process_, pid_) (process_->tgid == pid_ || (process_->tgid == process_->pid && process_->ppid == pid_))
|
||||
|
||||
#define Process_sortState(state) ((state) == 'I' ? 0x100 : (state))
|
||||
|
||||
|
||||
#define ONE_K 1024L
|
||||
#define ONE_M (ONE_K * ONE_K)
|
||||
|
@ -231,6 +231,11 @@ void ProcessList_sort(ProcessList* this) {
|
||||
pid_t ppid = process->tgid == process->pid ? process->ppid : process->tgid;
|
||||
// Bisect the process vector to find parent
|
||||
int l = 0, r = size;
|
||||
// If PID corresponds with PPID (e.g. "kernel_task" (PID:0, PPID:0)
|
||||
// on Mac OS X 10.11.6) cancel bisecting and regard this process as
|
||||
// root.
|
||||
if (process->pid == ppid)
|
||||
r = 0;
|
||||
while (l < r) {
|
||||
int c = (l + r) / 2;
|
||||
pid_t pid = ((Process*)(Vector_get(this->processes, c)))->pid;
|
||||
|
@ -2,7 +2,7 @@
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_PREREQ(2.65)
|
||||
AC_INIT([htop],[2.0.2],[hisham@gobolinux.org])
|
||||
AC_INIT([htop],[2.1.0],[hisham@gobolinux.org])
|
||||
|
||||
SOURCE_DATE_EPOCH="${SOURCE_DATE_EPOCH:-$(date +%s)}"
|
||||
year=$(date -u -d "@$SOURCE_DATE_EPOCH" "+%Y" 2>/dev/null || date -u -r "$SOURCE_DATE_EPOCH" "+%Y" 2>/dev/null || date -u "+%Y")
|
||||
|
@ -171,7 +171,8 @@ void ProcessList_goThroughEntries(ProcessList* super) {
|
||||
DarwinProcess_setFromKInfoProc(&proc->super, &ps[i], tv.tv_sec, preExisting);
|
||||
DarwinProcess_setFromLibprocPidinfo(proc, dpl);
|
||||
|
||||
DarwinProcess_scanThreads(proc);
|
||||
// Disabled due to bug in macOS High Sierra
|
||||
// DarwinProcess_scanThreads(proc);
|
||||
|
||||
super->totalTasks += 1;
|
||||
|
||||
|
@ -49,11 +49,11 @@ The following commands are supported while in htop:
|
||||
.LP
|
||||
.TP 5
|
||||
.B Up, Alt-k
|
||||
Select (hightlight) the previous process in the process list. Scroll the list
|
||||
Select (highlight) the previous process in the process list. Scroll the list
|
||||
if necessary.
|
||||
.TP
|
||||
.B Down, Alt-j
|
||||
Select (hightlight) the next process in the process list. Scroll the list if
|
||||
Select (highlight) the next process in the process list. Scroll the list if
|
||||
necessary.
|
||||
.TP
|
||||
.B Left, Alt-h
|
||||
|
@ -72,6 +72,8 @@ static unsigned long int parseBatInfo(const char *fileName, const unsigned short
|
||||
|
||||
fclose(file);
|
||||
|
||||
if (!line) break;
|
||||
|
||||
char *foundNumStr = String_getToken(line, wordNum);
|
||||
const unsigned long int foundNum = atoi(foundNumStr);
|
||||
free(foundNumStr);
|
||||
|
@ -155,7 +155,7 @@ ProcessFieldData Process_fields[] = {
|
||||
[0] = { .name = "", .title = NULL, .description = NULL, .flags = 0, },
|
||||
[PID] = { .name = "PID", .title = " PID ", .description = "Process/thread ID", .flags = 0, },
|
||||
[COMM] = { .name = "Command", .title = "Command ", .description = "Command line", .flags = 0, },
|
||||
[STATE] = { .name = "STATE", .title = "S ", .description = "Process state (S sleeping, R running, D disk, Z zombie, T traced, W paging)", .flags = 0, },
|
||||
[STATE] = { .name = "STATE", .title = "S ", .description = "Process state (S sleeping, R running, D disk, Z zombie, T traced, W paging, I idle)", .flags = 0, },
|
||||
[PPID] = { .name = "PPID", .title = " PPID ", .description = "Parent process ID", .flags = 0, },
|
||||
[PGRP] = { .name = "PGRP", .title = " PGRP ", .description = "Process group ID", .flags = 0, },
|
||||
[SESSION] = { .name = "SESSION", .title = " SID ", .description = "Process's session ID", .flags = 0, },
|
||||
|
Reference in New Issue
Block a user