aboutsummaryrefslogtreecommitdiff
path: root/sbin/mount
diff options
context:
space:
mode:
authorDoug Ambrisko <ambrisko@FreeBSD.org>2022-06-13 14:56:38 +0000
committerDoug Ambrisko <ambrisko@FreeBSD.org>2022-06-13 14:56:38 +0000
commit6468cd8e0ef9d1d3331e9de26cd2be59bc778494 (patch)
treede845894d534a48f5ec730be4d0474f0c7b57882 /sbin/mount
parent9c951734c28914f51b2fe2f2028272b572ade1ee (diff)
downloadsrc-6468cd8e0ef9d1d3331e9de26cd2be59bc778494.tar.gz
src-6468cd8e0ef9d1d3331e9de26cd2be59bc778494.zip
mount: add vnode usage per file system with mount -v
This avoids the need to drop into the ddb to figure out vnode usage per file system. It helps to see if they are or are not being freed. Suggestion to report active vnode count was from kib@ Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D35436
Diffstat (limited to 'sbin/mount')
-rw-r--r--sbin/mount/mount.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sbin/mount/mount.c b/sbin/mount/mount.c
index 79d9d6cb0caf..bd3d0073c474 100644
--- a/sbin/mount/mount.c
+++ b/sbin/mount/mount.c
@@ -692,6 +692,13 @@ prmount(struct statfs *sfp)
xo_emit("{D:, }{Lw:fsid}{:fsid}", fsidbuf);
free(fsidbuf);
}
+ if (sfp->f_nvnodelistsize != 0 || sfp->f_avnodecount != 0) {
+ xo_open_container("vnodes");
+ xo_emit("{D:, }{Lwc:vnodes}{Lw:count}{w:count/%ju}{Lw:active}{:active/%ju}",
+ (uintmax_t)sfp->f_nvnodelistsize,
+ (uintmax_t)sfp->f_avnodecount);
+ xo_close_container("vnodes");
+ }
}
xo_emit("{D:)}\n");
}