Subject: bin/592: cleanup of pstat
To: None <gnats-admin@sun-lamp.cs.berkeley.edu>
From: James Jegers <jimj@enigma.cs.uwm.edu>
List: netbsd-bugs
Date: 11/28/1994 22:05:11
>Number:         592
>Category:       bin
>Synopsis:       cleaned up the man pages for pstat
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    gnats-admin (Utility Bug People)
>State:          open
>Class:          doc-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Nov 28 22:05:05 1994
>Originator:     James Jegers
>Organization:
"	"
>Release:        current as of 11/28/94<NetBSD-current source date>
>Environment:
	
System: NetBSD enigma.cs.uwm.edu 1.0 NetBSD 1.0 (ENIGMA) #0: Fri Oct 21 15:20:37 CDT 1994 jimj@enigma.cs.uwm.edu:/usr/src/sys/arch/i386/compile/ENIGMA i386


>Description:
	
	The man page for pstat does not match what pstat actually gives
	as output.  A lot of missing items and duplicated things.
>How-To-Repeat:
	
>Fix:
	Small fix to pstat.c to allow it to print out vnode things for
	lfs filesystems.

*** pstat.c.orig	Mon Nov 28 22:54:42 1994
--- pstat.c	Mon Nov 28 22:55:06 1994
***************
*** 399,404 ****
--- 399,406 ----
  		*fp++ = 'B';
  	if (flag & VALIASED)
  		*fp++ = 'A';
+ 	if (flag & VDIROP)
+ 		*fp++ = 'D';
  	if (flag == 0)
  		*fp++ = '-';
  	*fp = '\0';

	Changes to update the manual page to what the program does.

*** pstat.8.orig	Mon Nov 28 21:32:40 1994
--- pstat.8	Mon Nov 28 23:09:02 1994
***************
*** 57,72 ****
  unless 
  .Ar system
  is specified.
- The
- .Fl n
- option specifies that devices should be printed out by major/minor
- number rather than by name.
  .Pp
  Options are
  .Bl -tag -width indent
  .It Fl T
! Prints the number of used and free slots in the several system tables
! and is useful for checking to see how large system tables have become
  if the system is under heavy load.
  .It Fl f
  Print the open file table with these headings:
--- 57,70 ----
  unless 
  .Ar system
  is specified.
  .Pp
  Options are
  .Bl -tag -width indent
+ .It Fl n
+ Prints the devices by major/minor number rather than by name.
  .It Fl T
! Prints the number of used and free slots for open files, used vnodes, and swap
! space. It is useful for checking to see how large system tables become
  if the system is under heavy load.
  .It Fl f
  Print the open file table with these headings:
***************
*** 77,83 ****
  The type of object the file table entry points to.
  .It FLG
  Miscellaneous state variables encoded thus:
! .Bl -tag -width indent
  .It R
  open for reading
  .It W
--- 75,82 ----
  The type of object the file table entry points to.
  .It FLG
  Miscellaneous state variables encoded thus:
! .Pp
! .Bl -tag -width indent -compact
  .It R
  open for reading
  .It W
***************
*** 120,153 ****
  Print table for terminals
  with these headings:
  .Bl -tag -width indent
  .It RAW
  Number of characters in raw input queue.
  .It CAN
  Number of characters in canonicalized input queue.
  .It OUT
! Number of characters in putput queue.
! .It MODE
! See
! .Xr tty 4 .
! .It ADDR
! Physical device address.
! .It DEL
! Number of delimiters (newlines) in canonicalized input queue.
  .It COL
  Calculated column position of terminal.
  .It STATE
  Miscellaneous state variables encoded thus:
! .Bl -tag -width indent
! .It T
! delay timeout in progress
  .It W
  waiting for open to complete
  .It O
  open
- .It F
- outq has been flushed during DMA
  .It C
  carrier is on
  .It B
  busy doing output
  .It A
--- 119,152 ----
  Print table for terminals
  with these headings:
  .Bl -tag -width indent
+ .It LINE
+ Physical device name.
  .It RAW
  Number of characters in raw input queue.
  .It CAN
  Number of characters in canonicalized input queue.
  .It OUT
! Number of characters in output queue.
! .It HWT
! High water mark for output.
! .It LWT
! Low water mark for output.
  .It COL
  Calculated column position of terminal.
  .It STATE
  Miscellaneous state variables encoded thus:
! .Pp
! .Bl -tag -width indent -compact
  .It W
  waiting for open to complete
  .It O
  open
  .It C
  carrier is on
+ .It T
+ delay timeout in progress
+ .It F
+ outq has been flushed during DMA
  .It B
  busy doing output
  .It A
***************
*** 156,179 ****
  open for exclusive use
  .It S
  output stopped
! .It H
! hangup on close
  .El
  .It PGRP
  Process group for which this is controlling terminal.
  .It DISC
! Line discipline; blank is old tty
! OTTYDISC
! or
! .Ql new tty
! for
! NTTYDISC
! or
! .Ql net
! for
! NETLDISC
! (see
! .Xr bk 4 ) .
  .El
  .It Fl v
  Print the active vnodes.  Each group of vnodes corresponding
--- 155,181 ----
  open for exclusive use
  .It S
  output stopped
! .It K
! further input blocked
! .It Y
! tty in async I/O mode
  .El
+ .It SESS
+ Enclosing session.
  .It PGRP
  Process group for which this is controlling terminal.
  .It DISC
! Line discipline
! .Bl -tag -width indent
! .It term 
! Standard tty.
! .It tab
! Tablet.
! .It slip
! Serial line protocol.
! .It ppp
! Point to Point protocol.
! .El
  .El
  .It Fl v
  Print the active vnodes.  Each group of vnodes corresponding
***************
*** 189,195 ****
  where
  .Em fstype
  is one of
! .Em ufs , nfs , mfs , or pc ;
  .Em from
  is the filesystem is mounted from;
  .Em on
--- 191,200 ----
  where
  .Em fstype
  is one of
! .Em adosfs , afs , cd9660 , fdesc , 
! .Em kernfs , lfs , lofs , mfs ,
! .Em msdos , nfs , null , portal ,
! .Em procfs , ufs , umap , union ;
  .Em from
  is the filesystem is mounted from;
  .Em on
***************
*** 208,234 ****
  .It TYP
  File type.
  .It VFLAG
- .Pp
  A list of letters representing vnode flags:
! .Bl -tag -width indent
  .It R
! \- VROOT
  .It T
! \- VTEXT
  .It L
! \- VXLOCK
  .It W
! \- VXWANT
! .It E
! \- VEXLOCK
  .It S
! \- VSHLOCK
! .It T
! \- VLWAIT
  .It A
! \- VALIASED
  .It B
! \- VBWAIT
  .El
  .Pp
  .It USE
--- 213,237 ----
  .It TYP
  File type.
  .It VFLAG
  A list of letters representing vnode flags:
! .Pp
! .Bl -tag -width indent -compact
  .It R
! VROOT root of its file system.
  .It T
! VTEXT pure text prototype.
  .It L
! VXLOCK locked to change underlying type.
  .It W
! VXWANT process is waiting for vnode.
  .It S
! VSYSTEM vnode being used by kernel.
  .It A
! VALIASED vnode has an alias
  .It B
! VBWAIT waiting for output to complete
! .It D
! VDIROP lfs vnode involved in directory op.
  .El
  .Pp
  .It USE
***************
*** 245,251 ****
  .Bl -tag -width indent
  .It "For ufs:"
  .Pp
! .Bl -tag -width indent
  .It L
  locked
  .It U
--- 248,254 ----
  .Bl -tag -width indent
  .It "For ufs:"
  .Pp
! .Bl -tag -width indent -compact
  .It L
  locked
  .It U
***************
*** 270,276 ****
  has a rename in progress
  .El
  .It "For nfs:"
! .Bl -tag -width indent
  .It W
  waiting for I/O buffer flush to complete
  .It P
--- 273,279 ----
  has a rename in progress
  .El
  .It "For nfs:"
! .Bl -tag -width indent -compact
  .It W
  waiting for I/O buffer flush to complete
  .It P
***************
*** 302,308 ****
  .Sh SEE ALSO
  .Xr iostat 1 ,
  .Xr ps 1 ,
- .Xr systat 1 ,
  .Xr vmstat 1 ,
  .Xr stat 2 ,
  .Xr fs 5 ,
--- 305,310 ----
	
>Audit-Trail:
>Unformatted: