Recently we were having an easy afternoon at the IT department, preparing ourselves for the weekend when suddenly our boss started shouting: "We are running out of disk space, we are running out of disk space!".
The problem seemed to be that a process started to loop endlessly, and was filling up a working file. Our manager discovered it by chance by looking at the WRKSYSSTS, and we stopped the process.
We solved the problem and everything went fine, but after that we got the feeling that something like that could happen again at anytime, and we didn't have a tool to protect our iSeries.
The result was that we created this tool by combining two existing commands. It checks the disk space every
inter minutes and if it gets
mrg % closer to the disk space threshold it will send an email to
msg text and a hard copy of WRKSYSSTS attached to it.
The idea is to submit this command after every IPL, maybe as a scheduled job. Alternatively, add it to the QSTRUP program and it will run as a never ending program (NEP) checking your disk space. You can view the full code for XRTVSYSSTS in PDF.
After compiling the commands and the programs you should be able to schedule a command like the one below, were you can setup how often you want the check to be done, your tolerance percentage, a warning message, and a destination.
This second command, which is invoked by the first one, is the one that sends the mail and the attached hard copy of the WRKSYSSTS.
These commands can be improved in any way you like and besides the fact that they work and can help you in your daily task their main purpose is to be examples of the different possibilities that you have within the iSeries
ABOUT THE AUTHOR: Benito Abraham is an analyst programmer at Pride International. He has over 15 years experience on AS/400, including iSeries security and RPG.