IBM Support

IBM i temporary storage percentage

Question & Answer


Question

What are some options to determine what my temporary storage percentage on the IBM i?

Answer

Here are four options to check your temporary storage percentage.   There may be others you like better as well.

1) Using SQL (simple calculation, modify / add precision as you'd like)

Use Run SQL Scripts (part of Access Client Solutions)

SELECT CURRENT_TEMPORARY_STORAGE,
       SYSTEM_ASP_STORAGE,
       (CURRENT_TEMPORARY_STORAGE * 100)
           / SYSTEM_ASP_STORAGE as Temp_Percent
  FROM QSYS2.SYSTEM_STATUS_INFO
;

Sample Output from SYSTEM_STATUS_INFO

2) Database specific

Use IBM i command line         

  a. CALL PGM(QQQOOOCACH) PARM('F:QTEMP/UFILE:U')
  b. runqry () qtemp/ufile
  c. Temp % is on the first screen

          image-20240318150328-6


  d. bonus: page down to SQE ACTIVE CURSOR SUMMARY to see Job with largest SQE temp usage

          TMPSTG_UFILE_SQE ACTIVE CURSOR SUMMARY

3) An IBM i API - (message can be confusing however)

Use IBM i command line          

  a. CALL QWCCTLTS PARM(*DSPLMT *ALL)
  b. F1 on the Temporary storage threshold reached message.
      Cause . . . . . :   The amount of storage used for temporary objects in the system ASP is 2.3621 percent.

4) An IBM i API - Add functionality to WRKSYSSTS

Use IBM i command line         

  a. CALL QWCCTLTS PARM(*SETLMTPCT *ALL 80)
  b. WRKSYSSTS
  c. F19=Extended system status

    % temporary storage used  . . . . . . . . . :        2.3
    % temporary storage limit . . . . . . . . . :         80

  d. note that the 80 is from step 4.a.
  e. To remove a warning limit for all temporary storage on the system (and set it back to the default of no warning limit)
       CALL QWCCTLTS PARM(*SETLMTPCT *ALL 0)

[{"Type":"MASTER","Line of Business":{"code":"LOB57","label":"Power"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SWG60","label":"IBM i"},"ARM Category":[{"code":"a8m0z0000001goBAAQ","label":"IBM i Db2-\u003ETemp Storage"}],"ARM Case Number":"","Platform":[{"code":"PF012","label":"IBM i"}],"Version":"All Versions"}]

Document Information

Modified date:
19 March 2024

UID

ibm17144143