Administering an IBM i: how the system works Chapter 10 of 10

Routine maintenance

Reviewed on Verified on IBM i 7.5

Log in to save

This chapter is the list of things to look at when nothing is happening: PTFs, IPLs, disk space, system values and schedules.

Fixes: PTFs

Fixes are called PTFs (Program Temporary Fixes). IBM ships them singly, collected in the cumulative package, and in groups by area: Db2, HIPER (High Impact PERvasive), Java, security and others. Each group has a progressive level, and that is what you follow.

WRKPTFGRP

In SQL, the highest installed level of each group:

SELECT PTF_GROUP_NAME, MAX(PTF_GROUP_LEVEL) AS LIVELLO
  FROM QSYS2.GROUP_PTF_INFO
 WHERE PTF_GROUP_STATUS = 'INSTALLED'
 GROUP BY PTF_GROUP_NAME
 ORDER BY PTF_GROUP_NAME

It follows IBM's example for the view, which finds the cumulative level with MAX(PTF_GROUP_LEVEL) and PTF_GROUP_STATUS = 'INSTALLED'. Reading it needs *USE to the WRKPTFGRP command. Compare the level with the current one IBM publishes for your release.

Now or at the next IPL

Some PTFs cannot be applied at once, because the operating system or products they affect are active: these are delayed PTFs, applied only at the next IPL. Immediate PTFs are applied without an IPL, if the objects they affect are not in use and all requisite PTFs can be applied immediately too. DSPPTFAPYI tells you in advance how it will go.

Groups waiting for an IPL:

SELECT PTF_GROUP_NAME, PTF_GROUP_LEVEL
  FROM QSYS2.GROUP_PTF_INFO
 WHERE PTF_GROUP_STATUS = 'APPLY AT NEXT IPL'

Note

this is why an update campaign is planned together with an IPL, and why a system that is never restarted can have PTFs loaded and not yet active.

The IPL

A restart is called an IPL (Initial Program Load).

PWRDWNSYS OPTION(*CNTRLD) DELAY(600) RESTART(*YES)

With *CNTRLD the subsystems end jobs in a controlled way within the DELAY time (3600 seconds by default), and programs do their end-of-job processing; whatever is left after that is ended immediately.

Warning

with OPTION(*IMMED) programs cannot do their cleanup, and IBM warns it can give undesirable results on partially updated data: use it only after a controlled end has failed.

The IPL side: A and B

The system keeps two copies of the Licensed Internal Code. Copy A is the permanent one; B also holds the Licensed Internal Code fixes applied temporarily. B is the one normally used, and is needed for temporary fixes to take effect; IBM points to A when an IPL from B fails because of one of them.

DSPPTF LICPGM(5770999)

In the "IPL source" field, ##MACH#A is A and ##MACH#B is B. The side is chosen with PWRDWNSYS ... IPLSRC(A) or IPLSRC(B), from the control panel (function 02, together with the mode: manual or normal) or, for a partition, from the HMC.

Disk space

The number to watch is the system ASP's occupancy against its threshold: 90% by default, beyond which the system starts sending messages. What happens next, and the QSYS2.ASP_INFO query with the threshold next to the occupancy, are in the chapter on ASPs.

WRKSYSSTS

Per disk unit:

SELECT UNIT_NUMBER, UNIT_TYPE,
       DEC(PERCENT_USED, 5, 1) AS PERCENTUALE
  FROM QSYS2.SYSDISKSTAT
 ORDER BY PERCENT_USED DESC

Where the space goes is covered by the chapters on the spool and on saving, for journal receivers.

System values

They are the machine's global settings.

WRKSYSVAL
DSPSYSVAL SYSVAL(QSECURITY)

Those this guide has already named:

Value Chapter
QSYSLIBL, QUSRLIBL the library list
QCTLSBSD, QPFRADJ jobs and subsystems
QSECURITY, QCRTAUT, QAUDCTL, QAUDLVL profiles and security
QLOGOUTPUT messages and the job log
QRCLSPLSTG the spool
QALWOBJRST saving and restoring

All of them, with the shipped value alongside:

SELECT SYSTEM_VALUE_NAME, SYSTEM_VALUE, SHIPPED_DEFAULT_VALUE
  FROM QSYS2.SYSTEM_VALUE_INFO
 ORDER BY SYSTEM_VALUE_NAME

Tip

keeping this query's output once a year and comparing it with the year before shows what has changed, even when nobody remembers who changed it.

Schedules

The system has its own scheduler:

WRKJOBSCDE
ADDJOBSCDE JOB(CHIUSURA) CMD(CALL PGM(PRODLIB/CHIUSURA)) +
           FRQ(*MONTHLY) SCDDATE(*MONTHEND) SCDTIME(230000)

Warning

if an entry is held (HELD) at its scheduled time, the job is not submitted. Held entries, for instance after maintenance, are found with:

SELECT SCHEDULED_JOB_NAME, STATUS, DESCRIPTION
  FROM QSYS2.SCHEDULED_JOB_INFO
 WHERE STATUS = 'HELD'

What to look at, and how often

A starting point, to be adapted to the installation:

When What
Every morning messages in QSYSOPR and QSYSMSG, outcome of overnight batch, held schedule entries
Every week disk space, outcome of saves, job logs of failed jobs
Every month PTF group levels, PTFs waiting for an IPL, spool and IFS growth, long-idle profiles
Every year restore test, review of profiles with special authorities, system value comparison

Each item is a query or a command, and almost all can be run from a scheduler entry.

Sources

Back to the guide index

← Back to blog

Comments

No comments yet. Be the first to comment!

You need an account to comment. Log in · Sign up