When dumping the file entry, print the usecount and iflags too.
This commit is contained in:
parent
c7914c97fe
commit
d337725eb3
|
@ -1,4 +1,4 @@
|
|||
.\" $NetBSD: pstat.8,v 1.34 2003/12/21 02:52:02 mrg Exp $
|
||||
.\" $NetBSD: pstat.8,v 1.35 2004/12/09 01:14:59 matt Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1980, 1991, 1993, 1994
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
|
@ -95,6 +95,10 @@ Number of processes that know this open file.
|
|||
Number of messages outstanding for this file.
|
||||
.It DATA
|
||||
The location of the vnode table entry or socket structure for this file.
|
||||
.It USE
|
||||
Number of active users of this open file.
|
||||
.It IFLG
|
||||
Value of internal flags.
|
||||
.It OFFSET
|
||||
The file offset (see
|
||||
.Xr lseek 2 ) .
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: pstat.c,v 1.86 2004/02/22 12:30:11 jdc Exp $ */
|
||||
/* $NetBSD: pstat.c,v 1.87 2004/12/09 01:14:59 matt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1980, 1991, 1993, 1994
|
||||
|
@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 1991, 1993, 1994\n\
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)pstat.c 8.16 (Berkeley) 5/9/95";
|
||||
#else
|
||||
__RCSID("$NetBSD: pstat.c,v 1.86 2004/02/22 12:30:11 jdc Exp $");
|
||||
__RCSID("$NetBSD: pstat.c,v 1.87 2004/12/09 01:14:59 matt Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -901,7 +901,7 @@ filemode()
|
|||
nfile = (len - sizeof(struct filelist)) / sizeof(struct file);
|
||||
|
||||
(void)printf("%d/%d open files\n", nfile, maxfile);
|
||||
(void)printf("%*s%s%*s TYPE FLG CNT MSG %*s%s%*s OFFSET\n",
|
||||
(void)printf("%*s%s%*s TYPE FLG CNT MSG %*s%s%*s USE IFLG OFFSET\n",
|
||||
(PTRSTRWIDTH - 4) / 2, "", " LOC", (PTRSTRWIDTH - 4) / 2, "",
|
||||
(PTRSTRWIDTH - 4) / 2, "", "DATA", (PTRSTRWIDTH - 4) / 2, "");
|
||||
for (; (char *)fp < offset + len; addr = fp->f_list.le_next, fp++) {
|
||||
|
@ -915,6 +915,8 @@ filemode()
|
|||
PRWORD(ovflw, " %*d", 5, 1, fp->f_count);
|
||||
PRWORD(ovflw, " %*d", 5, 1, fp->f_msgcount);
|
||||
PRWORD(ovflw, " %*lx", PTRSTRWIDTH + 1, 2, (long)fp->f_data);
|
||||
PRWORD(ovflw, " %*d", 5, 1, fp->f_usecount);
|
||||
PRWORD(ovflw, " %*x", 5, 1, fp->f_iflags);
|
||||
if (fp->f_offset < 0)
|
||||
PRWORD(ovflw, " %-*lld\n", PTRSTRWIDTH + 1, 2,
|
||||
(long long)fp->f_offset);
|
||||
|
|
Loading…
Reference in New Issue