diff --git a/top/top.1 b/top/top.1 index d73bc895..6bbbdd74 100644 --- a/top/top.1 +++ b/top/top.1 @@ -435,14 +435,13 @@ Line 2 shows \*(PU state percentages based on the interval since the last refresh. As a default, percentages for these individual categories are displayed. -Where two labels are shown below, those for more recent kernel versions -are shown first. +Depending on your kernel version, the \fBst\fR field may not be shown. .nf - \fBus\fR,\fB user\fR : time running un-niced user processes - \fBsy\fR,\fB system\fR : time running kernel processes - \fBni\fR,\fB nice\fR : time running niced user processes - \fBid\fR,\fB idle\fR : time spent in the kernel idle handler - \fBwa\fR,\fB IO-wait\fR : time waiting for I/O completion + \fBus\fR : time running un-niced user processes + \fBsy\fR : time running kernel processes + \fBni\fR : time running niced user processes + \fBid\fR : time spent in the kernel idle handler + \fBwa\fR : time waiting for I/O completion \fBhi\fR : time spent servicing hardware interrupts \fBsi\fR : time spent servicing software interrupts \fBst\fR : time stolen from this vm by the hypervisor diff --git a/top/top.c b/top/top.c index 44f70517..ab8bc539 100644 --- a/top/top.c +++ b/top/top.c @@ -2197,8 +2197,8 @@ static void cpus_refresh (void) { #define sumSLOT ( Cpu_cnt ) #define totSLOT ( 1 + Cpu_cnt + Numa_node_tot ) static int sav_slot = -1; - int i; #ifndef NUMA_DISABLE + int i; int node; #endif @@ -2919,11 +2919,7 @@ static void before (char *me) { Cpu_cnt = 8; #endif Cpu_faux_cnt = Cpu_cnt; - Cpu_States_fmts = N_unq(STATE_lin2x4_fmt); - if (linux_version_code > LINUX_VERSION(2, 5, 41)) - Cpu_States_fmts = N_unq(STATE_lin2x5_fmt); - if (linux_version_code >= LINUX_VERSION(2, 6, 0)) - Cpu_States_fmts = N_unq(STATE_lin2x6_fmt); + Cpu_States_fmts = N_unq(STATE_lin2x6_fmt); if (linux_version_code >= LINUX_VERSION(2, 6, 11)) Cpu_States_fmts = N_unq(STATE_lin2x7_fmt); diff --git a/top/top.h b/top/top.h index 2f144a66..a2405493 100644 --- a/top/top.h +++ b/top/top.h @@ -46,7 +46,6 @@ //#define OFF_SCROLLBK /* disable tty emulators scrollback buffer */ //#define OFF_STDERROR /* disable our stderr buffering (redirect) */ //#define OFF_STDIOLBF /* disable our own stdout _IOFBF override */ -//#define PRETEND2_5_X /* pretend we're linux 2.5.x (for IO-wait) */ //#define PRETEND8CPUS /* pretend we're smp with 8 ticsers (sic) */ //#define PRETENDNOCAP /* use a terminal without essential caps */ //#define PRETEND_NUMA /* pretend 4 (or 3 w/o OFF_NUMASKIP) Nodes */ @@ -83,10 +82,6 @@ /* For the impetus and NUMA/Node prototype design, thanks to: Lance Shelton - April, 2013 */ -#ifdef PRETEND2_5_X -#define linux_version_code LINUX_VERSION(2,5,43) -#endif - // pretend as if #define _GNU_SOURCE char *strcasestr(const char *haystack, const char *needle); diff --git a/top/top_nls.c b/top/top_nls.c index 6d30e605..43d85e0c 100644 --- a/top/top_nls.c +++ b/top/top_nls.c @@ -622,12 +622,6 @@ static void build_uniq_nlstab (void) { Uniq_nlstab[STATE_line_1_fmt] = _("%s:~3" " %3u ~2total,~3 %3u ~2running,~3 %3u ~2sleeping,~3 %3u ~2stopped,~3 %3u ~2zombie~3\n"); - Uniq_nlstab[STATE_lin2x4_fmt] = _("%%%s~3" - " %#5.1f ~2user,~3 %#5.1f ~2system,~3 %#5.1f ~2nice,~3 %#5.1f ~2idle~3\n"); - - Uniq_nlstab[STATE_lin2x5_fmt] = _("%%%s~3" - " %#5.1f ~2user,~3 %#5.1f ~2system,~3 %#5.1f ~2nice,~3 %#5.1f ~2idle,~3 %#5.1f ~2IO-wait~3\n"); - /* Translation Hint: Only the following abbreviations need be translated . us = user, sy = system, ni = nice, id = idle, wa = wait, . hi hardware interrupt, si = software interrupt */ diff --git a/top/top_nls.h b/top/top_nls.h index dd0a9969..e53aa2d6 100644 --- a/top/top_nls.h +++ b/top/top_nls.h @@ -96,9 +96,8 @@ enum norm_nls { enum uniq_nls { KEYS_helpbas_fmt, KEYS_helpext_fmt, WINDOWS_help_fmt, COLOR_custom_fmt, - FIELD_header_fmt, MEMORY_lines_fmt, STATE_line_1_fmt, STATE_lin2x4_fmt, - STATE_lin2x5_fmt, STATE_lin2x6_fmt, STATE_lin2x7_fmt, YINSP_hdsels_fmt, - YINSP_hdview_fmt, + FIELD_header_fmt, MEMORY_lines_fmt, STATE_line_1_fmt, STATE_lin2x6_fmt, + STATE_lin2x7_fmt, YINSP_hdsels_fmt, YINSP_hdview_fmt, uniq_MAX };