]> granicus.if.org Git - sysstat/commitdiff
sadf: Fix PCP and SVG output for filesystem statistics
authorSebastien GODARD <sysstat@users.noreply.github.com>
Fri, 10 May 2019 16:23:00 +0000 (18:23 +0200)
committerSebastien GODARD <sysstat@users.noreply.github.com>
Fri, 10 May 2019 16:23:00 +0000 (18:23 +0200)
When the mount point had to be displayed instead of the filesystem name
with sar's option -F (i.e. the user entered "-F MOUNT" instead of just
"-F"), no data were found by sadf -g (SVG output) and sadf -l (PCP
output). This patch fixes the problem.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
sadf_misc.c

index 6a6ecd1740c522f3257a154afb47ba434890bc04..452839e7a640ef3baabb60610fd3ca83e283814f 100644 (file)
@@ -1505,7 +1505,9 @@ __nr_t count_new_filesystem(struct activity *a, int curr)
        for (i = 0; i < a->nr[curr]; i++) {
                sfc = (struct stats_filesystem *) ((char *) a->buf[curr] + i * a->msize);
 
-               nr += add_list_item(&(a->item_list), sfc->fs_name, MAX_FS_LEN);
+               nr += add_list_item(&(a->item_list),
+                                   DISPLAY_MOUNT(a->opt_flags) ? sfc->mountp : sfc->fs_name,
+                                   MAX_FS_LEN);
        }
 
        return nr;