diff --git a/Makefile b/Makefile index a662fd65..0e0abaf4 100644 --- a/Makefile +++ b/Makefile @@ -34,7 +34,7 @@ all: atop atopsar atopacctd atopconvert atop: atop.o $(ALLMODS) Makefile $(CC) -c version.c - $(CC) atop.o $(ALLMODS) -o atop -lncurses -lz -lm -lrt $(LDFLAGS) + $(CC) atop.o $(ALLMODS) -o atop -lncursesw -lz -lm -lrt $(LDFLAGS) atopsar: atop ln -sf atop atopsar diff --git a/atopsar.c b/atopsar.c index 775a07ed..7771e6a5 100644 --- a/atopsar.c +++ b/atopsar.c @@ -1716,7 +1716,7 @@ gendskline(struct sstat *ss, char *tstamp, char selector) pn = dp->name; printf("%-14s %3.0lf%% %6.1lf %7.1lf %7.1lf %7.1lf " - "%5.1lf %6.2lf ms", + "%5.1lf %9.5lf ms", pn, mstot ? (double)dp->io_ms * 100.0 / mstot : 0.0, mstot ? (double)dp->nread * 1000.0 / mstot : 0.0, diff --git a/showgeneric.c b/showgeneric.c index dddcc7a7..f8a9d1c0 100644 --- a/showgeneric.c +++ b/showgeneric.c @@ -274,6 +274,7 @@ static const char rcsid[] = "$Id: showgeneric.c,v 1.71 2010/10/25 19:08:32 gerlo #include #include #include +#include #include "atop.h" #include "photoproc.h" @@ -2827,6 +2828,7 @@ generic_init(void) /* ** initialize screen-handling via curses */ + setlocale(LC_ALL, ""); initscr(); cbreak(); noecho(); diff --git a/showsys.c b/showsys.c index 758be346..48a4352b 100644 --- a/showsys.c +++ b/showsys.c @@ -1903,23 +1903,23 @@ sysprt_DSKAVIO(void *p, void *q, int badness, int *color) *color = -1; - if (tim > 100.0) + if (tim >= 100.0) { sprintf(buf+5, "%4.0lf ms", tim); } - else if (tim > 10.0) + else if (tim >= 10.0) { sprintf(buf+5, "%4.1lf ms", tim); } - else if (tim > 0.1) + else if (tim >= 0.1) { - sprintf(buf+5, "%3.2lf ms", tim); + sprintf(buf+5, "%4.2lf ms", tim); } - else if (tim > 0.01) + else if (tim >= 0.01) { sprintf(buf+5, "%4.1lf µs", tim * 1000.0); } - else if (tim > 0.0001) + else if (tim >= 0.0001) { sprintf(buf+5, "%4.2lf µs", tim * 1000.0); }