[dev] [PATCH] slstatus: set locale

2017-09-11 Thread Kurt Van Dijck
I want my date & time printed according my locale settings. This commit enables that Signed-off-by: Kurt Van Dijck --- slstatus.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/slstatus.c b/slstatus.c index e69423b..30a9d09 100644 --- a/slstatus.c +++ b/slstatus.c @@ -6,6 +6,7 @@ #includ

[dev] [PATCH 2/3] slstatus: add cpu_iowait

2017-09-11 Thread Kurt Van Dijck
This commit introduces the cpu_iowait item, this is the percentage of cpu time spent waiting on disks. High numbers typically indicate that your system is not responsive due to disk IO Signed-off-by: Kurt Van Dijck --- config.def.h | 1 + slstatus.c | 37 +++--

[dev] [PATCH 3/3] slstatus: cpu_perc: make 100% equivalent of 1 cpu

2017-09-11 Thread Kurt Van Dijck
On my multi-cpu system, I want to see cpu time related to 1 cpu's equivalent. So, when 1 cpu is busy, 100% is shown. 2 cpu's busy: 200%, and so on. When no number is given (the backward compatible option), then slstatus thinks it only has 1 cpu and no scaling is done, like it used to be. Signed-of

[dev] [PATCH 1/3] slstatus: drop sleep from cpu_perc

2017-09-11 Thread Kurt Van Dijck
Waiting to retrieve info is not very scalable Signed-off-by: Kurt Van Dijck --- slstatus.c | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/slstatus.c b/slstatus.c index 30a9d09..e1f0e00 100644 --- a/slstatus.c +++ b/slstatus.c @@ -178,21 +178,18 @@ cpu_freq(vo

Re: [dev] [PATCH 3/3] slstatus: cpu_perc: make 100% equivalent of 1 cpu

2017-09-11 Thread isabella parakiss
> - return bprintf("%d", perc); > + return bprintf("%d", (ncpu?:1)*perc); ?: ?: ?: ?: ?: https://gcc.gnu.org/onlinedocs/gcc/Conditionals.html