summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2021-09-12 17:04:42 -0700
committerVito Caputo <vcaputo@pengaru.com>2021-09-12 17:07:08 -0700
commitd2ae398f2b3740ad74c9eabc4ae2b08b7446521b (patch)
treee98259883d176a3b38610252ec1663ed2a44956d /src
parent876a87c0bf197f2e3078b64360d4ee8cfb7fa0df (diff)
charts: don't show argv for threads
comm is where the thread name will be if set, and when set it can be awkward to then see the process' argv following the thread name. This reduces the amount of clutter and visual noise for threaded processes...
Diffstat (limited to 'src')
-rw-r--r--src/charts.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/charts.c b/src/charts.c
index c8fcadb..82516ab 100644
--- a/src/charts.c
+++ b/src/charts.c
@@ -438,11 +438,13 @@ static void argv2xtext(vmon_proc_t *proc, XTextItem *items, int max_items, int *
items[nr].font = None;
nr++;
- for (i = 1; nr < max_items && i < ((vmon_proc_stat_t *)proc->stores[VMON_STORE_PROC_STAT])->argc; nr++, i++) {
- items[nr].chars = ((vmon_proc_stat_t *)proc->stores[VMON_STORE_PROC_STAT])->argv[i];
- items[nr].nchars = strlen(((vmon_proc_stat_t *)proc->stores[VMON_STORE_PROC_STAT])->argv[i]); /* TODO: libvmon should inform us of the length */
- items[nr].delta = 4;
- items[nr].font = None;
+ if (!proc->is_thread) { /* suppress the argv for threads */
+ for (i = 1; nr < max_items && i < ((vmon_proc_stat_t *)proc->stores[VMON_STORE_PROC_STAT])->argc; nr++, i++) {
+ items[nr].chars = ((vmon_proc_stat_t *)proc->stores[VMON_STORE_PROC_STAT])->argv[i];
+ items[nr].nchars = strlen(((vmon_proc_stat_t *)proc->stores[VMON_STORE_PROC_STAT])->argv[i]); /* TODO: libvmon should inform us of the length */
+ items[nr].delta = 4;
+ items[nr].font = None;
+ }
}
(*nr_items) = nr;
© All Rights Reserved