?
Solved

Find large objects on IFS

Posted on 2013-01-24
2
Medium Priority
?
2,811 Views
Last Modified: 2013-01-24
Is there a way to list all the large files on the IFS for disk clean up purposes?
0
Comment
Question by:roosterup
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 4

Accepted Solution

by:
rward earned 1000 total points
ID: 38814452
There are a couple ways you could go about this.  

The first way is to use the Disk Space collection tool built into OS/400.  In a 5250 session type command: GO DISKTASKS  then take option 1 to collect all disk information.  Once the information has been collected you can use the 2nd option to print the information.  Select the type of report to print as Specific Object then select the object type as *STMF and set the smallest size in bytes you want to list on the report.  

Another way to list files greater than a certain size is to use a shell command.  In 5250 session enter command QSH then use the find command:

find / -type f -size +100000 -exec ls -lrt {} \;|sort -r +4

This will find all files from the root down that are larger than 100000 512bytes blocks and sort the list from largest size to smallest.  You can further use the redirect > to redirect the std output to a text file.

Rob
0
 
LVL 35

Assisted Solution

by:Gary Patterson
Gary Patterson earned 1000 total points
ID: 38815484
IBM support article:

http://www-912.ibm.com/s_dir/slkbase.nsf/1ac66549a21402188625680b0002037e/c5f9378a8534995b86256ea000567c97?OpenDocument&Highlight=2,343071214

Good thread on the subject:

http://serverfault.com/questions/77405/how-to-efficiently-find-which-folders-are-filling-the-hard-disk-os-400

If you have PASE installed on your AS/400, you can use the AIX "du" command to find large IFS objects:

For each directory you want to scan (don't start in the root folder):

CALL QP2TERM
> cd /QOpenSys (or whatever folder you want to scan)
> du -a -k | sort -n -r | head -n 20

I'd usually repeat this for all the root-level IFS directories except for QOPT, QSYS.LIB, QFileSvr.400, and QNTC.
 
That will run the du command for the current folder, sort the output, and list the top 20 largest files or directories found.  Directory sizes are recursive, meaning it shows the sum of all the files in that directory and all subdirectories.

Sizes reflect actual disk consumption, and the "-k" option reports in kilobytes.

If you aren't familiar with PASE, it is an AIX execution environment that runs under OS/400 (i5/OS, iOS, i).  Here's info about PASE and qshell (BASH-like command shell for the AS/400):

http://publib.boulder.ibm.com/infocenter/iseries/v5r4/index.jsp?topic=%2Frzahg%2Frzahgshell.htm

And here is a link to the AIX "du" command docs:

http://pic.dhe.ibm.com/infocenter/aix/v6r1/index.jsp?topic=%2Fcom.ibm.aix.cmds%2Fdoc%2Faixcmds2%2Fdu.htm

- Gary Patterson
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article lists the top 5 free OST to PST Converter Tools. These tools save a lot of time for users when they want to convert OST to PST after their exchange server is no longer available or some other critical issue with exchange server or impor…
This article will show how Aten was able to supply easy management and control for Artear's video walls and wide range display configurations of their newsroom.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question