[ Previous | Next | Contents | Glossary | Home | Search ]
AIX Version 4.3 Commands Reference, Volume 1

bfrpt Command

Purpose

Reports on the memory usage of applications.

Syntax

bfrpt{ -r act | global | all } [ -f ReportFileName] [ -P ProcessName ] [ -N ProcessNum ] [-p ]

Description

The bfrpt command filters bf page-trace files for two types of post processing. The first type reflects the global state of the system. The second type reflects the page-referencing patterns of a particular process.

The bfrpt command uses the global filter to provide a comprehensive view of the system. The global filter calculates the overall footprint of each process found in the bf report.

The bfrpt command uses the Address Correlation Technology filter, or act filter, to analyze bf data with emphasis on a single process. The act filter translates a system, library, or process address into a symbolic routine name.

The bfrpt command formats output in tabular form as the default, but with the -p flag you can also record the output in a PostScript file.

Global Reports

The bfrpt command's global reports consist of header information and tables. The header information is a brief reminder to the user about the properties of segment registers. AIX maps 32-bit virtual memory addresses into 16 segments. Four of the 32 bits select one of the 16 bit segment registers. The remaining 28 bits give an offset within the segment. Each segment register contains a 24-bit segment ID, which, when prefixed to the 28-bit segment offset, forms a full 52-bit virtual address.

Header Information

The header information in a global report lists the abbreviations assigned to the 16 segment registers:

0: Kernel
1: Exec Program (Process text)
2: Private Read-Write (Process Data)
3-12: Addressable Files and Shared Memory Segments
13: Shared Library Text
14: Kernel
15: Shared Library Data
Note: Though the header information is accurate for most AIX processes, the system can use some segment registers for different purposes. Use the header information as a guideline only.

Non-kernel programs have read-only access to the two kernel segments, 0 and 14, and the shared library segment, 13. Segment 1 contains the executable of the current program. Other instances of the same program share the read-only contents of segment 1.

Segment 2 contains the private read-write data space of the current program. Program variables, allocated memory, and the program stack come from the private segment of the process. In rare instances, library text resides in segment 2.

Segment 13 is readable by all users. Therefore, shared libraries with file permissions that do not include read access for all other users on the system are not loaded in segment 13. AIX loads libraries without global read access in the private data segment of each process that uses them.

Segment 15 contains the private shared library data for a process. The ten remaining segments, 3 through 12, provide memory access to files and shared memory segments. The system maps files into virtual memory segments when a file is first opened.

Tables

Three tables follow the header information:

The first table, the Process Name Table, contains the number of pages referenced by each process name. If the bfrpt command reports two or more processes with the same process name, it treats them logically as one process in the Process Name Table. The rows are sorted by the number of referenced pages.

****************************************************************
*                                                              *
* Number of Pages Referenced by <Process Name>                 *
*                                                              *
****************************************************************
PNAME (20 chars)    TOTAL     0  1   2  3-12    13  14  15
              ksh     331   135 39  70     4    30   0  53
             mont     137    90  5  13     0    14   0  15
          rlogind      45    30  4   4     0     3   0   4

The second table, the Process Name-Process ID Table, lists each process in the bfrpt report on a separate row. Because AIX can reuse process IDs, they are combined with process names to distinguish all processes in the report.

****************************************************************
*                                                              *
* Number of Pages Referenced by <Process Name, PID>            *
*                                                              *
****************************************************************
PNAME (20 chars)    PID  TOTAL      0      1      2   3-12     13     14     15
           ksh    10600    247    119     26     35      1     29      0     37
           ksh    10598    206    101     21     30      1     24      0     29
           ksh    11336     99     47     33      5      2     11      0      1
          mont    10598    137     90      5     13      0     14      0     15
       rlogind     9354     45     30      4      4      0      3      0      4

The third table, the Unique Pages Table, contains the total unique pages referenced by each distinct process. A unique page is a page referenced by only one process. A page referenced by more than one process is a shared page. The system examines the full 52-bit virtual address, not just 32 bits, to determine the uniqueness of a page.

****************************************************************
*                                                                *
* Number of Unique Pages Referenced by <Process Name, PID>        *
*                                                                *
****************************************************************
NAME (20 chars)       PID     TOTAL
 
            ksh     11336        99
            ksh     10598        78
            ksh     10600        24
           mont     10598        20
        rlogind      9354        15

act Reports

The act reports provide information about the footprints of each routine in a process. Each act report comprises four logical sections:

The Total Footprint section is divided into three tables. The first table contains the footprints for all routines other than the shared library and kernel routines. The second table contains footprints for the shared library routines that the main program uses. The third table contains the footprints for the kernel routines that operate on behalf of the process.

The Footprint Before Start and Footprint After Stop sections provide footprints for the kernel routines that operate either prior to the start or after the end of the main program.

The Unique Data Footprint section identifies footprints for unique data segments in the main program's routines. If two or more routines touch the same page, the page is shared, not unique.

Flags

-f ReportFileName The name of the BigFoot page-trace file. Default is __bf.rpt.
-N ProcessNum Number of processes to get from the page-trace file. Runs act on this number of processes. Default is top two processes.
-P ProcessName Run act reports only on the specified process. The top two processes have act filtering done by default. See -N option.
-p Creates reports in PostScript format. Files named processname.ps are act reports and files named global.ps are global reports.
-r ReportType Specifies the type of report to create. The valid values, which are mutually exclusive, for ReportType are: act, global, and all ( to create both act and globalpp reports). This is a required flag.

Security

Access Control: You must have root authority to run this command.

Examples

  1. To produce all reports in tabular form, enter:
    bfrpt -r all
  2. To produce an act report on processes only named example, enter:
    bfrpt -r act -P example
  3. To produce all reports but run act report on processes only named example, enter:
    bfrpt -r all -P example
  4. To produce act reports on the 5 largest processes, enter:
    bfrpt -r act -N5

Files

/usr/bin/bfrpt
Contains the bfrpt command.

Related Information

The rmss command, svmon command, and the bf command.


[ Previous | Next | Contents | Glossary | Home | Search ]