IFS archives - ENDJOBABN

ENDJOBABN:

IFS

Oct 8 2009   7:28PM GMT

iSeries Storage Quotas: Keeping Users Informed



Posted by: Steve Pitcher
AS/400, iseries, System i, IFS, quota

Users and storage quotas.  Groan…

If you’re using the IFS on your iSeries for users to store files then you’ve probably struggled with storage management.  I’ve often compared managing user storage to being a credit card company with a lot of irresponsible customers.  We give a customer a $1000 credit limit (i.e., 100 MB of storage) and they go on a spending spree.  Once they’ve reached their limit they ask for more money.  Since they have good credit we give them an extra $500 (i.e., bump their storage limit an additional 50 MB).  We may do this a couple of times before we catch on and send them to the collection department to hound them on a regular basis to get below their credit limit.

When users reach their storage quotas, simple things like generating spooled files are a problem because they don’t have any space to generate them.  Then they call IT when their reports don’t print.

Now, users who need their storage caps adjusted for a business requirement have a legitimate reason.  I’ll adjust your quota accordingly and perhaps make a case to add disk.  My beef lies with knuckleheads using 90% of their storage on pictures of their family trip to Disney World.  If you can afford the digital camera and the trip then you can afford a flash drive or a DVD burner.  So pretty please, keep the crap off the production server.

I put together a little automated email routine to inform users and cut down on storage related support calls.  Personally, I’d say I’ve easily cut the storage support calls by 50%.  Here’s the gist of what the user gets:

  1. A quick explanation that every user has a storage quota and that they’re approaching it.
  2. How much space they have left.
  3. A list of files they own in descending order of size.  I also include the last change date of the object.

There’s a number of pieces that put this together.

  1. Retrieve a listing of iSeries users using the DSPUSRPRF command to an outfile and then do some quick query/400 work.
  2. I interface with our Domino server to get the email address for each user. This is done by way of a simple Domino agent that exports mail users to a csv file on our iSeries.
  3. I determine which users are exceeding 90% of their storage quota via the output of the DSPUSRPRF command above.
  4. I get a list of objects each user owns (using the RTVDIRINF command, some CL and query/400) and create a csv file for that user with some RPG.  The csv file generation stuff was put together after reviewing Scott Klement’s awesome website that has a section on working with files on the IFS  http://www.scottklement.com/rpg/ifs.html)
  5. Each user is emailed the notification with the attached csv.  This is accomplished, in my scenario, with the Javamail application that you can install on your iSeries free of charge.

If anyone would like an explanation on how to do build this yourself, please let me know and I’d be happy to help.  It’s a Frankenstein solution, but it’s free and works well.