To configure access to System Management Facility (SMF)
files, you need to configure the server started task JCL, the server configuration member, and the
server virtual table member.
To enable reading SMF data real-time using log streams, you must have the
SMFPRMxx member in the system PARMLIB data set configured to use both log
streams and in-memory resources. Follow the steps in this section to use SMF GDG data set names, or
to use dynamic data set names.
About this task
SMF data set names are dynamic in local environments and require SEF rules enablement and
optionally Global Variables set to specific values to provide data set names to the virtual tables
and views when using SMF data set or log stream configurations.
You can choose either GDG data set name support or dynamic data set name support, or both, to
quickly access your SMF data. These two options are provided for your convenience to help you start
accessing your SMF data. Custom rules may need to be developed to use your local naming convention
to access your SMF files.
Procedure
-
Configure
the server started task JCL by concatenating the hlq.SAZKSMAP data set to the
AZKMAPP DD
statement to add all maps for SMF.
-
Customize the server
configuration member.
To enable virtual table rule events, configure the
SEFVTBEVENTS
parameter in
the
AZKSIN00 member, as
follows:
"MODIFY PARM NAME(SEFVTBEVENTS) VALUE(YES)"
Verify the VTB ruleset
name:
"DEFINE RULESET NAME(VTB)"
"RULETYPE(VTB)"
"DSNAME('"||SHLQ2||".SAZKXVTB')"
If
there were any changes to AZKSIN00, recycle
the server started task.
-
To enable real-time access to SMF data, add the following statements to the AZKSIN00 member after the
GLOBAL PRODUCT OPTIONS
statement.
IF DoThis
THEN DO
"DEFINE SMF NAME(IFASMF.INMEM)",
"STREAM(IFASMF.INMEM.STREAM)",
"BUFSIZE(500)",
"TIME(0)"
END
Note: You must have the SMFPRMxx member in the system PARMLIB data set
configured to use log streams and in-memory resources.
Parameter |
Description |
Valid values |
NAME |
Specifies the name of the in-memory resource. This value must match the name of a resource
defined to SMF with the INMEM parameter. If this parameter is included, the
in-memory API will be read continuously and a buffer of the most recent records will be maintained.
Either this parameter or the STREAM
parameter, or both, must be specified. |
This parameter must contain the name of an in-memory resource defined to SMF with the INMEM
statement. The format of the name is defined by SMF configuration, which is 1-26 characters and must
begin with IFASMF . |
STREAM |
Specifies the name of the streaming in-memory feature. If this name is specified on a SELECT
statement, a dynamic connection will be made to the SMF in-memory API and records will be streamed
to the caller in real time. Either this parameter or the NAME parameter, or
both, must be specified. |
If a NAME parameter is also supplied, the in-memory resource named in
that parameter will be connected to and the value of this parameter can be any name, 1-26
characters. If the NAME parameter is not supplied, this parameter must contain
the name of an in-memory resource defined to SMF with the INMEM parameter. If
both NAME and STREAM are provided, the names must be
different. |
BUFSIZE |
Indicates how much SMF data (megabytes) will be retained in memory for queries. If the buffer
fills up, the oldest data will be discarded. In parallel, SMF is recording these records to a log
stream. This parameter applies to the resource named
in the NAME parameter. |
1-10,000 |
TIME |
Indicates how long (in minutes) to keep SMF data in memory. Older data will be discarded.
Specifying 0 indicates no time limit and data will be retained until the buffer fills up. This parameter applies to the resource named in the
NAME parameter. |
0-1440 |
-
To use SMF data in compressed log
streams, add the following statement to the AZKSIN00 member:
"MODIFY PARM NAME(ZEDCCOMPRESSION) VALUE(YES)"
Note: You must have the SMFPRMxx member in the system PARMLIB data set
configured to use compressed log streams, and the zEDC Express hardware feature must be installed.
For more information about enabling zEDC, see the Administrator's Guide.
-
Enable reading SMF data from GDG data sets and access to SMF data using dynamic data set names
by enabling Server Event Facility rule AZKSMFT1 in the VTB
ruleset. You can select from a GDG data set, any SMF dump data set, a log stream data set, or the
in-memory stream. Activate your options by customizing the rule.
-
Use the following
steps to enable rule AZKSMFT1 in the VTB ruleset:
- In the IBM Open Data Analytics for z/OS - Primary Option Menu, specify option
E, Rules Mgmt.
- Specify option 2, SEF Rule Management.
- Enter VTB for Display Only the Ruleset Named.
- Enable the rule by specifying E and pressing Enter.
- Set the rule to Auto-enable by specifying A and pressing Enter.
Setting
the rule to Auto-enable activates the rule automatically when the server is re-started.
-
Configure the access method using one or more of the following methods:
- Review the information in the rule for the instructions on setting Global Variables that will be
used by the rule. Navigate one screen back on the ISPF panel, or start over by going to option E, Rules Mgmt., and then option
1, Global Variables. In the Global Variables display,
perform the following steps:
- Change Global Prefix to GLOBAL2.
- Select SMFTBL2 by entering S next to the SMFTBL2 data set.
- Configure the SMF data access option. DEFAULT should have corresponding SMF dump data set names
if used. This option can be used to specify the source SMF, such as GDGBASE, INMEM, and LOGSTREAM.
Note:
VTB rules and global variables may be used to reference a GDG data set, any SMF dump data set, a
log stream data set, or the in-memory stream. For
example:
GLOBAL2.SMFGBL2.YESTERDAY = "YOUR.DATASET.SMFDUMP(-1)"
GLOBAL2.SMFGBL2.M2 = "YOUR.DATASET.SMFDUMP(-2)"
GLOBAL2.SMFGBL2.M3 = "YOUR.DATASET.SMFDUMP(-3)"
GLOBAL2.SMFGBL2.M4 = "YOUR.DATASET.SMFDUMP(-4)"
GLOBAL2.SMFGBL2.M5 = "YOUR.DATASET.SMFDUMP(-5)"
GLOBAL2.SMFGBL2.IM = "IFASMF.INMEM"
GLOBAL2.SMFGBL2.IM2 = "IFASMF.INMEM2"
GLOBAL2.SMFGBL2.LOG = "LOGSTREAM.dataset.name"
- Pass a dynamic data set name for SMF tables using the following format for the table name in the
SQL statement:
TableMapName__DataSetName
Where DataSetName
is prefixed by two underscores (__
) and the
periods in the data set name are replaced with single underscores (_
).
For example, SELECT * FROM SMF_01400__DATA_SET_NAME
would translate into an SQL
query of SELECT * FROM SMF_14000
and access the data set
DATA.SET.NAME
.
- Pass a dynamic data set name for SMF virtual views using the following format for the virtual
view name in the SQL statement:
Where DataSetName
is prefixed by two underscores (__
) and the
periods in the data set name are replaced with single underscores (_
).
For example, SELECT * FROM
SMFV_01400__DATA_SET_NAME
would translate into an SQL query of SELECT * FROM SMFV_01400
and access the data
set DATA.SET.NAME
.