On Mon, 8 Oct 2001, Mr. G. D. Geen wrote:
Brian, there is no kludge to it. rsh to your filer and run a "quota report" then just grep for "tree". As you can see here, the quota type is in the first field.
That's what I do now, but the Netapp still has to run through the entire "quota report" command. I would prefer a way just to have it list the tree quotas, and exit. As I mentioned, it takes a second to list the tree quotas, but half an hour or more during peak usage times to scroll through all of the rest of the user quotas.
Another way is to mount your filer's /etc directory and read the third field from the quotas file which also classifies the quota as shown below.
[root@mspadmin2.dal.mslp.ti.com] more quotas /vol/vol0/5062_2_3 tree 6G /vol/vol1/pbmic tree 6G
The /etc directory is not always mountable on the host that runs the script, and I believe that would mean sending multiple rsh commands, or constructing a compound command line to run multiple "quota report" commands. It'd be a heck of a lot easier if I could just do a "quota report -T" (-t is taken already in 6.x) and have the filer figure it out. ;-)
Myself I use the quota report becuase not only does it give me the limit but what is currently being used so that I can calculate total usage from that.
I'm using it for total usage as well as overcommitment of quota trees on disk space and inodes. Sample output (115 characters wide... apologies if your mailer auto-wraps this for you):
STAGE-NA1 QTREE REPORT: Volume Quota tree name Disk space (used/free/total) Inodes (used/free/total) -------- ----------------------- --------------------------------------- ------------------------------------ vol0 {DEFAULT} 0 1048576 1048576 0.0%-- 0 10240 10240 0.0%-- vol0 ariba-stage 0 5242880 5242880 0.0%-- 1 10239 10240 0.0%-- vol0 oracle-stage 62249064 11151256 73400320 84.8% 9892 10588 20480 48.3% vol0 marketplace 808488 9677272 10485760 7.7% 12239 8241 20480 59.8% vol0 netflow 20823868 31604932 52428800 39.7% 84281 69319 153600 54.9% vol0 devo-6-ora 489864 558712 1048576 46.7% 5883 4357 10240 57.5% vol0 informatica 275532 773044 1048576 26.3% 590 9650 10240 5.8% -------------------------------- --------------------------------------- ------------------------------------ vol0 PROVISIONED CAPACITY 84646816 60056672 144703488 58.5% 112886 122634 235520 47.9% vol0 ACTUAL CAPACITY 84952100 58041284 142993384 59.4% 113893 5126976 5240869 2.2% vol0 OVERCOMMITMENT 1710104 101.2% -5005349 4.5%