• The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
Menu
  • The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
  • Admin Alert: How Big is My IFS?

    November 14, 2007 Joe Hertvik

    I recently had to quickly determine the size of my production box’s AS/400 Integrated File System (IFS) when its DASD usage zoomed past its ASP threshold value and was threatening to crash the system. Since I didn’t have a good technique handy, I evaluated several different IFS evaluation methods on the fly. Here’s what I learned and how to use these methods to locate where your big IFS folders live.

    Free Tools in Different Packages

    Due to my cheap nature and even more limited budget, I usually gravitate toward what IBM and the Internet can offer. For determining IFS folder size, I was pleasantly surprised to find four different tools that all seem to do the job in different ways.

    • The Query IFS Library utility (QRYIFSLIB)–A downloadable program that comes with IBM’s freeware IFSTOOL library
    • The Edit File command (EDITF)–IBM’s green-screen editor for IFS stream files can display the sizes of folders under any IFS directory
    • iSeries Navigator (OpsNav)–i5/OS’ graphical management utility can tell you how much space any folder in the IFS (or the root of the IFS itself) takes up
    • The Qshell command environment–Sending a certain command to the i5/OS shell interpreter also reports on files and directories in the IFS

    Each of these techniques has its advantages and disadvantages, as well as their own difficulties in usage. Here’s a quick overview of how to use each method. You may want to keep this list handy in case you need to investigate IFS folder size in an emergency.

    Downloading a Solution

    For several i5/OS releases, IBM offers a downloadable set of IFS tools called IFSTOOL. Being an older set of utilities, many of these tools have been incorporated into recent editions of i5/OS. However, there is one callable program named Query IFS Library (QRYIFSLIB) that’s valuable for dumping lstat information for IFS files and directories into a native i5/OS file. Once this information is in a file on your System i box, you can collate all the files sizes for particular folders or for the entire IFS and determine how much space is being taken up by those objects.

    QRYIFSLIB can be run with a number of different parameters and it can retrieve information from the IFS Root directory (/) or from any other IFS based directory. I found that I could retrieve all the stream file and directory information for the root (/) by calling QRYIFSLIB with the following parameters:

    CALL PGM(QRYIFSLIB) PARM('/*' 's' 'X:*NONLOCAL')
    

    The first parameter (‘/*’) designates that you want the program to start at the root (/) of the IFS. The second parameter (‘s’) tells the program to process information for all the sub-folders under the designated folder. But the key to running this program for the Root (/) of the IFS is the third parameter (‘X:*NONLOCAL’). This parameter tells QRYIFSLIB to just retrieve information for the stream file portion of the IFS and to ignore all the other IBM supplied directories, such as /QSYS.LIB, /QNTC, /QOPT, and /QDLS, so that it only retrieves information from the IFS root (/) folder. By default, the information is written to file QRYIFSLIB in the QGPL library, but the program provides a parameter that allows you to override that setting and to store the file in another library on your system.

    The nice thing about QRYIFSLIB is that it runs very fast. It uses the Qshell interpreter to retrieve and write the information, and the total retrieval time for gathering information from my system’s entire root directory was less than a minute.

    The IFSTOOL toolset can be downloaded as a save file from this IBM FTP site. Information on using the tools (including QRYIFSLIB) can be found in IBM Software Technical Document 19175649, Integrated File System Tools: DEL, DELTREE, CMDALL, CHGAUTALL, CHGOWNALL, QRYIFSLIB, DLTIFSF, RNMIFSF.

    Using IBM’s Editor

    Another nice quick way to find the size of any IFS directory is to use i5/OS’ stream file and database editor, the Edit File command (EDTF). EDTF allows you to display all the files and directories under the root (/) of the IFS by running the following command:

    EDTF STMF(/)
    

    Once the directories are displayed, you can place an option “6=Path Size” in front of a specific directory and the command will calculate and display the size of that folder and the number of sub-directories and files that the folder contains. By starting at the Root (/) folder, you can quickly determine which IFS directories are the largest on your system and then take whatever actions are needed to cut down the directory size, if necessary.

    The biggest downside of using EDTF to calculate IFS directory sizes is that there isn’t any option to dump the results into an i5/OS file for later evaluation. All the directory and file sizes retrieved by EDTF are only available on the EDTF screen. To download files to an i5/OS file, you’re better off using one of the other methods.

    Using OpsNav To Find IFS Directory Sizes

    You can use iSeries Navigator’s (OpsNav) point and click functionality to get cumulative sizes for IFS root (/) directories. To get the size of any IFS directory and its corresponding sub-directories, run OpsNav and open the File Systems→Integrated File System→Root node of the System i box that you are trying to retrieve IFS directory sizes for. Right-click on any directory that you want to see the size of, select Properties from the pop-up menu that appears, and OpsNav will calculate the size of all the files and sub-directories contained under the directory that you are examining.

    In my experience, I’ve found that the OpsNav technique works well when calculating the size of sub-directories under the IFS root (/). However, it doesn’t work as well if you’re using it to calculate the size of the entire IFS root (/) directory. When you right-click on the File Systems→Integrated File System→Root entry, OpsNav will start to calculate the entire size of the IFS. However, this calculation could take a long time to finish depending on what other activity is going on with your system or how full your disk is at the time you are running the command. On the plus side, when calculating the IFS root (/) size this way, OpsNav automatically filters out the sizes of the other i5/OS file systems (QSYS.LIB, QDLS, QOpenSys, etc.) because those file systems are set up under separate entries under the OpsNav Integrated File System node.

    Submitting a Command To Qshell

    You can also submit a command to the Qshell command interpreter in order to find the size of an IFS directory and all its sub-directories and to dump that information into a source file member of your choosing. To do that, you would execute a command on the green-screen in the following format:

    QSH CMD('ls -l /ifs_dir >
    /qsys.lib/library_name.lib/source_file_name.file/member_name.mbr')

    Where /ifs_dir refers to the IFS folder that you want to retrieve information for, and library_name, source_file_name, and member_name refer to the library, source file, and member name of the source file that you want to write the information out to. Once the command is entered, it retrieves information about the directory and the first-level sub-directories that it contains, directory authority settings, allocated size of each directory listed, and the dates that each directory was created.

    If you want to run this command to retrieve information for the directory and all of its first- and second-level sub-directories, you can run the command this way:

    QSH CMD('ls -l /ifs_dir/* >
    /qsys.lib/library_name.lib/source_file_name.file/member_name.mbr')

    The downside to using Qshell is that it’s easily the most unreliable of the four methods that I’m reviewing in this article. In testing, these statements would frequently provide incomplete information, such as not listing out all the sub-directories under my target directory. It would also sometimes incorrectly identify sub-directory names when running the command with the /ifs_dir/* option. Since I’ve seen this command written up in other articles, it may be that I’m missing current-level PTFs to run the command properly and that you may be able to get it to work on your system. However, since I wasn’t successful in using it to solve my problem, I recommend that you approach this command with caution.

    One Path, Four Roads

    So with just a little bit of effort, you can find and execute these tools to evaluate how large your IFS is and what folders are making it expand. It’s a handy list to keep around in case your disk space starts rapidly filling up and you have to quickly determine whether the culprit is one of the directories in your IFS.

    Correction: Another i5/OS High Availability Vendor I Forgot

    In the past month, I’ve written two articles on System i High Availability products where I’ve mentioned different solutions offered by Vision Solutions (MIMIX HA, iTera HA, and ORION HA), the DataMirror products offered by IBM, and Remote Software Facility (RFS) 8.1 from Bug Busters Software Engineering. But I forgot to mention another System i High Availability vendor: Maximum Availability and its *noMAX line of products. So when you’re evaluating these solutions for your System i needs, be sure to also check *noMax along with the other products.

    About Our Testing Environment

    Configurations described in this article were tested on an i5 550 box running i5/OS V5R3. Most of the commands shown here are also available in earlier versions of the operating system running on iSeries or AS/400 machines. If a command or function is present in earlier versions of the i5/OS or OS/400 operating systems, you may notice some variations in the pre-V5R3 copies of these commands. These differences may be due to command improvements that have occurred from release to release.

    RELATED STORIES

    IBM FTP site for downloading the IFSTOOL software, IBM

    Software Technical Document 19175649, Integrated File System Tools: DEL, DELTREE, CMDALL, CHGAUTALL, CHGOWNALL, QRYIFSLIB, DLTIFSF, RNMIFSF, IBM



                         Post this story to del.icio.us
                   Post this story to Digg
        Post this story to Slashdot

    Share this:

    • Reddit
    • Facebook
    • LinkedIn
    • Twitter
    • Email

    Tags:

    Sponsored by
    WorksRight Software

    Do you need area code information?
    Do you need ZIP Code information?
    Do you need ZIP+4 information?
    Do you need city name information?
    Do you need county information?
    Do you need a nearest dealer locator system?

    We can HELP! We have affordable AS/400 software and data to do all of the above. Whether you need a simple city name retrieval system or a sophisticated CASS postal coding system, we have it for you!

    The ZIP/CITY system is based on 5-digit ZIP Codes. You can retrieve city names, state names, county names, area codes, time zones, latitude, longitude, and more just by knowing the ZIP Code. We supply information on all the latest area code changes. A nearest dealer locator function is also included. ZIP/CITY includes software, data, monthly updates, and unlimited support. The cost is $495 per year.

    PER/ZIP4 is a sophisticated CASS certified postal coding system for assigning ZIP Codes, ZIP+4, carrier route, and delivery point codes. PER/ZIP4 also provides county names and FIPS codes. PER/ZIP4 can be used interactively, in batch, and with callable programs. PER/ZIP4 includes software, data, monthly updates, and unlimited support. The cost is $3,900 for the first year, and $1,950 for renewal.

    Just call us and we’ll arrange for 30 days FREE use of either ZIP/CITY or PER/ZIP4.

    WorksRight Software, Inc.
    Phone: 601-856-8337
    Fax: 601-856-9432
    Email: software@worksright.com
    Website: www.worksright.com

    Share this:

    • Reddit
    • Facebook
    • LinkedIn
    • Twitter
    • Email

    Sponsored Links

    ARCAD Software:  Dynamic, world-class ALM on and around the System i
    COMMON:  Join us at the annual 2008 conference, March 30 - April 3, in Nashville, Tennessee
    NowWhatJobs.net:  NowWhatJobs.net is the resource for job transitions after age 40

    IT Jungle Store Top Book Picks

    The System i RPG & RPG IV Tutorial and Lab Exercises: List Price, $59.95
    The System i Pocket RPG & RPG IV Guide: List Price, $69.95
    The iSeries Pocket Database Guide: List Price, $59.00
    The iSeries Pocket Developers' Guide: List Price, $59.00
    The iSeries Pocket SQL Guide: List Price, $59.00
    The iSeries Pocket Query Guide: List Price, $49.00
    The iSeries Pocket WebFacing Primer: List Price, $39.00
    Migrating to WebSphere Express for iSeries: List Price, $49.00
    iSeries Express Web Implementer's Guide: List Price, $59.00
    Getting Started with WebSphere Development Studio for iSeries: List Price, $79.95
    Getting Started With WebSphere Development Studio Client for iSeries: List Price, $89.00
    Getting Started with WebSphere Express for iSeries: List Price, $49.00
    WebFacing Application Design and Development Guide: List Price, $55.00
    Can the AS/400 Survive IBM?: List Price, $49.00
    The All-Everything Machine: List Price, $29.95
    Chip Wars: List Price, $29.95

    Oracle Launches ‘Business Accelerator’ for J.D. Edwards EnterpriseOne Be My Guest

    One thought on “Admin Alert: How Big is My IFS?”

    • Robert Rock says:
      January 1, 2020 at 7:01 pm

      proper site: ftp://public.dhe.ibm.com/services/us/igsc/cs2/ApiSamples/

      Reply

    Leave a Reply Cancel reply

Volume 7, Number 40 -- November 14, 2007
THIS ISSUE SPONSORED BY:

ProData Computer Services
COMMON
WorksRight Software

Table of Contents

  • ON vs. WHERE
  • Odds and Ends
  • Admin Alert: How Big is My IFS?

Content archive

  • The Four Hundred
  • Four Hundred Stuff
  • Four Hundred Guru

Recent Posts

  • Public Preview For Watson Code Assistant for i Available Soon
  • COMMON Youth Movement Continues at POWERUp 2025
  • IBM Preserves Memory Investments Across Power10 And Power11
  • Eradani Uses AI For New EDI And API Service
  • Picking Apart IBM’s $150 Billion In US Manufacturing And R&D
  • FAX/400 And CICS For i Are Dead. What Will IBM Kill Next?
  • Fresche Overhauls X-Analysis With Web UI, AI Smarts
  • Is It Time To Add The Rust Programming Language To IBM i?
  • Is IBM Going To Raise Prices On Power10 Expert Care?
  • IBM i PTF Guide, Volume 27, Number 20

Subscribe

To get news from IT Jungle sent to your inbox every week, subscribe to our newsletter.

Pages

  • About Us
  • Contact
  • Contributors
  • Four Hundred Monitor
  • IBM i PTF Guide
  • Media Kit
  • Subscribe

Search

Copyright © 2025 IT Jungle