SMF Changes on zOS V1R9_Final

28
© 2009 IBM Corporation SMF Changes on z/OS V1R9 André Luiz dos Santos Gonçalves Email Address: [email protected] Ext. Phone: +55-21-2132-3447 Tie-Line: 5-831-3447

Transcript of SMF Changes on zOS V1R9_Final

Page 1: SMF Changes on zOS V1R9_Final

© 2009 IBM Corporation

SMF Changes on z/OS V1R9

André Luiz dos Santos GonçalvesEmail Address: [email protected]. Phone: +55-21-2132-3447Tie-Line: 5-831-3447

Page 2: SMF Changes on zOS V1R9_Final

© 2009 IBM Corporation

IBM System z

2

References

• z/OS Version 1 Release 9 Implementation Redbook – Chapter 7: SMF recording to log streams;

• SA22-7630-19 Manual - z/OS V1R10.0 MVS System Management Facilities (SMF);

• SA22-7625-17 Manual - z/OS V1R10.0 MVS Setting Up a Sysplex – Chapter 9: Planning for System Logger applications;

• System Programmer’s Guide to: z/OS System Logger Redbook;

• ABCs of z/OS System Programming Volume 5 - Chapter 2: System Logger;

• Techdocs Library

Page 3: SMF Changes on zOS V1R9_Final

© 2009 IBM Corporation

IBM System z

3

What is the System Logger?

• MVS component that has its own address space and allows applications to log data from one or multiple systems;

• System logger applications can be supplied by IBM (like the OPERLOG, CICS log manager, SYSLOG), independent software vendors and also user-created;

• System logger applications write data to log streams;

• Two kings of log stream storage: Interim storage (quickly accessed without using the DASD I/O) and DASD log data set storage (data is kept for long term access. Mainly used when interim storage is offloaded when it reaches an user-defined treshold);

Page 4: SMF Changes on zOS V1R9_Final

© 2009 IBM Corporation

IBM System z

4

Presentation Overview

1. Display the way SMF used to record system and job-related information.

2. Introduce the additional records write capability of SMF on z/OS V1R9 as well as its dependencies and requirements.

Page 5: SMF Changes on zOS V1R9_Final

© 2009 IBM Corporation

IBM System z

5

SMF operation overview

Page 6: SMF Changes on zOS V1R9_Final

© 2009 IBM Corporation

IBM System z

6

SMF Recording to SYS1.MANx data sets

Note: Each buffer is numbered to correspond to a particular record in the SMF dataset

Program requests to write a SMF

Record.Record

SMF Address Space

Buffer

SYS1.MANx

SMF Record

Data

Buffers containing SMF information are fully written to SYS1.MANx datasets. The buffering and writing takes place

inside the SMF private Address Space.

Page 7: SMF Changes on zOS V1R9_Final

© 2009 IBM Corporation

IBM System z

7

Frequent issues with SMF records into SYS1.MANx data sets

• Data being lost and/or not recorded;

• Records exceeding the capacity limit of SYS1.MANx data sets;

• Overprocessing and redundant read/write activity of SMF dump program;

• Lack of a correctly sorted record list, demanding extra work on a sysplex environment.

Page 8: SMF Changes on zOS V1R9_Final

© 2009 IBM Corporation

IBM System z

8

SMF recording to log streams

Program requests to write a SMF

Record.Record

Dataspace

Buffer

Writer TaskLogstream

SMF Record

Data

SMF Record

Data

Offload Dataset

The buffering proccess takes place inside a dataspace corresponding to the user’s record

type and log stream. A buffer with space to hold the record is located and the record is copied there. When it is full, a writer task is

posted.

Page 9: SMF Changes on zOS V1R9_Final

© 2009 IBM Corporation

IBM System z

9

Functions and improvements

Improved data write rate;

Increased volume of data that can be recorded;

Better data management;

Dedicated dataspace to buffer and write the SMF data to a log stream.

Note: The use of log streams for SMF Data is optional. Existing SYS1.MANx function continues to exist for installations satisfied with this functionality.

Page 10: SMF Changes on zOS V1R9_Final

© 2009 IBM Corporation

IBM System z

10

SMF ADDRESS SPACE

SMF data partitioning example using log streams

DATA

DATASPACE 1 DATASPACE 2

Buffer Buffer

CICS Default

OffloadDataset(CICS)

OffloadDataset(Default)

Page 11: SMF Changes on zOS V1R9_Final

© 2009 IBM Corporation

IBM System z

11

Types of log streams

Coupling Facility log streams: Ideal for a sysplex environment;

DASD-only: Ideal for single-system environments.

Page 12: SMF Changes on zOS V1R9_Final

© 2009 IBM Corporation

IBM System z

12

SMF recording to log streams prerequisites

z/OS Version 1 Release 9 or higher;

Utilizaton of the IXCMIAPU utility with DATA TYPE (LOGR) to create the log streams;

Update the SMFPRMxx parmlib member to define the use of log streams.

Note: SETSMF RECORDING can be used to toggle recording settings to SYS1.MANx data sets (as a fallback plan, for example).

Page 13: SMF Changes on zOS V1R9_Final

© 2009 IBM Corporation

IBM System z

13

Sample JCLs to define DASD-only log streams

//EXEC1 EXEC PGM=IXCMIAPU //SYSPRINT DD SYSOUT=X //SYSIN DD * DATA TYPE (LOGR) REPORT(YES) DEFINE LOGSTREAM NAME(IFASMF.DEFAULT) DASDONLY(YES) MAXBUFSIZE(65532) DIAG(YES) LS_SIZE(10000) STG_SIZE(10000) AUTODELETE(YES) RETPD(90) HLQ(COUPLE) HIGHOFFLOAD(80)

DASD-ONLY LOG STREAM DEFINITION

Page 14: SMF Changes on zOS V1R9_Final

© 2009 IBM Corporation

IBM System z

14

Sample JCLs to define CF log streams and update the CFRM policy

//EXEC1 EXEC PGM=IXCMIAPU//SYSPRINT DD SYSOUT=X//SYSIN DD * DATA TYPE (LOGR) REPORT(YES) DEFINE STRUCTURE NAME(SMF_PERF) LOGSNUM(5) AVGBUFSIZE(32767) MAXBUFSIZE(65532) DEFINE LOGSTREAM NAME(IFASMF.PERF) STRUCTNAME(SMF_PERF) STG_DUPLEX(YES) LS_SIZE(50000) AUTODELETE(NO) RETPD(365) HLQ(COUPLE) HIGHOFFLOAD(80)

CF LOG STREAM AND STRUCTURE DEFINITION

//EXEC1 EXEC PGM=IXCMIAPU

//SYSPRINT DD SYSOUT=X

//SYSIN DD *

DATA TYPE(CFRM) REPORT(NO)

DEFINE POLICY NAME(POLCF12) REPLACE(YES)

CF NAME(CF1)

TYPE(002094)

MFG(IBM)

PLANT(02)

SEQUENCE(0000000023A6A)

PARTITION(5)

CPCID(00)

DUMPSPACE(10000)

CF NAME(CF2) TYPE(002094) MFG(IBM) PLANT(02) SEQUENCE(0000000023A6A) PARTITION(6) CPCID(00) DUMPSPACE(10000) ...STRUCTURE NAME(LOGGER_SMF) SIZE(525056) REBUILDPERCENT(1) PREFLIST(CF1,CF2) ...

UPDATE OF CFRM POLICY USING THE IXCMIAPU ADMINISTRATIVE DATA UTILITY.

ISSUE THIS COMMAND TO ACTIVATE THE DEFINED CFRM POLICY:

SETXCF START,POLICY,POLNAME=policyname,TYPE=CFRM

Page 15: SMF Changes on zOS V1R9_Final

© 2009 IBM Corporation

IBM System z

15

Sample JCLs to update and delete SMF log stream and to delete CF structure

//EXEC1 EXEC PGM=IXCMIAPU

//SYSPRINT DD SYSOUT=X

//SYSIN DD *

DATA TYPE (LOGR)

DELETE LOGSTREAM NAME(IFASM.DEFAULT)

DELETE LOGSTREAM NAME(IFASM.AUDIT)

/*

LOGSTREAM DELETION EXAMPLE

//EXEC1 EXEC PGM=IXCMIAPU

//SYSPRINT DD SYSOUT=X

//SYSIN DD *

DATA TYPE (LOGR)

DELETE STRUCTURE NAME(SMF_PERF)

DELETE STRUCTURE NAME(SMF_REMIND)

/*

CF STRUCTURE DELETION EXAMPLE

//EXEC1 EXEC PGM=IXCMIAPU

//SYSPRINT DD SYSOUT=X

//SYSIN DD *

DATA TYPE (LOGR) REPORT(YES)

UPDATE LOGSTREAM NAME(IFASMF.DEFAULT)

DIAG(YES)

/*

LOGSTREAM UPDATE EXAMPLE

Page 16: SMF Changes on zOS V1R9_Final

© 2009 IBM Corporation

IBM System z

16

Updating the SMFPRMxx PARMLIB member

New parameters to be inserted in the SMFPRMxx PARMLIB member for logstream recording:

RECORDING(DATASET | LOGSTREAM)

DEFAULTLSNAME(logstreamname) - OPTIONAL

LSNAME(logstreamname,TYPE{aa,bb}|({aa,bb:zz}))

SYS(...,EXITS(...,IEFU29L,...)

SUBSYS(STC,EXITS(IEFU29L,...))

SMF MANx data sets can still be defined on the SMFPRMxx member when using log streams, allowing a fall back if necessary.

Switching between SMF dataset and SMF log stream can be done by IPLing the system or issuing the "SET SMF=xx" command.

NOTE 1: SETSMF RECORDING(DATASET|LOGSTREAM) command can be used to toggle recording settings to SYS1.MANx data sets (as a fallback plan, for example) and logstreams.

NOTE 2: Be careful when activating the SMF records to log stream when IPLing the system. If you have definition problems, the system will buffer the SMF records until the problems are fixed.

Page 17: SMF Changes on zOS V1R9_Final

© 2009 IBM Corporation

IBM System z

17

SMFPRMxx new parameters examples

DEFAULTLSNAME(IFASMF.DEFAULT)

LSNAME(IFASMF.PERF,TYPE(30,89))

LSNAME(IFASMF.JOB,TYPE(30,04))

RECORDING(LOGSTREAM)

•RECORD TYPE 30 WILL BE WRITTEN TO BOTH IFASMF.PER AND IFASMF.JOB LOGSTREAMS;

•RECORD TYPE 89 WILL BE WRITTEN TO IFASMF.PERF LOGSTREAM;

•RECORD TYPE 04 WILL BE WRITTEN TO IFASMF.JOB LOGSTREAM;

•ALL THE OTHER SMF RECORD TYPES WILL BE WRITTEN TO

IFASMF.DEFAULT LOGSTREAM.

DEFAULTLSNAME(IFASMF.DEFAULT)

LSNAME(IFASMF.PERF,TYPE(70:79))

LSNAME(IFASMF.JOB,TYPE(30,04))

RECORDING(LOGSTREAM)

•USING THE COLON (:), A RANGE OF SMF RECORD TYPES (FROM 70 TO 79) WILL BE WRITTEN TO IFASMF.PERF

LOGSTREAM;

•RECORD TYPES 30 AND 04 ARE WRITTEN ON IFASMF.JOB

LOGSTREAM;

•ALL OTHER RECORD TYPES ARE WRITTEN TO IFASMF.DEFAULT

LOGSTREAM.

Page 18: SMF Changes on zOS V1R9_Final

© 2009 IBM Corporation

IBM System z

18

SMFPRMxx parmlib member examples

SAMPLE SMFPRMxx FOR SMF MANx DATASET LOGGING

Page 19: SMF Changes on zOS V1R9_Final

© 2009 IBM Corporation

IBM System z

19

SMFPRMxx parmlib member examples

SAMPLE SMFPRMxx FOR SMF LOGGING, NOTE THAT THE COMMANDS IN RED ARE THE NEW STATEMENTS.

Page 20: SMF Changes on zOS V1R9_Final

© 2009 IBM Corporation

IBM System z

20

Switching between SMF dataset and SMF log stream recording modes

Switching can be done by IPLing the system or issuing the "SET SMF=xx" command;

Switching by IPLing the system is dangerous because if there are any definition errors the system will buffer SMF data until the problem is fixed. It's recommended to switch dynamically;

Before switching ensure to dump all SMF records from the existing SMF recording;

Issue the "/D SMF" command to display witch type of SMF recording is being used in the system.

Page 21: SMF Changes on zOS V1R9_Final

© 2009 IBM Corporation

IBM System z

21

Examples of "/D SMF" command output

IEE974I 21.18.06 SMF DATA SETS 956

NAME VOLSER SIZE(BLKS) %FULL STATUS

P-SYS1.MAN1 VMVS01 3600 5 ACTIVE

S-SYS1.MAN2 VMVS01 3600 0 ALTERNATE

"/D SMF" COMMAND OUTPUT FOR SMF DATASET LOGGING

IFA711I LOGSTREAM PARAMETERS ARE IN EFFECT

IEE536I SMF VALUE XX NOW IN EFFECT

OUTPUT OF A SUCCESSFUL "SET SMF=xx" COMMAND

IFA714I 04.18.10 SMF STATUS 232

LOGSTREAM NAME BUFFERS STATUS

A-IFASMF.DEFAULT 42144 CONNECTED

A-IFASMF.CICS 0 CONNECTED

A-IFASMF.AUDIT 29186 CONNECTED

A-IFASMF.PERFM 0 CONNECTED

"/D SMF" COMMAND OUTPUT FOR SMF LOGSTREAM LOGGING

Page 22: SMF Changes on zOS V1R9_Final

© 2009 IBM Corporation

IBM System z

22

Dumping SMF data to SMF log stream datasets

SMF data is dumped automatically when the staging dataset reaches the treshold of the Highoffload defined or when the operator issues the "SWITCH SMF" command;

To find out the log stream and staging dataset information, issue the command "D LOGGER,C,LSN=logstream dataset name,DETAIL'.

Once SMF records are in the SMF log streams, the operator can run the program "IFASMDSL" to dump SMF records from SMF log stream dataset to other output datasets for archive.

NOTE: IFASMFDL IS USED TO DUMP SMF LOG STREAM DATASET ONLY AND WILL NOT WORK FOR MANx SMF DATASET DUMP

Page 23: SMF Changes on zOS V1R9_Final

© 2009 IBM Corporation

IBM System z

23

"D LOGGER,C,LSN=logstream dataset name,DETAIL" output example

LOGSTREAM STRUCTURE #CONN STATUS --------- --------- ------ ------ IFASMF.DEFAULT *DASDONLY* 000001 IN USE DUPLEXING: STAGING DATA SET STGDSN: COUPLE.IFASMF.DEFAULT.SVSCPLEX VOLUME=VPMVSE SIZE=008100 (IN 4K) % IN-USE=078 GROUP: PRODUCTION JOBNAME: SMF ASID: 0018 R/W CONN: 000000 / 000001 RES MGR./CONNECTED: *NONE* / NO IMPORT CONNECT: NO NUMBER OF LOGSTREAMS: 000001

Page 24: SMF Changes on zOS V1R9_Final

© 2009 IBM Corporation

IBM System z

24

Sample JCL to dump SMF log stream data sets

Page 25: SMF Changes on zOS V1R9_Final

© 2009 IBM Corporation

IBM System z

25

Additional notes

SMF log stream doesn't allow you to clear SMF records in the log stream. Clearing the SMF records in a log stream becomes unnecessary once you archive it, unlike the SMF MANx dataset's CLEAR option;

To clear SMF records in the log stream you must use the AUTODELETE() and RETPD() parameter when defining these log streams. For example, to keep data in the log stream for 1 day and delete it afterwards, use the AUTODELETE(YES) and RETPD(1) parameters.

Page 26: SMF Changes on zOS V1R9_Final

© 2009 IBM Corporation

IBM System z

26

Presentation Summary

With the new record write capability of SMF, larger amounts of system and job related data can be stored faster and without having the risk to be lost, even giving the capability of partitioning and sorting this data at will. Also, if the log stream function fails, SMF can log its data to the SYS1.MANx data sets dynamically.

Page 27: SMF Changes on zOS V1R9_Final

© 2009 IBM Corporation

IBM System z

27

For more info...

For detailed information about installation and a walkthrough on a SMF migration, access Techdocs homepage by clicking here and check the highlighted documents.

Page 28: SMF Changes on zOS V1R9_Final

© 2009 IBM Corporation

IBM System z

28