4/28/08 How to determine what is eating up your disk space

Step 1. Run the following command :

DSPOBJD OBJ(*ALL) OBJTYPE(*ALL) OUTPUT(*OUTFILE) OUTFILE(QGPL/OBJLIST)

CAUTION: Depending on the number of objects on your system this could take a while so you may want to submit it to batch:

SBMJOB CMD(DSPOBJD OBJ(*ALL) OBJTYPE(*ALL) OUTPUT(*OUTFILE)
OUTFILE(QGPL/OBJLIST)) JOB(BLDOBJLIST)

Step 2. Go to the interactive SQL processor (STRSQL) and run the following SQL statement:

SELECT * FROM QGPL/OBJLIST ORDER BY ODOBSZ DESC

The biggest offenders will be at the top of the list!

Step 3. Delete the OBJLIST file (created in Step 1): DLTF QGPL/OBJLIST


Disclaimer: Vision Solutions makes every effort to provide accurate system management information and programming code; however the company cannot be held liable for the accuracy of information nor its compatibility in your own environment. Please review and test thoroughly before implementing. © Copyright 2008, Vision Solutions, Inc. All rights reserved. IBM, System i, iSeries, and AS/400 are trademarks of International Business Machines Corporation. All other brands are property of their respective registered owners.

1 comment:

Unknown said...

Your SQL should be:

SELECT ODOBNM, ODLBNM, ODOBTP, (ODSIZU * ODBPUN)
FROM QGPL/OBJLIST
ORDER BY (ODSIZU * ODBPUN) DESC

Otherwise you might miss really big objects that exceed the size of a 4 byte integer.

ODSIZU is the object size in units and ODBPUN is the unit size.