334 lines
13 KiB
Groff
334 lines
13 KiB
Groff
'\"macro stdmacro
|
|
.if n .pH man1.bufview @(#)bufview 1.0 of 8/20/97
|
|
.TH bufview 1
|
|
.SH NAME
|
|
bufview \- file system buffer cache activity monitor
|
|
.SH SYNOPSIS
|
|
.I bufview [ -options ]
|
|
.SH DESCRIPTION
|
|
.I bufview
|
|
displays periodic information about the file system buffer cache.
|
|
It is modeled after the program
|
|
.IR top (1)
|
|
which displays information about running processes.
|
|
.SH OPTIONS
|
|
.TP
|
|
.B \-b
|
|
Use batch (or non\-interactive mode).
|
|
.TP
|
|
.B \-s delay
|
|
Wait
|
|
.I delay
|
|
seconds between updates.
|
|
The default is 3 seconds.
|
|
.TP
|
|
.B \-d count
|
|
Update the display
|
|
.I count
|
|
times and then exit.
|
|
The default is to continually update.
|
|
.TP
|
|
.B \-n lines
|
|
Display only
|
|
.I lines
|
|
number of buffers.
|
|
The default is to display as many buffers as will fit the screen when in
|
|
interactive mode, or all buffers when in batch mode.
|
|
.TP
|
|
.B \-f flags
|
|
Only display buffers which have the specified
|
|
.I flags
|
|
bits set.
|
|
.TP
|
|
.B \-o order
|
|
display buffers using the specified sort order.
|
|
.TP
|
|
.B \-S
|
|
Do not display system buffers.
|
|
.TP
|
|
.B \-D
|
|
Do not display data buffers.
|
|
.SH "INTERACTIVE MODE"
|
|
.I bufview
|
|
accepts display commands interactively.
|
|
These commands are currently recognized:
|
|
.TP
|
|
.B ^L
|
|
Redraw the screen.
|
|
.IP "\fBh\fP\ or\ \fB?\fP"
|
|
Display a summary of the commands (help screen).
|
|
.TP
|
|
.B q
|
|
Quit.
|
|
.TP
|
|
.B s
|
|
Change number of seconds to delay between updates.
|
|
.TP
|
|
.B S
|
|
Toggle display of system buffers on or off.
|
|
.TP
|
|
.B D
|
|
Toggle display of file data buffers on or off.
|
|
.TP
|
|
.B o
|
|
Specify buffer display order (see details below).
|
|
.TP
|
|
.B f
|
|
Display only buffers with specific state flags set (see details below).
|
|
.TP
|
|
.B F
|
|
Ignore buffer state flags when determining which buffers to display.
|
|
.TP
|
|
.B m
|
|
Display only buffers from the specified device (mounted file system).
|
|
.TP
|
|
.B M
|
|
Display buffers from all mounted file systems.
|
|
This is the default behaviour.
|
|
.SH "FILE SYSTEM BUFFERS"
|
|
There are a set number of buffer headers allocated by the system when
|
|
it starts up, but the memory attached to each buffer changes over time.
|
|
.PP
|
|
In the Irix operating system, a distinction is made between data
|
|
buffers, which hold the data from regular files, and system or meta\-data
|
|
buffers, which hold the file system control data, such as directories,
|
|
inodes and file system mapping information.
|
|
.PP
|
|
The file system buffer cache is integrated with the memory page allocator.
|
|
Any pages which contain file system data are remembered; if the pages
|
|
are released from a buffer header because the buffer is asked to represent
|
|
different data, the pages can be reclaimed by another buffer later if
|
|
the pages haven't been reused in the meantime.
|
|
Thus pages of memory which hold file data can be: attached to buffers;
|
|
or attached to one or more user processes (see \fBmmap(2)\fP),
|
|
separately or at the same time; or on the free page list.
|
|
.SH "GLOBAL INFORMATION"
|
|
The first few lines of the display monitor system\-wide statistics.
|
|
These include buffer counts, memory values, events and time values.
|
|
.PP
|
|
The total number of buffers is displayed as \fIBufs\fP;
|
|
at any moment, each of these buffers is accounted for as
|
|
either \fISys\fP, \fIData\fP, \fIEmpty\fP or \fIInact\fP.
|
|
Sys means that the buffer contains file system meta\-data;
|
|
a Data buffer hold regular file data.
|
|
Empty implies that the buffer does not have any data stored at the moment;
|
|
Inact means that the buffer is empty and has been removed from use
|
|
temporarily to avoid having the buffer cache use too much memory.
|
|
.PP
|
|
The total amount of system memory is displayed as \fIMem\fP.
|
|
The amount of memory associated with Sys and Data buffers is
|
|
displayed as \fISMem\fP and \fIDMem\fP.
|
|
The current amount of free memory is displayed as \fIMFree\fP;
|
|
the portion of that memory that holds (reclaimable) file system data
|
|
is shown as \fIMFreD\fP.
|
|
.PP
|
|
Various system memory limiters are also shown.
|
|
The operating system avoids having the amount of memory in
|
|
Data buffers grow too large.
|
|
To such end, the system tuneable parameter, \fBmin_free_pages\fP,
|
|
specifies how many pages should be on the free list.
|
|
If there are fewer, the Data buffers will be trimmed, but only as
|
|
low as \fBmin_file_pages\fP (see \fBsystune(1)\fP).
|
|
.B min_file_pages
|
|
and
|
|
.B min_free_pages
|
|
are shown, as memory amounts,
|
|
in \fIDMin\fP and \fIFrMin\fP.
|
|
.PP
|
|
There are two other limits to the amount of memory the buffer
|
|
Data cache can use.
|
|
There are two system counters known as \fBavailrmem\fP and
|
|
\fBavailsmem\fP, which indicate, respectively, how many physical pages
|
|
would be available if push came to shove (that is, if the system paging
|
|
daemon were to push every possible user page out of memory
|
|
and in to backing store);
|
|
and how many pages of memory and backing store (swap) have not been
|
|
reserved by programs and the kernel.
|
|
These two counters are expressed as memory amounts by \fIMaxR\fP and
|
|
\fIMaxS\fP.
|
|
In the 6.5 operating system release, Data buffer pages are not accounted
|
|
for in either \fBavailrmem\fP or \fBavailsmem\fP, but since the Data
|
|
cache can never be forced to drop below \fBmin_file_pages\fP, the
|
|
system must ensure that: first, neither \fBavailrmem\fP nor \fBavailsmem\fP
|
|
drop below \fBmin_file_pages\fP; and second, that if the Data cache
|
|
grows beyond \fBmin_file_pages\fP, it does not grow beyond the avail
|
|
counters.
|
|
These values are displayed as a diagnostic tool to help understand
|
|
whether there are enough buffers allocated for the system, whether the
|
|
cache is responding well enough to various memory pressures, and
|
|
whether the tuneable parameters are configured sanely.
|
|
.PP
|
|
If the buffer cache memory must be trimmed, individual buffer headers
|
|
are inactivated. Inactivated buffers, displayed as \fIInact\fP are
|
|
those which are both trimmed of their memory and also removed from the
|
|
buffer free lists so that won't be immediately refilled to represent
|
|
other file system data. When the system decides that the amount of
|
|
memory allocated to buffers can grow, and there are no empty buffers
|
|
available, inactive buffers are activated (put back on a free list).
|
|
.PP
|
|
Some event counters are also shown.
|
|
The number of times a buffer is inactivated is shown as \fIdeact\fP;
|
|
conversly, reactivations are shown as \fIreact\fP.
|
|
.PP
|
|
The number of times a particular buffer is sought is given as \fIgtblk\fP;
|
|
the times a sought buffer is found in the cache is \fIfound\fP.
|
|
If a particular buffer isn't found in the buffer cache, a buffer free list
|
|
is searched for the first available buffer that can be reclaimed.
|
|
Buffers that have delayed write data or that have special release
|
|
functions associated with them are not directly acquired in the search
|
|
for available buffers; instead they are written (\fIwrite\fP) or
|
|
the release function is called (\fIrelse\fP), and skipped.
|
|
Buffers have a counter which, when set, allows the
|
|
buffer to pass through the free list search unscathed (the counter is
|
|
decremented each time it is examined).
|
|
The counter \fIstky\fP indicated these events.
|
|
Note that all event counters are given as events per second since the
|
|
display was last updated.
|
|
.PP
|
|
The current time is also shown, as well as the current system clock
|
|
tick value.
|
|
.PP
|
|
Note that all event counters are labeled with names that contain
|
|
no upper\-case letters, and that
|
|
all memory values are labeled with names that contain an
|
|
upper\-case 'M'.
|
|
With memory values, a 'K' represents 1024 bytes, an 'M' is 1024 K and so on.
|
|
Buffer counters are given as decimal values, and their labels all start
|
|
with upper\-case characters.
|
|
.SH "DISPLAY ORDER"
|
|
The display sort order and any pruning flags are also displayed.
|
|
The sort order determines in what order buffers are to be displayed;
|
|
and pruning flags, if specified, indicated that \fIbufview\fP should only
|
|
display buffers with the indicated flags set.
|
|
The following sort keys can be specified:
|
|
.PP
|
|
.nf
|
|
\fBm\fP display the files with the most buffers attached
|
|
\fBl\fP display the files with the least buffers attached
|
|
\fBb\fP display the biggest buffers first
|
|
\fBs\fP display the smallest buffers first
|
|
\fBn\fP display the newest buffers first
|
|
\fBo\fP display the oldest buffers first
|
|
.fi
|
|
.PP
|
|
Note that
|
|
.I bufview
|
|
can be in either aggregate mode or itemized mode.
|
|
When in aggregate mode, all files (for regular file data) or devices
|
|
(for system data) that are currently using buffers are represented as a
|
|
single buffer; in itemized mode, individual buffers are presented.
|
|
By default,
|
|
.I bufview
|
|
runs in aggregate mode and sorts using \fIm\fP and \fIb\fP as
|
|
the sort keys.
|
|
The display order can be changed, either interactively or as a
|
|
command\-line option.
|
|
Either way, the last order specifier given becomes the first sort key.
|
|
.PP
|
|
If any pruning flags are requested, only those buffers which have the
|
|
corresponding flags set will be displayed.
|
|
The following pruning flags can be specified:
|
|
.PP
|
|
.nf
|
|
\fBdw\fP display delayed write buffers
|
|
\fBbsy\fP display in-use (busy) buffers
|
|
\fBas\fP display buffers being used for asynchronous reads/writes
|
|
\fBna\fP display NFS buffers being used for async reads/writes
|
|
\fBda\fP display buffers without allocated backing\-store
|
|
\fBnc\fP display NFS3 buffers without committed backing\-store
|
|
\fBswp\fP display buffers being used to swap user pages
|
|
\fBinact\fP display inactive buffers
|
|
\fBino\fP display inode buffers
|
|
\fBinomap\fP display inode map buffers
|
|
\fBdir_bt\fP display buffers containing directory btrees
|
|
\fBmap\fP display buffers containing maps
|
|
\fBattr_bt\fP display attribute btree buffers
|
|
\fBagi\fP display buffers containing AG header (inode allocation)
|
|
\fBagf\fP display allocation group header buffers
|
|
\fBagfl\fP display allocation group free block array buffers
|
|
\fBdquot\fP display quota buffers containing dquot structures
|
|
.fi
|
|
.PP
|
|
These, too, can be specified as command\-line options or demanded
|
|
interactively.
|
|
Further, pruning flags can be removed (wholesale) with the \fBF\fP
|
|
interactive command.
|
|
.PP
|
|
If a display order or flag specifier is given that is incompatible with
|
|
the current mode, the mode changes and any incompatible sort or display
|
|
directives are removed.
|
|
For example, the \fIn\fP display order and all pruning flags are
|
|
incompatible with aggregate mode; if any of these are specified,
|
|
\fIm\fP or \fIl\fP will be removed as a sort key.
|
|
Similarly, if either \fIm\fP and \fIl\fP are demanded,
|
|
.I bufview
|
|
will convert to aggregate mode, and any pruning flags or itemized sort
|
|
keys will be deleted.
|
|
.SH "THE DISPLAY"
|
|
The information displayed about buffers changes depending whether
|
|
.I bufview
|
|
is in aggregate mode or itemized mode.
|
|
In either mode, the internal node number of the file is
|
|
displayed under the column \fIVNUMBER\fP for data buffers, or
|
|
listed simply as a 'system' file if the buffer represents a
|
|
meta\-data buffer.
|
|
.PP
|
|
In aggregate mode, the next column is \fINAME\fP.
|
|
Only data file names are given, and only those whose names are brief
|
|
enough to be included in the system's internal directory name cache
|
|
(currently 31 bytes).
|
|
The names displayed by
|
|
.I bufview
|
|
are truncated.
|
|
A file whose name is too large to fit in the name cache is displayed as '?';
|
|
if the system cannot determine the name of the file because it would have
|
|
had to sleep waiting for an internal lock, the file names is displayed as '??'.
|
|
In itemized mode the column \fINAME/REF\fP shows either the
|
|
(possibly truncated) file name or, for meta\-data buffers,
|
|
a pseudo-reference counter which, if non-zero, allows a buffer
|
|
a free trip though the buffer free list.
|
|
.PP
|
|
The column \fIDEVICE\fP gives the last component(s) of the file system
|
|
path name of the device from which the file system for the
|
|
given buffer's file is mounted.
|
|
.PP
|
|
The column \fIFSTYP\fP gives an indication of the type of file system
|
|
that is being managed by the buffer.
|
|
.PP
|
|
In aggregate mode, the next column is \fINBUF\fP, which is
|
|
the number of buffers currently holding data or meta-data for the
|
|
particular file or file system, respectively.
|
|
The aggregate buffer size and the amount of buffer memory which is
|
|
delayed\-write is shown as \fISIZE\fP and \fIDELWRI\fP.
|
|
(Delayed write means that the buffer has been altered but the new
|
|
contents have not yet been written to backing store.)
|
|
.PP
|
|
The final two columns in aggregate mode, \fILOW\fP and \fIHIGH\fP,
|
|
represent the lowest and highest bytes represented by the buffers
|
|
mapping the object. For data buffers, they refer to logical offsets
|
|
within the file; for meta\-data buffers, offsets within the file system.
|
|
.PP
|
|
In itemized mode, the index of the particular buffer in the system's
|
|
buffer array is given as \fIBUF\fP.
|
|
Its size is given next as \fISIZE\fP, and
|
|
\fIOFFSET\fP the offset within the file or file system
|
|
of the first byte mapped by the buffer.
|
|
.PP
|
|
The column \fIAGE\fP shows the clock tick stored in the buffer.
|
|
This value is set when the buffer is first created and reset
|
|
whenever the buffer is accessed or modified.
|
|
.PP
|
|
Lastly, interesting buffer flags are shown under \fIFLAGS\fP.
|
|
The list of flags which might be displayed are exactly those which can
|
|
be specified as display pruning flags.
|
|
.SH FILES
|
|
.DT
|
|
/etc/mtab list of mounted file systems
|
|
.SH BUGS
|
|
The buffer cache notion of a device number does not match that of the
|
|
mounted file system for NFS file systems, so the device number, not
|
|
its name, is displayed.
|
|
.SH "SEE ALSO"
|
|
.IR top (1),
|
|
.IR osview (1)
|