LIST-FILE-STATS Proc

The LIST-FILE-STATS Proc lists statistics on all files most recently saved to backup media.

Format

LIST-FILE-STATS

Description

The INFO/ACCESS statement extracts data from the STAT-FILE and produces a File Statistics (FILE-STATS) Report, which consists of selected elements from the statistical information that the data processor builds and stores in the STAT-FILE in the SYSPROG account.

The File Statistics Report lists information about files in all saved accounts as of the last full or incremental backup. Items are stored in the STAT-FILE only for those files that were saved using either the SAVE command with the S option, or the FILE-SAVE or INCR-SAVE Procs. File statistics are not generated with the ACCOUNT-SAVE command. When the system is fully restored, the STAT-FILE is cleared and remains empty until the next full or incremental backup.

STAT-FILE

The STAT-FILE contains the following data items from which to produce a File Statistics Report:

0

ID (REEL :FILE)

Number of the reel in a multireel filesave, followed by the number of the file. The file number is used with the N option when restoring files.

1

NAME

Account name, dictionary file name, and data file name, separated by * (i.e., SYSPROG*BP*BP). When dictionaries and data files have the same name, the data file is listed as filename*filename. File names that contain * will cause the File Statistics Report to misname files.

2

FILE LEVEL #

A number from 0-3:

0

System level.

1

Master dictionary level.

2

File dictionary level.

3

Data file level.

3

BASE

Base frame ID of the file.

4

MODULO

Number of groups.

5

SEPARATION

Number of frames initially allocated to a group. Always a 1.

6

# ITEMS

How many records in the file just saved.

7

# BYTES

How much data saved.

8

LARGEST ITEM SIZE

9

SMALLEST ITEM SIZE

10

# ITEMS IN FULLEST GROUP

11

# ITEMS IN EMPTIEST GROUP

12

# FRAMES USED

Total number of frames used by the file, including full and partially full frames, allocated frames, secondary file space and object code frames.

13-20 REPRESENT A LOGICAL SET

13

# GROUPS 25% FULL

14

# GROUPS 50% FULL

15

# GROUPS 75% FULL

16

# GROUPS 100% FULL

17

# GROUPS 125% FULL

18

# GROUPS 150% FULL

19

# GROUPS 200% FULL

20

# GROUPS >200% FULL

Total should be equal to the modulo. Items 17-20 (particularly 20) should indicate as few groups as possible.

21

# GFEs

Critical information. On a system level, should be checked daily. If other than 0, must be addressed immediately.

22

# OBJECT CODE FRAMES

Total number of frames of object code used by programs and select-lists.

23

NOT USED IN mvBase

24

NOT USED IN mvBase

25

# INDIRECT ITEMS

26

TOTAL SIZE OF ALL INDIRECT ITEMS

27

RAW BYTES (DIRECT)

Total of attribute 26 and attribute 27 equal the number in attribute 7.

28

REEL #

Printing out an entire STAT-FILE could mean several thousand pages and would be essentially inefficient. A more practical use of this file is to focus on getting information about specific system management problems, producing smaller and more useful reports.

Producing the File Statistics Report

mvBase is delivered with a default format for a File Statistics Report; however, the report can be customized to include a wide range of statistics by using the attribute definitions in the dictionary of the STAT-FILE (discussed later in this section). With the printer set to 132 columns, you can create a wider report to show more information than typically fits on a terminal display screen.

The File Statistics Report can be produced in a total of four forms by combining the method of production (sending to printer or to screen) with a choice of two levels of detail (suppressed or not suppressed).

When you type LIST-FILE-STATS, the system asks if you want the report sent to the printer. This message displays:

TO LINEPRINTER (Y/N)

Type Y to send the report to the printer, type N to display it on your screen. The report displays on the screen in non-columnar format; the printer prints it in 132-character columnar format.

You are asked if you want to display only the statistical totals, suppressing the detailed breakdown of the report:

DETAIL SUPPRESS (Y/N)

Type Y to suppress details, type N to display or print the full report.

Using LIST-FILE-STATS with Details Suppressed

This example lists a default File Statistics Report with the details suppressed. Only the first and last pages of the report are shown:

The report shows this information:

Management Uses of the File Statistics Report

While a default File Statistics Report can be produced from the STAT-FILE dictionary delivered with mvBase, a wide range of reports can be created from the STAT-FILE to answer specific questions the system administrator has about the system’s condition.

Three issues of primary importance should concern an administrator planning to customize the format of a File Statistics Report:

Are there any GFEs on the system?

Are there any files that are underallocated for space and are into overflow?

What is the overall space usage on the system?

Recommendations for Customizing the File Statistics Report

It is recommended that the system administrator create a new account outside of SYSPROG to contain a customized dictionary pulled from the STAT-FILE attribute definitions, which can be continually modified yet not be subject to being cleared by system restores.

This example shows the contents of a sample dictionary constructed for the purposes of creating a custom File Statistics Report. The number of attributes pulled for the customized File Statistics Report are limited only by the width of the columns created to present the data from the STAT-FILE, and the width set for the printer.

200%

TOP

.P

001 A

002 20

003

004

005

006

007

008

009 R

010 4

EOI 010

ACCOUNT

TOP

.P

001 A

002 1

003 Account Name

004

005

006

007

008 G0*1

009 L

010 10

EOI 010

 

ACCOUNT.HIDDEN.BREAK

TOP

.P

001 A

002 1

003 \

004

005

006

007

008 G0*1

009 U

010 0

EOI 010

 

FRAME.RATIO

TOP

.P

001 A

002 0

003 Ratio of]Used to]Alloc'd

004

005

006

007 MD2

008 A;(12-22-((26+"1999")/"2000"))*"100"/4

009 R

010 8

EOI 010

 

GA.FRAMES

TOP

.P

001 A

002 12

003 Number Of (2K) Frames

004

005

006

007 MR0,

008

009 R

010 15

EOI 010

 

GA.NAME

TOP

.P

001 A

002 1

003 Dict*Data Name

004

005

006

007

008 G1*99

009 L

010 30

EOI 010

 

GA.SEQ

TOP

.P

001 A

002 0

003 Seq.

004

005

006

007

008 G1:1

009 R

010 6

EOI 010

 

GA.SIZE

TOP

.P

001 A

002 7

003 Size in bytes

004

005

006

007 MR0,

008

009 R

010 15

EOI 010

 

GT200%

TOP

.P

001 A

002 20

003

004

005

006

007

008

009 R

010 4

EOI 010

 

MOD

TOP

.P

001 A

002 4

003 Modulo

004

005

006

007 MD0,

008

009 R

010 10

011 1

EOI 011

 

MORE.THAN.TWICE

TOP

.P

001 A

002 20

003 Groups]more than]twice]overflowed

004

005

006

007 MD0,

008

009 R

010 10

EOI 010

 

WIDE.ACCOUNT

TOP

.P

001 A

002 1

003 Account Name

004

005

006

007

008 G0*1

009 L

010 25

EOI 010

The system administrator then can write a Proc to build an assortment of reports from the new dictionary and the STAT-FILE data. The Proc shown below is an example of the customization possible in requesting information from the STAT-FILE:

 NEW.FILE.STATS

001 PQ

002 C

003 C Test for GFE's first

004 C

005 H SELECT STAT-FILE

006 H WITH GFE NE ""

007 H AND WITH GFE NE "0"

008 STON

009 H<

010 P

011 IF S GO 20

012 10 C

013 C Now Produce a "problem" files report

014 C

015 C   A problem file is one where the number of Direct space frames is

016 C   double (or worse) the modulo; or any one group is more than 4 frames

017 C   into overflow.

018 C

019 H SORT STAT-FILE

020 H USING DICT NEW.STAT.FILE

021 H BY ACCOUNT

022 H BY GA.NAME

023 H ID-SUPP     

024 H GA.SEQ

025 H BREAK-ON ACCOUNT.HIDDEN.BREAK "Totals for 'VPUB':"

026 H GA.NAME

027 H WITH FRAME.RATIO GE "2"

028 H FRAME.RATIO

029 H MOD

030 H MORE.THAN.TWICE

031 H HEADING "'C'File Statistics Report -- Overflowed Files

032 H 'LC'for Account :'BLL'"

033 H FOOTING "'LC'Page : 'PL'

034 H Generated at: 'T'"

035 C

036 C Now test the command line for print destination

037 C

038 S2

039 IF A A

040 P

041 H SORT STAT-FILE

042 H USING DICT NEW.STAT.FILE

043 H BY ACCOUNT

044 H ID-SUPP

045 H HDR-SUPP

046 H SUPP

047 H DET-SUPP   

048 H BREAK-ON WIDE.ACCOUNT

049 H TOTAL GA.SIZE

050 H TOTAL GA.FRAMES

051 H HEADING "'C'File Statistics Report -- Space Usage Summary

052 H 'LL'"

053 H FOOTING "'LC'Page : 'PL'

054 H Generated at: 'T'"

055 H GRAND-TOTAL "System Totals:'U'"

056 S2

057 IF A A

058 P

059 X

060 20 C Come here to warn of GFE's

061 T C

062 HBLOCK-PRINT Found GFEs

063 P

064 O press <enter> to continue +

065 C

066 C Use the secondary input buffer to preserve any command line options in

067 C the primary input buffer.

068 C

069 IS

070 GO 10

With the three system management questions discussed earlier in mind, this Proc produces several types of reports to answer them.

  1. Are there any GFEs on the system?

  2. In line  003, the Proc asks the system to test for GFEs first. In this case, if even one GFE is found, the system will clear the terminal screen and issue a message in screen-size block letters FOUND GFES. This message will continue to display until the system administrator manually presses ENTER in order to continue. The system then produces the rest of the report on GFEs.

  3. Are there any files that are underallocated for space and are into overflow?

  4. This system administrator wants to give attention to accounts containing files with an overflow ratio of greater than or equal to 2. The Proc sorts the STAT-FILE as instructed and produces a report called “Overflowed Files for Account :___________.” See the example below:

  5. What is the overall space usage on the system?

  6. Finally, the administrator wants some idea of which accounts in the system may potentially cause a problem by using too much space. The “Space Usage Summary” reports for each account:

    See the example below.

    This type of information, combined with using the WHAT to report what the total number of available frames is left on the system, warns the system administrator when space management issues such as the need to delete files or add more memory become a concern.