[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]
Commands Reference, Volume 1

bf Command

Purpose

Analyzes the memory usage of applications.

Syntax

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.

Note: The bf command tool currently only supports the operation of non-threaded 32-bit applications in AIX Version 4.3. No 64-bit application support exists.

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.

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

  1. 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.
  2. 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.
  3. 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.


[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]