Another Way to Retrieve i5 System Storage Space
May 16, 2007 Hey, Joe
You should adjust your focus in your article on retrieving system storage space. The first step in dealing with critical storage errors is not to clear up past problems. The first step is to understand where the space is being used now. The Retrieve Disk Information command and the Print Disk Information command are valuable in finding storage hogs, particularly in the Integrated File System (IFS). Maybe you should explore this possibility, too.
Not being familiar with the Retrieve Disk Information (RTVDSKINF) and Print Disk Information (PRTDSKINF) commands, I decided to run these commands on my system and see what they bring to the table in identifying disk storage hogs.
The first step in analyzing disk storage Rob’s way is to run the RTVDSKINF command. RTVDSKINF collects information about your disk drive usage and stores it in a database file in the QUSRSYS library. Once the information is captured, it can be parsed and analyzed by using the PRTDSKINF command. You could also try to write your own query to look at the information any way you want, but you will probably want to try using PRTDSKINF first to see if you can get the information you want without too much effort.
RTVDSKINF is fairly easy to run, but it cannot be run interactively. It must be run as a batch job. For my situation, I submitted RTVDSKINF to batch by using the following Submit Job command (SBMJOB).
SBMJOB CMD(RTVDSKINF) JOB(RTVDSKINF) JOBQ(QSYS/QSYSNOMAX)
In this default configuration, RTVDSKINF retrieves disk storage information for your system ASP, as well as for all other secondary ASPs on your system. The System ASP is numbered as ASP 1, while the other ASPs are numbered from 2 through 32. There is also a configuration for running RTVDSKINF for independent named ASP devices.
RTVDSKINF information is generally kept in a file called QAEZDISK in the QUSRSYS library, if you’re collecting information for the system and basic ASPs. If you’re collecting information for an independent named ASP device, the resulting file will also reside in QUSRSYS and it will be named QAEZnnnn, where nnnn = the ASP number of the independent ASP that you are analyzing (Independent ASPs have ASP numbers greater than 32). Every time you run RTVDSKINF, it overwrites any QAEZDISK information that may have been previously saved.
But be careful with RTVDSKINF if you’re short on disk space. Because it contains entries for most objects on your system, the resulting QAEZDISK file can consume a lot of disk space all by itself. When I ran RTVDSKINF on my system, my QAEZDISK file recorded 825,000 records and the database file itself was over 170 Mb. While this may not seem like that big an issue, it may make a difference if you’re trying to reduce system storage after your system exceeds 90 percent disk drive usage.
Once the batch job running RTVDSKINF ends, you can start looking at your system storage by using the Print Disk Information command (PRTDSKINF). Depending on how you run PRTDSKINF, you can create five different reports that tell you which objects, users, libraries, or folders are taking up the most storage space on your system. The first three pages of each PRTDSKINF report contain a summary of how your system as a whole uses disk storage. This summary report includes how much space is allocated to user libraries, user directories, folders and documents, and other system objects. By looking at the summary first, you can determine what types of objects are consuming the most disk space. Knowing this, you can then go into the detailed reports and retrieve which individual objects, libraries, folders, or users are using the most space. You can then enter the following PRTDSKINF commands to produce each type of report.
1. To run a report detailing the amount of storage your i5/OS libraries are using, run this command:
This report will show you disk drive usage for each library on your system, so that you can identify which libraries are using the most storage. You can also parse this information further by entering values for which libraries you want to view in the report (the Libraries parameter, LIB), which objects or object types to include (the Objects, OBJ, and Object Types, OBJTYPE parameters), the minimum size of object you want to include in the report (the Smallest Size parameter, MINSIZE), or how you want the report sorted (Sort by, SORT). While there aren’t a zillion different options for viewing your disk space usage, there are enough so that you can identify which libraries are taking up the most storage and look further for the problem areas.
In my case, I found that one particular user library was taking up 11 percent of my system storage and that my spool file library (QSPL) was taking up another 8 percent of the system. So in order to clear up some disk space, I might examine which files I could reorganize to get rid of deleted records or whether I can even get rid of any unused files in that library. For spooled files, I could set up an automated routine to delete old spooled files in the system or I could use iSeries Navigator or the green screen to manually review my spooled file usage and to delete any files that are no longer needed. Once I know which areas are using the most disk space, I can concentrate on those areas to reclaim the most storage.
2. To run a report detailing which documents or folders are using the most disk space, run PRTDSKINF this way:
In my case, QDLS documents and AS/400 Integrated File System objects didn’t account for that much disk storage but it may be different for your system depending on what products you have installed. If you’re using your system as a Lotus Domino Server, for example, you may have a number of database folders that are consuming a lot of disk. WebSphere files can also consume a lot of folder space. Like the libraries report, you can also parse this information according to specific folders or generic folder names (the Folder parameter, FLR), specific documents (Documents parameter, DOC), or to show only those objects that are larger than a minimum size.
3. To create a report showing how much i5 storage a particular user or users are using, run PRTDSKINF this way:
This will show you a report listing how much storage each particular system user owns. Using this report, you can track down which users are consuming the most disk space. There are options on this report to list out usage by individual user or a generic user name (the Owners parameter, OWN), or by specific objects and object types (again, the OBJ and OBJTYPE parameters).
4. To create a report showing your largest objects on the system, run PRTDSKINF this way:
This command creates a very large detailed report displaying all the objects on your system, sorted by size from largest to smallest. In my case, my largest object was a journal receiver that was recording changes for a heavily user file (3.5 percent of storage), so I could conceivably reduce disk usage by rethinking my journaling strategy. You can also subset this report to make it smaller by designating that it only display certain object names or generic objects (the Objects parameter, OBJ) or certain types of objects, such as files (the Object Type parameter, OBJTYPE).
5. To create a report showing only system objects, run PRTDSKINF this way:
This is the least valuable option when trying to retrieve disk space because system objects are more or less a fixed cost on your system that you probably can’t cut down on.
Overall, I was pretty impressed with these simple commands and the way they can help me identify storage hogs. I will definitely use them more in the future and I encourage all my readers to experiment with them for disk storage control.