Formatting files control the choice and format of information presented
with the show and group commands. These
formatting files are located in the /pmdf/www/popstore/
directory. To display different choices of information or to change the
formatting of the information, do not edit the Innosoft supplied
formatting files --- your changes will be lost when you next upgrade
PMDF. Instead, create new formatting files and use them instead. Once
you have created a new formatting file, you may configure the utility
to always use it, as described in Section 6.15.1 . Or, you can use it
occassionally such as to generate a monthly report. Such occassional
usage is effected with the -format switch as described in
Section 6.15.2 .
6.15.1 Changing default display formats
You may change this utility's default display formats through the use
of an option file. The file is a PMDF-style option file named
/pmdf/table/popstore_formats. Each option setting in the
file takes the form
option-name=option-valuewhere
option-name is the name of an option to set and
option-value is the value to set for that option. The
recognized option names and their default values are shown below
| Option name | Default value | Used with |
|---|---|---|
| FORWARD_FORMAT |
popmgr_forward.txt
|
show -forwardings
|
| GROUP_FORMAT |
popmgr_groups.txt
|
group -list
|
| MSG_FORMAT |
popmgr_message.txt
|
show -messages
|
| MSG_BRIEF_FORMAT |
popmgr_message_brief.txt
|
show -messages -brief
|
| PROFILE_FORMAT |
popmgr_profile.txt
|
show
|
| PROFILE_BRIEF_FORMAT |
popmgr_profile_brief.txt
|
show -brief
|
As an example, suppose you wish to change the show
command's output. You could then copy the
popmgr_profile.txt file to, say,
site/profile.txt and then edit the new file.³ Then,
create the /pmdf/table/popstore_formats file and in it
place the line
PROFILE_FORMAT=site/profile.txtMake sure that these file are world readable and owned by the PMDF account. Once you have done this, the
show output will by
default use your new formatting file. Note that if you make this change
while running the utility, you will need to exit it and restartit in
order for the change to be seen.
6.15.2 Report generation
Customized reports can be generated using the -format_file
switch of the show command. With that switch, a formatting
file can be specified. The file will then be used to format the
information to be displayed. For example, The syntax of formatting
files is described in Section 4.2.4 . suppose that the file
/pmdf/www/popstore/usage.txt contains the lines
%first{ Quota}
%first{ Owner Used}
%first{--------------------------------------------------}
%owner{%40s} %quota_used_k{%8.2f}
%last{--------------------------------------------------}
That file could then be used as follows:
# pmdf popstore show -format_file=usage.txt
Quota
Owner Used
--------------------------------------------------
Craig Watkins 24.02
Daniel Newman 8.56
David Knapke 36.72
Default user profile 0.00
Kevin Carosso 133.98
Kristin Hubner 73.22
--------------------------------------------------
#
Note that for security reasons, the formatting files must be kept in
the directory tree /pmdf/www/popstore/. This is enforced
so as to prevent users with popstore management privileges from using
the -format_file switch as a means of displaying protected
files from other directories.
See Chapter 9 for further discussion of generating reports.
/pmdf/www/popstore/ directory tree.