Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/pstat - Print number of pages in the vnode.



details:   https://anonhg.NetBSD.org/src/rev/e05a92cc1f80
branches:  trunk
changeset: 522557:e05a92cc1f80
user:      enami <enami%NetBSD.org@localhost>
date:      Thu Feb 21 10:58:00 2002 +0000

description:
- Print number of pages in the vnode.
- Recognize VEXECMAP bit in vnode flags.
- Recognize IN_SPACECOUNTED in inode flags.

diffstat:

 usr.sbin/pstat/pstat.8 |  10 +++++++++-
 usr.sbin/pstat/pstat.c |  14 +++++++++-----
 2 files changed, 18 insertions(+), 6 deletions(-)

diffs (95 lines):

diff -r 987e2fa1d3c8 -r e05a92cc1f80 usr.sbin/pstat/pstat.8
--- a/usr.sbin/pstat/pstat.8    Thu Feb 21 08:39:33 2002 +0000
+++ b/usr.sbin/pstat/pstat.8    Thu Feb 21 10:58:00 2002 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: pstat.8,v 1.28 2002/02/08 01:38:55 ross Exp $
+.\"    $NetBSD: pstat.8,v 1.29 2002/02/21 10:58:00 enami Exp $
 .\"
 .\" Copyright (c) 1980, 1991, 1993, 1994
 .\"    The Regents of the University of California.  All rights reserved.
@@ -256,6 +256,8 @@
 VSYSTEM vnode being used by kernel.
 .It I
 VISTTY vnode is a tty.
+.It E
+VEXECMAP vnode has PROT_EXEC mappings.
 .It L
 VXLOCK locked to change underlying type.
 .It W
@@ -276,6 +278,10 @@
 The number of references to this vnode.
 .It HOLD
 The number of I/O buffers held by this vnode.
+.It TAG
+The type of underlying data.
+.It NPAGE
+The number of pages in this vnode.
 .It FILEID
 The vnode fileid.
 In the case of
@@ -310,6 +316,8 @@
 is being cleaned (LFS)
 .It a
 directory operation in progress (LFS)
+.It s
+blocks to be freed in free count
 .El
 .It "For nfs:"
 .Bl -tag -width indent -compact
diff -r 987e2fa1d3c8 -r e05a92cc1f80 usr.sbin/pstat/pstat.c
--- a/usr.sbin/pstat/pstat.c    Thu Feb 21 08:39:33 2002 +0000
+++ b/usr.sbin/pstat/pstat.c    Thu Feb 21 10:58:00 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pstat.c,v 1.62 2001/10/26 05:56:11 lukem Exp $ */
+/*     $NetBSD: pstat.c,v 1.63 2002/02/21 10:58:00 enami Exp $ */
 
 /*-
  * Copyright (c) 1980, 1991, 1993, 1994
@@ -43,7 +43,7 @@
 #if 0
 static char sccsid[] = "@(#)pstat.c    8.16 (Berkeley) 5/9/95";
 #else
-__RCSID("$NetBSD: pstat.c,v 1.62 2001/10/26 05:56:11 lukem Exp $");
+__RCSID("$NetBSD: pstat.c,v 1.63 2002/02/21 10:58:00 enami Exp $");
 #endif
 #endif /* not lint */
 
@@ -347,7 +347,7 @@
 vnode_header()
 {
 
-       (void)printf("ADDR     TYP VFLAG  USE HOLD TAG");
+       (void)printf("ADDR     TYP VFLAG  USE HOLD TAG NPAGE");
 }
 
 void
@@ -396,6 +396,8 @@
                *fp++ = 'S';
        if (flag & VISTTY)
                *fp++ = 'I';
+       if (flag & VEXECMAP)
+               *fp++ = 'E';
        if (flag & VXLOCK)
                *fp++ = 'L';
        if (flag & VXWANT)
@@ -413,9 +415,9 @@
        if (flag == 0)
                *fp++ = '-';
        *fp = '\0';
-       (void)printf("%8lx %s %5s %4ld %4ld %3d",
+       (void)printf("%8lx %s %5s %4ld %4ld %3d %5d",
            (long)avnode, type, flags, (long)vp->v_usecount,
-           (long)vp->v_holdcnt, vp->v_tag);
+           (long)vp->v_holdcnt, vp->v_tag, vp->v_uobj.uo_npages);
 }
 
 void
@@ -451,6 +453,8 @@
                *flags++ = 'c';
        if (flag & IN_ADIROP)
                *flags++ = 'a';
+       if (flag & IN_SPACECOUNTED)
+               *flags++ = 's';
        if (flag == 0)
                *flags++ = '-';
        *flags = '\0';



Home | Main Index | Thread Index | Old Index