[ Previous |
Next |
Contents
| Glossary
| Home
| Search ]
AIX Version 4.3 Commands Reference, Volume 1
bf Command
Purpose
Analyzes the memory usage of
applications.
bf [ -b BufferSize ]
[ -W WindowSize ][ -o OutputFile ]
[ -p ProcessName ]{
-x Program
[ Program Options ]}
Description
The bf (bigfoot) command
traces the memory use of the applications. It provides a detailed
trace, or footprint, of the memory page references for
most processes on the system. The bf command captures
references to all unpinned, and many pinned, pages.
The bf command turns page
tracing on, runs the specified program, then turns page tracing
off when the program completes. The bf command creates the
__bf.rpt file, by default, in the current directory. The
file contains unprocessed page-trace data gathered while page
tracing was on. Use the -o OutputFile option to
specify a file name other than __bf.rpt.
Use the bfrpt command to
postprocess the bf command's output.
You have various ways to limit
the page-trace data captured in the __bf.rpt file.
- Use the -b flag to
control the size of the pinned buffer that the bf
command uses to store page-trace data.
- Use the -p flag to
gather data only about the process specified in the ProcessName
parameter. This flag causes the bf command to
ignore processes with names other than ProcessName.
- Use the -W flag to
provide another means of limiting captured page-trace
data. This flag causes the bf command to capture
repeated references to the same page but only logs the
reference if the page's address is not already within the
specified window of page references.
For example, given a WindowSize
of 3, and pages A, B, C, and D referenced in the
following sequence: A B A C D A, the steps performed are:
- The window's
contents is initially empty.
[ * * * ]
- Page reference A is
captured and logged.
[ * * A ]
- Page reference B is
captured and logged.
[ * A B ]
- Page reference A is
captured but not logged because A is already in
the window.
[ * A B ]
- Page reference C is
captured and logged.
[ A B C ]
- Page reference D is
captured, bumps A out, and is logged.
[ B C D]
- Page reference A is
captured, bumps B out and is logged
[ C D A ]
Therefore, the page-trace contains ABCDA not ABACDA. The
second reference to A is not logged because A was within
the window at the time of the reference, however, the
third reference to A is logged. Note: The bf
command causes a substantial reduction in system
performance. Do not use it while doing any
performance critical work
Flags
- -b BufferSize
- Specifies the number of records to store in the BigFoot
kernel buffer. If the buffer size is not large enough and
an overflow occurs, the last record contains the process
name "Buffer.Overflow."
- -o OutputFile
- Specifies the name of the file to store the output in.
The default is the __bf.rpt file.
- -p ProcessName
- Filters out all processes other than those with the
specified process name. The BigFoot kernel buffer stores
only records of processes with the specified name.
Specifying a process name reduces the size of the kernel
buffer.
- -W WindowSize
- Specifies the range of unpinned pages a page reference
must be to a new (unique) page in order to be logged. The
minimum size is 2 and the maximum size is 100. The
default size is 10.
- -x Program
- Specifies the program to run. This flag is required and
must be the last argument on the bf command line.
The program is forked as a child process. The bf
command continues collecting page reference data until
the child program ends or the buffer overlows.
Security
Access Control: You must have
root authority to run this command.
Examples
- To run the process, /bin/ps
-eaf, and monitor page references until the
process completes, enter:
bf -b 10000 -p ps -x /bin/ps -eaf
The -p flag instructs the bf command to
filter out all processes that are not named ps and
the -x flag specifies the process to run.
- To run the program /directory/path/memory_prog
enter:
bf -b 80000 -x /directory/path/memory_prog
The bf command reports on all detected processes
that referenced pages because filtering was not
specified.
- To fork the child processes sleep 20, wait until the sleep completes before
turning off the page monitoring, and record the output in
the file bigfoot.rpt, enter:
bf -b 12000 -o ./bigfoot.rpt -x sleep 20
Files
- /usr/bin/bf
- Contains the bf command.
Related Information
The bfrpt command, rmss command, and the svmon command.
[ Previous |
Next |
Contents
| Glossary
| Home
| Search ]