From:	SMTP%"RELAY-INFO-VAX@CRVAX.SRI.COM" 29-JUN-1993 15:43:46.64
To:	EVERHART
CC:	
Subj:	Summary: Displaying Blocks used by users

X-Newsgroups: comp.os.vms
From: palm@tokyo.rockwell.com (Stephen [kiwin] PALM)
Subject: Summary: Displaying Blocks used by users
Message-ID: <PALM.93Jun29185806@jedc11.tokyo.rockwell.com>
Sender: news@nb.rockwell.com
Organization: Rockwell International Japan, JEDC
Date: Wed, 30 Jun 1993 02:58:06 GMT
Lines: 143
To: Info-VAX@KL.SRI.COM
X-Gateway-Source-Info: USENET


Several days ago, I asked:

Steve> I would like to display all of the blocks used by each user on a disk.

Steve> Something like the BSD Unix    quot -a   would be good,  
Steve> quot -av   would be even better.

There were several suggestions posted and I received some personal replies.

Here is what I did followed by *some* of the suggestions.

thanks for everyone's help

-kiwin

-----

I guess I should have mentioned that we are not using quotas. Several
people asked why or suggested using them temporarily. My basic reason
was that I just wanted to *observe* the file usage statistics, but
not manipulate them... even temporarily. I don't know so much
about VMS Sys Admin and really shouldn't be mucking around.

So... I chose to use  Bart Z. Lederman's <LEDERMAN@Eisner.DECUS.Org> approach:

Bart>    I'm surprised that nobody suggested the following yet:

Bart> $ ANALYZE /DISK_STRUCTURE /USAGE=[filespec] device

Bart>    True, this puts the information into a file (default file name
Bart> is USAGE.DAT) instead of "displaying" it, but I find it to be the
Bart> most useful way to obtain the information.

Bart>    Most important: you DON'T HAVE TO ENABLE DISK QUOTAS!  I find
Bart> quotas to be a major pain, and don't use them.

Bart>    I believe a sample program to read the USAGE.DAT file is or
Bart> was supplied with VMS in SYS$EXAMPLES, or possibly it was on
Bart> DSIN.  I used to use Datatrieve to read the file, but also wrote
Bart> a program in C which does it.  It's not a fixed-field file, but
Bart> the format isn't difficult to interpret.

Later I asked for and he provided his C source code. It compiled and worked
without a hich.  The output is a cross between Unix's quot and du,
but with suitable use of grep/diff, I obtained the info I wanted.

----- Some other suggestions -----


** > "fairfield" == fairfield  <fairfield@slacvx.slac.stanford.edu> 

fairfield>     Do you have disk quotas enabled?  If so, use:

fairfield> 	$MCR DISKQUOTA
	DISKQ> USE dev_name
	DISKQ> SHOW [*,*]
	DISKQ> EXIT

fairfield> If you want the output in a file, put this in a command file, e.g.
fairfield> SHOQ.COM:

fairfield> 	$ MCR DISKQUOTA
fairfield> 	USE dev_1
fairfield> 	SHOW [*,*]
fairfield> 	USE dev_2
fairfield> 	SHOW [*,*]
fairfield> 	.
fairfield> 	.
fairfield> 	EXIT
fairfield>         $ EXIT

fairfield> Then 
fairfield> 	$ @SHOW/OUT=QUOTAS.LIST

------
** > "Brian" == Brian Cuttler <sysbrc@hyperfine.phy.albany.edu> 

Brian> I have a home grown utility that will accept input from the quota files
Brian> and summarize for user's across disks or by group name/number. The
Brian> programs will optionally report only users who have used above a
Brian> certain percentage of their diskquota. The third program will summarize
Brian> reports written by the first 2 programs.

-----
From: "David L. Cathey" <texsun!montagar.com!davidc@cs.utexas.edu>

	I actually have a product that will do just this.  It will summarize
all file usage by disk, and by user.  It also breaks down the report based
on file dates (create/revised/backup/expiration), so you can use it to 
tell which users have lots of files that haven't been used for a while.

	If scans all mounted disk automatically, works for shadow sets, 
stripes sets, and bound volume sets, and it very fast.

	If you'd like fmore information, let me know.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
David L. Cathey		                |INET: davidc@montagar.com
Montagar Software Concepts              |UUCP: ...!montagar!davidc
P. O. Box 260772, Plano TX  75026-0772  |Fone: (214)-618-2117

-----

From: galb@lacerta.unm.edu (joseph galbraith)

Here is a little program I wrote about three years ago when I was
exploring INDEXF format and other interesting things.  It's not the
prettiest implementation, but it gets the job done with or without
quotas (as far as I know).  If you have ALOT of users on one disk you
might have to expand the arrays.

As far as last time accessed, I don't have any solutions.  Sorry.

----------------------------------------------------------------------------
	.Title	DISK_USAGE	Determine the Disk Usage on specified Disk
	.Ident	/V2.0-1/
;+
;	Abstract:
;		Determine what User UICs have space used on a disk and
;		how much each one has used.  Output is sorted by space
;		used in descending order.
;
;	Author:				Date:
;		Joseph L. Galbraith		April, 1990
;
;	Modification Log:
;
;	V2.0-1	JLG080	Joseph L. Galbraith	November, 1990
;		Rewrote original version, which used QIO to walk the
;		directory structure of the disk, accessing every file
;		to find owner and size.  The current version uses
;		RMS to read the INDEXF.SYS file and just reads through
;		the file headers on the disk.
;-

------
--
-----
Stephen [kiwin] Palm                                     TEL: +81-3-3265-8850
Rockwell International - Digital Communications Division     COMNET: 930-8862
Japan Engineering Design Center                          FAX: +81-3-3263-0639
      palm@tokyo.rockwell.com       palm@cs.cmu.edu           NIHON::PALM

