summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2021-09-21 02:37:00 -0700
committerVito Caputo <vcaputo@pengaru.com>2021-09-21 04:34:20 -0700
commit0f8807884e316f60e7828c53a43ee6bd18f7348b (patch)
treecd2e92885fde1ff6839f00afbe9806aa6517e135
parent49ad335af2f5bd46b0eda35f2eb7e5ac85896343 (diff)
charts: Wall=??s if proc_stat->start is > boottimeHEADmaster
Since libvmon samples the sys_wants before proc_wants, it's entirely possible the proc_stat->start will be later than sys_stat->boottime by the time a given process gets sampled. Simply treat this analogous to being unable to sample the start, either of which will only leave the Wall as ??s in the highly ephemeral short-lived process scenario. In the > boottime case, the next sample for the same process would have start <= boottime
-rw-r--r--src/charts.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/charts.c b/src/charts.c
index 6566f0a..fc33612 100644
--- a/src/charts.c
+++ b/src/charts.c
@@ -795,7 +795,7 @@ static void draw_columns(vwm_charts_t *charts, vwm_chart_t *chart, vwm_column_t
case VWM_COLUMN_PROC_WALL: /* User Sys Wall times */
if (!row)
str_len = snpf(str, sizeof(str), "Wall");
- else if (!proc_stat->start)
+ else if (!proc_stat->start || proc_stat->start > sys_stat->boottime)
str_len = snpf(str, sizeof(str), "??s");
else
str_len = snpf(str, sizeof(str), "%.2fs",
© 2021 All Rights Reserved